Create Report using datatable

Stimulsoft Reports.WEB discussion
Post Reply
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

Create Report using datatable

Post by Chasoo »

Hi,

we are trying to design a solution with stimulsoft report designer.if we use datatable in report designer (regdata() method) and save the report template.when we executing how we should pass the datatable again ? is there a call back or event?

is there a sample project we can have a look ?

chaminda
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Create Report using datatable

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your task in more details?

Thank you.
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

Create Report using datatable

Post by Chasoo »

hi,

we are executing a datatable using our existing database connection in our solution. something like

DataTable demo = new DataTable();
demo = repository.GetDataTable();

and then we want to design report using that datatabel. example

var report: StiReport = new StiReport();
report.regData(demo);
report.dictionary.synchronize();
report.design();

and once we have save this report in the server.will it execute report later on? without binding datatable again to the report.

is there a sample for this ?

tnx

chaminda
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Create Report using datatable

Post by Alex K. »

Hello,

You can describe on the save report event and save report in the database

Code: Select all

StiOptions.Engine.GlobalEvents.SavedReportInDesigner += new EventHandler(GlobalEvents_SavedReportInDesigner);
as string (report.SaveToString()) or array of byte (report.SaveToByteArray()).
And then load report from the database.

Thank you.
Chasoo
Posts: 40
Joined: Wed Oct 19, 2011 1:29 am

Create Report using datatable

Post by Chasoo »

No i have already saved the report. overriding the report designers save event.
My question was, i am saving lot of reports in to the database.and users running them by retrieving from database. all the reports has designed using regdata(datatable) code.(as i have mentioned above).
when users running the report there is no data.
do we have to set the datatable again ? using regdata command ? once we retrieve them from database and running?

hope u have got my question clearly


chaminda
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Create Report using datatable

Post by Alex K. »

Hello,

Yes, if you use RegData(datatable) method, then you can use it again when load report from your database.

Thank you.
Post Reply