How to launch wizard programmatically

Stimulsoft Reports.NET discussion
Post Reply
Sandy Pham
Posts: 62
Joined: Mon Dec 11, 2006 1:43 pm
Location: U.S.A.

How to launch wizard programmatically

Post by Sandy Pham »

I wrote some code to launch your wizard. When the designer comes up, everything "looks" correct. The data band has the table as its data source. The fields have been added to the data band. However, when I press the preview tab, the only thing showing up is the Report Title. I know my dataset has data that works because I am able to use the same dataset without running the wizard and it works fine.

Here's my code. What am I missing?


//ds = a dataset with all my tables
Stimulsoft.Report.StiReport rpt = new Stimulsoft.Report.StiReport();
rpt.RegData("Trebuchet", ds);
rpt.Dictionary.Synchronize();
Stimulsoft.Report.Design.Wizards.StiStandardWizardService wizard =
new Stimulsoft.Report.Design.Wizards.StiStandardWizardService();

Stimulsoft.Report.StiReport rptNew = wizard.CreateReport(rpt);
if (rptNew != null)
{
rptNew.Design();
}
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

How to launch wizard programmatically

Post by Vital »

Please change your code to this:

Code: Select all

Stimulsoft.Report.StiReport rptNew = wizard.CreateReport(rpt);
if (rptNew != null)
{
rptNew.RegData(report.Dictionary.DataStore);
rptNew.Design();
}
Thank you.
Sandy Pham
Posts: 62
Joined: Mon Dec 11, 2006 1:43 pm
Location: U.S.A.

How to launch wizard programmatically

Post by Sandy Pham »

Of course. I didn't register the data on the wizard report. I knew it was a dumb mistake on my part. Thanks!
Post Reply