Page 1 of 1

Create Report using datatable

Posted: Fri Nov 25, 2011 12:38 am
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

Create Report using datatable

Posted: Fri Nov 25, 2011 4:53 am
by Alex K.
Hello,

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

Thank you.

Create Report using datatable

Posted: Fri Nov 25, 2011 6:45 am
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

Create Report using datatable

Posted: Mon Nov 28, 2011 2:18 am
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.

Create Report using datatable

Posted: Tue Nov 29, 2011 11:34 am
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

Create Report using datatable

Posted: Wed Nov 30, 2011 1:14 am
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.