Don't show any thing!!!

Stimulsoft Reports.WEB discussion
Post Reply
arfaie
Posts: 5
Joined: Sat Sep 05, 2015 10:34 am

Don't show any thing!!!

Post 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!
Attachments
Capture.PNG
Capture.PNG (22.2 KiB) Viewed 1741 times
Report.mrt
(4.65 KiB) Downloaded 332 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Don't show any thing!!!

Post 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.
arfaie
Posts: 5
Joined: Sat Sep 05, 2015 10:34 am

Re: Don't show any thing!!!

Post 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!
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: Don't show any thing!!!

Post 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.
Post Reply