on 09-03-2008 11:59 AM
Hello,
I need to manipulate the SQL at runtime. We have some Statistics, that have to be manipulated by search criteria filled in our application.
So I have to set these criteria at runtime.
I earlier versions of CrystalReports we used the RDC and to get the SQL by the sqlquerystring property,
manipulate the SQL and set it again.
What can be done in CrystalReports 2008 with C# .NET?
Regards Christian.
There is no way to pass an actual SQL Query to the report - not since version 9 of Crystal Reports and certainly not with the Crystal reports .NET SDK. However you could create a dataset and pass that to the report. Essentially the line of code that passes the dataset would be:
explicitly
crReportDocument.Database.Tables(0).SetDataSource(dataSet.Tables("NAME_OF_TABLE"))
or implicitly
crReportDocument.SetDataSource(dataSet) or crReportDocument.SetDataSource(dataSe.Tables(0))
See the following for more information:
Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.