Report Forms with the WebViewer

Stimulsoft Reports.NET discussion
Post Reply
BrentB
Posts: 2
Joined: Sun Jun 10, 2007 1:39 pm
Location: Canada

Report Forms with the WebViewer

Post by BrentB »

Hi,

I am wondering if there is any secret to making forms work properly in the web viewer. I've done a simple example where a form containing an Ok button is pressed to show a report. When previewing in normal "Windows Forms" mode, this works fine. However, when attempting to view the report in an ASP.NET page, I can't get the form to process correctly. The form will render correctly as the first "page", and clicking Ok will show the report viewer on the next "page" -- however the report viewer doesn't show anything, as if there is no report loaded.

What are the correct steps to do this? I imagine that I'm missing some serialization things that I need to do? Here's the only code that I have:

Code: Select all

protected void Page_Load(object sender, EventArgs e)
{
  //if (WebViewer.IsImageRequest) return;
  if (!IsPostBack)
    StiWebViewer1.Report = StiReportViewer1.GetReport();
}
Thanks!
BrentB
Posts: 2
Joined: Sun Jun 10, 2007 1:39 pm
Location: Canada

Report Forms with the WebViewer

Post by BrentB »

If only I was a little more patient, I found the fix. :shame:

You just need to set the UseCache property of the web viewer to "True"! Note that I found what may be a small bug: when you get this working, the first time you click the "Next Page" button on the report nothing happens. If you press it again, it works as expected (and each time after that).
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Report Forms with the WebViewer

Post by Vital »

UseCache = true is condition to correct work forms in web. For also you can't render report in PageLoad event of page. You need use other event.

Thank you.
Post Reply