Dynamic SQL Query

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v5)  /  Dynamic SQL Query

DynamicPDF CoreSuite for .NET (v5) Forum

 Aug 26 2008 8:30 AM
I have a HUGE search query builder situation where there are around 20 - 30 optional query questions. Can I dynamically create a query string in C# and pass the resulting query string to the DPLX file instead of using the Query it was created with? Please advize.

ACTUALLY I would like to just simply use the dataset returned from the query that was run BEFORE I do a PDF conversion rather than having to run the query again. Is this by any chance possible and if so HOW?

Thanks.
 Aug 26 2008 11:56 AM
Posted by a ceTe Software moderator
Hello,

Yes, you can use the query built by your C# code dynamically in the report without any problem. In order to do this you will have to use the OpeningRecordSet event of the query object. You can also assign a DataTable object you have to the report. You can refer to the Event Driven Queries topic on our help documentation.

Thanks,
ceTe Software Support Team.
 Aug 27 2008 1:15 AM
Thanks for the quick responce.

The help files are not all that helpfull in the web area.

What I have is a simple simple example.

In my Page_Load I ONLY have

     DrawPdfToWeb("MyDemoReport.pdf");

How do I change the DataTable that is in the DPLX file (Where I have a SIMPLE SQL query in to a allready returned DataTable lets say called dtData.

IN the Page_Load and not having to call other methods that I still need to write. I just simply want to report the DataTable that I allready HAVE. ?

Any help with this please. Need to stream it straight to web client and not CREATE a file on the server side etc.

Thanks again for the quick responce.
 Aug 27 2008 1:46 PM
Posted by a ceTe Software moderator
Hello,

Can you please send an email to our Support Team, so that they can send you an example that shows how to generate reports using data from the DataTable.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 3:43 AM.