Page 1 of 1

Don't show any thing!!!

Posted: Wed Feb 10, 2016 7:25 pm
by arfaie
Hi
I created a report with Stimulsoft and use it in my web app
i crated a dataset in report and want to show selected data in report but it dosen't show any thing in StiWebViewer and it's show a blank page!
my code is this:

Code: Select all

var select = db.ViewComplaint.FirstOrDefault(n => n.idComplaint == 5);
            StiReport report = new StiReport();
            report.RegData("select", select);
            string serverlocation = HttpContext.Current.Server.MapPath(string.Empty);
            report.Load(serverlocation + "\\Report.mrt");
            report.RegData("select", select);
            report.Render();
            StiWebViewer1.Report = report;
and i attached my Report.mrt for you!
plz help me as fast as is possible!
Thanks!

Re: Don't show any thing!!!

Posted: Thu Feb 11, 2016 2:48 pm
by HighAley
Hello.

Please, remove the first RegData() method.
Also try to save the report template and report document before passing it to the Viewer.
Usually it helps to solve many issues.

Thank you.

Re: Don't show any thing!!!

Posted: Sat Feb 13, 2016 8:24 pm
by arfaie
Thanks a lot!
finally I write a sal query and select my data from database!
But in my second page of the report there is just a single data!
and second page sometimes is blank!(because the data has been shown is null!)
Now How can i have a control to pages before export them?
i mean can i write a code in asp.net c# to export just a special page?(ex:page2 or page1)
thanks a lot and excuse me for more question!

Re: Don't show any thing!!!

Posted: Sun Feb 14, 2016 12:31 am
by Jan
Hello,

> But in my second page of the report there is just a single data!

Please check data source property settings of the databand.

> Now How can i have a control to pages before export them?
> i mean can i write a code in asp.net c# to export just a special page?(ex:page2 or page1)

You can specify in the PAgeRange of the Export Settings class, for example in the StiPdfExportSettings. This class can be provided in the ExportDocument method of the report.

Thank you.