Page 1 of 1

Reports.Net report no data in .Web WebViewer

Posted: Sat Feb 23, 2013 4:13 pm
by fuhrj
I have a bunch of reports that were created using the Reports.Net designer.

I had switched out the Reports.Net web viewer in my web project with the latest Reports.Web web viewer. The reports are no longer fetching the data.

However, if I pull the reports in the Reports.Web designer, they work fine. It's only in the web viewer where they are not working.

I dynamically assign the database at the report's run-time. Could this be the reason?

Code: Select all

StiReport report = new StiReport();
report.Load(reportFilename);

StiSqlDatabase db = (StiSqlDatabase)report.Dictionary.Databases[0];
db.ConnectionString = connString;

report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(db);

webViewer.Report = report;
Any ideas?

Re: Reports.Net report no data in .Web WebViewer

Posted: Mon Feb 25, 2013 12:54 pm
by HighAley
Hello.

Please, try to use the GetReportData event to register data.

Thank you.

Re: Reports.Net report no data in .Web WebViewer

Posted: Mon Feb 25, 2013 3:09 pm
by fuhrj
Unfortunately this did not work.

I should mention that the report contains a Form to allow the user to select a date range. Are there differences between the Reports.Web and Reports.Net on how they handle this? I noticed that if I click on the date picker button, I get an error about datepicker not found.

Code in the Click Event of the form

Code: Select all

ReportData.Parameters["@startDate"].ParameterValue = startDate.Value.ToString("MM/dd/yyyy");
ReportData.Parameters["@endDate"].ParameterValue = endDate.Value.ToString("MM/dd/yyyy");

ReportData.Connect();
Is there a way to debug the report in Visual Studio at Run-Time to see what values are getting passed to SQL?

Re: Reports.Net report no data in .Web WebViewer

Posted: Tue Feb 26, 2013 10:59 am
by Alex K.
Hello,

You can save report as .cs file and add it to you project for debug.

Thank you.