This is a migrated thread and some comments may be shown as answers.

Silverlight Report - Parameters not loading at first time or "Report is unavailable or session has expired." error

3 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mariusz
Top achievements
Rank 1
Mariusz asked on 04 Jul 2011, 04:04 PM
Hello,

Parameters are not loading at first time or ReportViewer presents a "Report is unavailable or session has expired." error message. After pressing the "Refresh report" button report is always presented correctly.

It happens like once per several tries, but still and it is unacceptable in a business solution. 

Raport is generated dynamically, and all parameters are passed from ViewModel in this way:

 
private void RenderReportMethod(RenderBeginEventArgs rbea)<br>
        {
            if (rbea != null)
            {
                rbea.ParameterValues["Number"] = Invoice.Number;
               
                .....(other parameters).....
            }
        }


We've already changed the default HTTPBinding settings in the ReportViewer

ReportServiceClient IReportServiceClientFactory.Create(System.Uri remoteAddress)
        {
            var binding = new BasicHttpBinding()
            {
                MaxBufferSize = int.MaxValue,
                MaxReceivedMessageSize = int.MaxValue,
                ReceiveTimeout = new TimeSpan(0, 15, 0),
                SendTimeout = new TimeSpan(0, 15, 0)
            };

            var endpointAddress = new EndpointAddress(remoteAddress);

            return new ReportServiceClient(binding, endpointAddress);

        }


and in the webconfig where the ReportService is placed as well:

<bindings>
      <basicHttpBinding>
        <binding maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxStringContentLength="2147483647"/>
        </binding>
      </basicHttpBinding>
    </bindings>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
      <services>
        <service
                name="Telerik.Reporting.Service.ReportService"
                behaviorConfiguration="ReportServiceBehavior">
          <endpoint
                 address=""
                 binding="basicHttpBinding"
                 contract="Telerik.Reporting.Service.IReportService">
            <identity>
              <dns value="localhost" />
            </identity>
          </endpoint>
          <endpoint
                  address="resources"
                  binding="webHttpBinding"
                  behaviorConfiguration="WebBehavior"
                  contract="Telerik.Reporting.Service.IResourceService"/>
          <endpoint
                  address="mex"
                  binding="mexHttpBinding"
                  contract="IMetadataExchange" />
        </service>
      </services>


however the problem still exists.

Any ideas?

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 06 Jul 2011, 03:55 PM
Hello Rafal,

Based on the code snippets we are not sure what is the root of the issue you are experiencing. Thus we will appreciate if you open a support thread and send us a sample runnable project that exhibits the issue to debug locally. Additionally our suggestion is to check the VS Output windows for any unhandled exceptions.

Kind regards,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Mariusz
Top achievements
Rank 1
answered on 07 Jul 2011, 10:44 AM

*** ProcessReport #0 STARTED ***
 
A first chance exception of type 'System.NullReferenceException' occurred in B2B.Reporting.DLL
*** ReportProcessor.Render STARTED ***
 

This is what we see on output window, when

"Report is unavailable or session has expired." error

shows up.

When the second problem occurs, there are no exceptions on the output. Only exception (nullpointerexception) is caught in

private void Invoice_ItemDataBinding(object sender, EventArgs e)
{
}

when we try to use parameters, that are not set (why are they not set?).

At this time, we have no time to provide sample project with the discussed issue.

Is there a way to determine in ReportViewer if the report is loaded properly and if not then refresh it - what would bypass the problem, or to call "refresh method" from the report itself?

On the other hand, are there any other options to set, that could make the report/reportviewer wait for parameters a bit longer?
0
Peter
Telerik team
answered on 12 Jul 2011, 05:46 PM
Hello Rafal,

Based on the provided information we are not sure what is the root of the issue. Thus we will highly appreciate if you open a support thread and send us the problematic project to debug locally.

All the best,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
General Discussions
Asked by
Mariusz
Top achievements
Rank 1
Answers by
Peter
Telerik team
Mariusz
Top achievements
Rank 1
Share this question
or