Hi,
I'm planning to do a report. The report in some condition need to insert a new datarow manually. Currently, I will query the whole result from database to datatable in my program. Then add in new datarow into that datatable if needed. Last, pass the datatable to the report and show it. I would like to ask, is that able manipulate the datasource in report template? So that, the program will only call the report, and the report will grab the result directly from database and insert new datarow into it if meet the condition.
Manipulate the datasource before show
Manipulate the datasource before show
You can access to Data from databases (which report engine loads) with help of property CacheDataSet of report. For example:
You can change data in BeforePrintEvent of first page of your report.
Thank you.
Code: Select all
DataTable table = this.CacheDataSet["table1"];
Thank you.