Last post Apr 29, 2016 05:47 AM by Fei Han - MSFT
Apr 28, 2016 11:05 PM|Mary_Nem|LINK
I have few search panels in my ASP.NET page for gerenrating reports. So the users generate the report based on the search key. what I need to do is, when users put the search keys in the textbox field and click the button to generate report, in the code
behind, the result is queried from SQl and output as PDF file to the user.
is there any way that I can have both process on one button click event? I usually have 2 different buttons, one for quering the result form SQL server and show them in the listview and the second button to print the pdf file of the report.
Apr 29, 2016 05:47 AM|Fei Han - MSFT|LINK
On button click event, you could retrieve database based on the search key and store the records in a DataTable object, then you could generate PDF file with DataTable records using free iTextSharp Generation Library. The following article explained how
to generate PDF Report from SQL Server database, please refer to it.