Skip to Content

CrystalReports 2008 and .NET C# 2008 manipulate SQL on Runtime


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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 03, 2008 at 01:59 PM

    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:



    or implicitly

    crReportDocument.SetDataSource(dataSet) or crReportDocument.SetDataSource(dataSe.Tables(0))

    See the following for more information:


    Add comment
    10|10000 characters needed characters exceeded