in

Prologika Forums

Business Intelligence to the Masses
Latest post 05-26-2008 8:43 AM by tlachev. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-26-2008 3:53 AM

    Render error using cumstom controls

     Hi,

    We have a solution where we from a Windows application (using the report viewer control SP1) display some reports. Some of the reports uses a custom report item to display some graphics. This works fine on a lot of different installations, but now (for some reason) we have a problem at one customer.

     

    We get strange GDI and transport errors when rendering these reports:

     

    "Unable to read data from the transport connection: The connection was closed."

     

    or

     

    "Remote GDI stream version: 10.0.1. Expected version 10.0.1. Offset and length were out of bounds for the array or count is greater than the number of elements from the index to the end of the source collection."

     

    These report work fine when you run them in the browser, but they never work in the report viewer control...

     

    The custom controls render images like this:

     

    public ChangeType Process()
    {
       ...
       MemoryStream stream = new MemoryStream();
       Bitmap bmp = new Bitmap(imageWidth, imageHeight, PixelFormat.Format32bppArgb);
       Graphics graphics = Graphics.FromImage(bmp);
       
       // Draw on graphics objects done here
       ...


       bmp.Save(stream, ImageFormat.Bmp);

       // Rewind image stream
       stream.Position = 0;

       // Create a new RS image object
       image = new Microsoft.ReportingServices.ReportRendering.Image(cri.Name, cri.ID);
       image.MIMEType = "image/bmp";

       // serialize the image stream into the RS image
       image.ImageData = stream.ToArray();
       image.Sizing = Microsoft.ReportingServices.ReportRendering.Image.Sizings.FitProportional;
      
       return ChangeType.None;
    }

    Please provide some help. What could be the course of the problem here?

     

    Kind Regards

    Sune

  • 05-26-2008 8:43 AM In reply to

    Re: Render error using cumstom controls

    I suggest:

    1. Obtain a detail log from the RS trace file C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles. It will tell you which report gave the error and the detail error stack. You may be able to obtain the failed report and the passed parameters from the RS ExecutionLogStorage table in the ReportServer database.

    2. Once you know the request details, create a test harness that isolates the issue. Debug your CRI to see where it's failing. If you believe that this is not an issue with your code, file a support case with Microsoft and send them the test harness you created.

Page 1 of 1 (2 items)
Copyright © 2005 Prologika, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems