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

Generic error with larger search

3 Answers 137 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 17 Nov 2010, 06:10 PM
Hello, I am using the Q3 reportviewer for Silverlight.  Everything is working perfectly except when I run a search with over ~2000 results, then I get the generic error message (after the "Rendering Report" gif is shown for a few seconds): 

An exception occurred during the operation, making the result invalid.  Check InnerException for exception details.

The data being returned is all the same, I just created the same dummy row 10k times in SQL for testing, so the issue is not related to the actually data being returned since it's the same row over and over wether I do 10 rows or 10k rows.  I am running in debug and stepped thru the code but I don't see where the exception is being thrown.  I also don't see any errors in the output window.  Please give me some tips on how to troubleshoot this.  Thank You!

*** ReportProcessor.Render STARTED ***
  
*** ReportProcessor.GetRenderer STARTED ***
*** ReportProcessor.GetRenderer DONE in 00:00:00.0000538 ***
  
  
*** ProcessReport #0 STARTED ***
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'
The thread '<No Name>' (0x438) has exited with code 0 (0x0).
The thread '<No Name>' (0x8b8) has exited with code 0 (0x0).
The thread '<No Name>' (0xe98) has exited with code 0 (0x0).
Step into: Stepping over non-user code 'Telerik.Reporting.Report.OnNeedDataSource'
Step into: Stepping over non-user code 'Telerik.Reporting.Report.RaiseNeedDataSource'
Step into: Stepping over non-user code 'Telerik.Reporting.Processing.Report.ProcessItem'
  
*** Report Processing STARTED ***
The thread '<No Name>' (0xc30) has exited with code 0 (0x0).
*** Report Processing DONE in 00:00:26.7407743 ***
  
Step into: Stepping over non-user code 'Telerik.Reporting.Processing.ReportItemBase.Process'
  
*** Measure Report (Horizontal) STARTED ***
*** Measure Report (Horizontal) DONE in 00:00:00.7892036 ***
  
  
*** Measure Report (Vertical) STARTED ***
*** Measure Report (Vertical) DONE in 00:00:03.2704319 ***
  
Step into: Stepping over non-user code 'Telerik.Reporting.Processing.ReportProcessor.ProcessReport'
*** ProcessReport #0 DONE in 00:01:06.8485122 ***
  
Step into: Stepping over non-user code 'Telerik.Reporting.Processing.ReportProcessor.RenderReport'
  
*** RenderReport #0 STARTED ***
  
*** RENDER PAGES STARTED ***
The thread '<No Name>' (0x2c4) has exited with code 0 (0x0).
The thread '<No Name>' (0xc78) has exited with code 0 (0x0).
The thread '<No Name>' (0xb58) has exited with code 0 (0x0).
The thread '<No Name>' (0xc40) has exited with code 0 (0x0).
The thread '<No Name>' (0x380) has exited with code 0 (0x0).
The thread '<No Name>' (0xfbc) has exited with code 0 (0x0).
*** RENDER PAGES DONE in 00:01:17.7396142 ***
  
*** RenderReport #0 DONE in 00:01:17.8194642 ***
  
*** ReportProcessor.Render DONE in 00:02:24.8822662 ***
  
Step into: Stepping over non-user code 'Telerik.Reporting.Service.RenderingProxy.RenderInternal'
Step into: Stepping over non-user code 'Telerik.Reporting.Service.RenderingProxy.ThreadFunc'
The thread '<No Name>' (0x404) has exited with code 0 (0x0).
The thread '<No Name>' (0xd8) has exited with code 0 (0x0).

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 23 Nov 2010, 03:09 PM
Hello Kjell,

The report service might sometimes generate an output message that exceeds the default maximum size quota of 65535 characters. To correct this you should specify a larger value for the MaxBufferSize and the MaxReceivedMessageSize properties of the BasicHttpBinding object as shown in the following code snippet:
Copy Code
ReportServiceClient IReportServiceClientFactory.Create(Uri remoteAddress)
{
    BasicHttpBinding binding = new BasicHttpBinding();
    binding.ReceiveTimeout = new TimeSpan(0, 5, 0);
    binding.SendTimeout = new TimeSpan(0, 5, 0);
    binding.OpenTimeout = new TimeSpan(0, 5, 0);
    binding.CloseTimeout = new TimeSpan(0, 5, 0);
    binding.MaxBufferSize = int.MaxValue;
    binding.MaxReceivedMessageSize = int.MaxValue;
    EndpointAddress endpointAddress = new EndpointAddress(remoteAddress);
  
    return new ReportServiceClient(binding, endpointAddress);
}

These attributes can be altered directly in the web.config as well.

I hope this helps to resolve your problem.

Sincerely yours,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Kjell
Top achievements
Rank 1
answered on 23 Nov 2010, 05:44 PM
<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <!-- Create a custom binding for our service to enable sending large amount of data -->
            <binding name="MyBasicHttpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
                <readerQuotas 
                maxDepth="64"
                maxStringContentLength="2147483647"
                maxArrayLength="2147483647"
                maxBytesPerRead="4096"                    
                maxNameTableCharCount="16384"
                  />                     
            </binding>
        </basicHttpBinding>
        <customBinding>
            <binding name="wsSilver.customBinding0" sendTimeout="00:10:00">
                <binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647" maxSessionSize="2147483647">
                    <readerQuotas
                    maxDepth="64"
                    maxStringContentLength="2147483647"
                    maxArrayLength="2147483647"
                    maxBytesPerRead="4096"
                    maxNameTableCharCount="16384"
                      />
                </binaryMessageEncoding>                    
                <httpTransport />                             
            </binding>
        </customBinding>
    </bindings>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
        multipleSiteBindingsEnabled="true" />
    <behaviors>
        <endpointBehaviors>
            <behavior name="WebBehavior">
                <webHttp />
                <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
            </behavior>
        </endpointBehaviors>
        <serviceBehaviors>
            <behavior name="ReportServiceBehavior">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
                <dataContractSerializer maxItemsInObjectGraph="2147483647" />
            </behavior>
            <behavior name="">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
                <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <services>
        <service behaviorConfiguration="ReportServiceBehavior" name="Telerik.Reporting.Service.ReportService">
            <endpoint address="" binding="basicHttpBinding" contract="Telerik.Reporting.Service.IReportService">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
            <endpoint address="resources" behaviorConfiguration="WebBehavior"
                binding="webHttpBinding" contract="Telerik.Reporting.Service.IResourceService" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        </service>
        <service name="wsSilver">
            <endpoint address="" binding="customBinding" bindingConfiguration="wsSilver.customBinding0" 
                contract="wsSilver" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        </service>
    </services>
    
</system.serviceModel>
I think I am already doing this in the web.config.
0
Steve
Telerik team
answered on 26 Nov 2010, 05:33 PM
Hi Kjell,

Try setting the Timeout attributes as well and enable CLR exceptions in VS to see if that would yield more info.

All the best,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Kjell
Top achievements
Rank 1
Answers by
Steve
Telerik team
Kjell
Top achievements
Rank 1
Share this question
or