Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2069

Re: Changes to ReportDocument.RecordSelectionFormula no longer apply

$
0
0

Thanks very much for your investigative work, Gareth.

 

On one report I was doing the following :

 

string[] aryIDs = IDs.Split(',');

for (int c = 0; c < aryIDs.Length; c++) {

    rep.RecordSelectionFormula += "{HIREITEMS.ID}=" + aryIDs[c] +

        ((c + 1) < aryIDs.Length ? " Or " : "");

}

 

As you said, this fails in recent versions of Crystal Reports! It just makes rep.RecordSelectionFormula = ""

 

I have now changed this to :

 

string[] aryIDs = IDs.Split(',');

string rsf = "";

for (int c = 0; c < aryIDs.Length; c++) {

    rsf += "{HIREITEMS.ID}=" + aryIDs[c] +

        ((c + 1) < aryIDs.Length ? " Or " : "");

}

rep.RecordSelectionFormula = rsf;

 

...which works perfectly.

 

No idea why they have to break things like this!

 

Thanks again


Viewing all articles
Browse latest Browse all 2069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>