SQL selection with Crystal Report

  • Thread starter Thread starter TheSteph
  • Start date Start date
T

TheSteph

Using VS2005 / MSSQL Server 2000 / Crystal 8.5 and Crystal .NET

How can I programmatically change the "SQL Where clause" of a ReportDocument
?

Example ( Id' like something like this ) :
MyReportDocument.SQLSelectionFormula = "(ID_PAYS IN (SELECT ID_PAYS FROM
CUSTOMERS))";

(or something like this) :

MyReportDocument.RecordSelectionFormula = " USESQL (ID_PAYS IN (SELECT
ID_PAYS FROM CUSTOMERS))";


PS: I don't want (and Can't) use .NET report based on .NET Datasets.

Thanks for any help !


Steph.
 
Hi,

TheSteph said:
Using VS2005 / MSSQL Server 2000 / Crystal 8.5 and Crystal .NET

How can I programmatically change the "SQL Where clause" of a
ReportDocument

I was going to suggest you to use Dataset when I saw your PS :)

IIRC you cannot modify the report through code. This is one limitation of
the version shipped with .NET
Now, I haven;t tried to modify (or even understand it) the code generated by
CR ( CR does generate a new class with the same name of the report)

You could try to see what it contains.
 
Back
Top