Error in paging a report

Stimulsoft Reports.WEB discussion
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Error in paging a report

Post by MikeD »


Never mind...I think I found it...Thanks
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Error in paging a report

Post by Andrew »

Ok! Thank you.
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Error in paging a report

Post by MikeD »


There's still something not right with the paging controls.

The report goes blank in the following situations:

. On any report (even very small reports (2-5 pages)).....If I click on the View "Whole Page"...then back to View "One Page"...

. Report is run..immediately after the first page is rendered....If I click the Next page button....the report goes blank.
I then close the report and reload the report...and it seems to work fine.

. Sometimes the report goes blank while paging through the report. But the next time the report is loaded..it seems to work fine.


I've set the timout to be 20 minutes. This all happens within 2 minutes of running the report. So pretty sure the report isn't timing out.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Error in paging a report

Post by Vladimir »

Hello, Mike

We tested the WebViewer locally and on our server and found no errors. We attached an archive with the test project to this message. Also, this project is available on our server at http://web.stimulsoft.com/Test3.aspx

Please let us know if you are able to reproduce the error on this project?

Also you can use WebViewerFx, if it is suitable for you. It uses other methods to work with reports.

Thank you.
Attachments
431.SampleProject.zip
(292.61 KiB) Downloaded 402 times
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Error in paging a report

Post by MikeD »

I could NOT get Test3 to fail.

So what am I doing wrong.

Here's my code.

ds = ReportHelper.Instance.GetDataSetForReports(stiReport, reportFilters);

// ----------------------------------------------------------------------------------------------------------
// Assign returned data from dataset into the report and display it.
// ----------------------------------------------------------------------------------------------------------

stiReport.Compile();
stiReport.RegData(ds);
stiReport.Render();

ReportWebViewer.Report = stiReport;

The ONLY thing I see different is the amount of data per record...but it's not much.

I can NOT get yours to fail no matter what I do...but I can get mine to fail within 10 seconds.....Any Ideas.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Error in paging a report

Post by Vladimir »

Hello, Mike

Have you tried to run our test project on your server? If, in this case, error does not occur, please send us your report and data for it, that we would reproduce this situation.

Thank you.
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Error in paging a report

Post by MikeD »


I finally had time to get the project to work on my server.

And it works just fine....No problems...could NOT get it to have any paging problems.

So why am I having the problem. I looked at your code...and it's very simple.

I have no idea why I'm still getting the paging problem.
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Error in paging a report

Post by MikeD »


Been playing with this for a while.


Here is what I've done to trace what is happening.


First using the project you sent me...if I wait a while (10 minutes or more) then click one of the page controls....I get the same problem....


I took the webpage default.aspx and brought that into our project. Using your exact same code....I get the same problem after about 10-20 seconds.

I looked at the IIS log and a 401 error is being generated (not sure if it's related).

Now the funny part....When the report disappears....if I press the F5 key....the report comes back and I then start paging again.

Below is the code for the webpage.


using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Inmagic.Mercury.WebApps.Mercury.Reports
{
public partial class NewAdhocReportViewer : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
string appDirectory = "c:/Sample Project/WebViewer/"; ;

DataSet data = new DataSet();
data.ReadXml(appDirectory + "Data/Demo.xml");
data.ReadXmlSchema(appDirectory + "Data/Demo.xsd");

Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();

report.Load(appDirectory + "Reports/TwoSimpleLists.mrt");
report.RegData(data);

StiWebViewer1.Report = report;
}

}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{

}
#endregion

}
}
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Error in paging a report

Post by Vladimir »

Hello, Mike
First using the project you sent me...if I wait a while (10 minutes or more) then click one of the page controls....I get the same problem....
That's right. By default, the time of storing the rendered report in the server cache is 10 minutes.
I looked at the IIS log and a 401 error is being generated (not sure if it's related).
Error 401 is related to authorization of the user (client browser) on the server. Do you use a secured connection?


Also, try to set the property:

Code: Select all

RenderMode="UseCache"

Thank you.
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Error in paging a report

Post by MikeD »

The 401 error was actually a false error. So ignore it.

I cleared out the log...and ran the test again..got the same problem, but no 401 error showed up. In fact no error showed. All that was logged was code 200 (success).


I tried setting the RenderMode, but getting the same problem.


Couple of things.

RenderMode is NOT a string. To set RenderMode I used the following line.

ReportWebViewer.RenderMode = Stimulsoft.Report.Web.StiRenderMode.UseCache;

Second...I was told earlier to set the property on the aspx page to RenderMode="AjaxWithCache"

In code I then changed it to the following line.

ReportWebViewer.RenderMode = Stimulsoft.Report.Web.StiRenderMode.AjaxWithCache;

And getting the same problem.


Another developer I work with things it's a session problem. That the view control is loosing session state.

Are you using cookies to keep track of session??

We're grasping at straws here.



Post Reply