Page 1 of 1

How to launch wizard programmatically

Posted: Thu Dec 14, 2006 1:18 pm
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();
}

How to launch wizard programmatically

Posted: Thu Dec 14, 2006 4:50 pm
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.

How to launch wizard programmatically

Posted: Fri Dec 15, 2006 2:59 pm
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!