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

Export RTF fails - generates parameter is not valid

2 Answers 825 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mike Hobbs
Top achievements
Rank 1
Mike Hobbs asked on 10 Jul 2013, 05:42 PM
I've upgraded my reporting component to 7.0.13.426 already.  Noticed this issue in IE 10 with version 6.2.12.1017.  When I open a report that uses the web viewer it displays fine and exports to PDF fine, but when I attempt to export the exact same report to RTF I get an exception error.  This is happening over all our reports that render in the report viewer.

Using Visual Studio 2012 and ASP.net (Frame work version 4.0).

Web.config report settings as follows:

<Telerik.Reporting>
    <Extensions>
      <Render>
        <Extension name="IMAGE" visible="false" />
        <Extension name="RTF" visible="true" />
        <Extension name="PDF" visible="true">
          <Parameters>
            <Parameter name="FontEmbedding" value="Subset" />
          </Parameters>
        </Extension>
        <Extension name="HTML" visible="false" />
        <Extension name="MHTML" visible="false" />
        <!--Added Bug 4420 - CCM Dec 7, 2012-->
        <Extension name="XLS" visible="false">
          <Parameters>
            <Parameter name="UseNativePageHeader" value="false" />
            <Parameter name="UseNativePageFooter" value="false" />
            <Parameter name="ShowGridlines" value="true" />
          </Parameters>
        </Extension>
        <Extension name="CSV" visible="false" />
        <Extension name="XPS" visible="false" />
      </Render>
    </Extensions>
  </Telerik.Reporting>


Exception error details:

Parameter is not valid.
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 Exception Details: System.ArgumentException: Parameter is not valid.

Source Error:

 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:

 

[ArgumentException: Parameter is not valid.]
   System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) +1141401
   System.Drawing.Bitmap..ctor(Int32 width, Int32 height) +13
   Telerik.Reporting.RtfRendering.DocumentState.WriteShape(ShapeBase shapeType, IStyle style) +459
   Telerik.Reporting.RtfRendering.DocumentRtf.WriteShape(ShapeBase shapeType, IStyle style) +56
   Telerik.Reporting.Writing.ShapeItemWriter.WriteContent(DocumentWriter writer, VisualElement element, ElementPageInfo pageInfo, IPageClip pageClip) +356
   Telerik.Reporting.Writing.ContentItemWriter.Write(DocumentWriter writer, VisualElement element, ElementPageInfo pageInfo) +408
   Telerik.Reporting.Writing.ProcessingElementWriter.StartWrite(VisualElement element, ElementPageInfo pageInfo, DocumentWriter writer) +211
   Telerik.Reporting.Writing.WriteStartOperationsDispatcher.Visit(Shape shape) +99
   Telerik.Reporting.Processing.Shape.Accept(ProcessingElementVisitor visitor) +39
   Telerik.Reporting.Processing.ProcessingElementVisitor.Visit(LayoutElement element) +39
   Telerik.Reporting.Writing.WriteOperationsDispatcher.DispatchWriteOperation(VisualElement element, ElementPageInfo pageInfo) +51
   Telerik.Reporting.Writing.DocumentWriter.Telerik.Reporting.Writing.IWriter.WriteStartElement(VisualElement element, ElementPageInfo pageInfo) +56
   Telerik.Reporting.BaseRendering.PageHandler.Telerik.Reporting.Paging.IPageHandler.StartElement(VisualElement element, ElementPageInfo info) +54
   Telerik.Reporting.Paging.PageStartElement.AddToPage(IPageHandler handler) +57
   Telerik.Reporting.Paging.PageElementLayer.AddToPage(IPageHandler handler) +107
   Telerik.Reporting.Paging.PageElementManager.AddToPage(IPageHandler handler) +59
   Telerik.Reporting.Paging.PageCompositionBase.AddElementsToPage() +78
   Telerik.Reporting.Paging.PageCompositionBase.SendPhysicalPages() +57
   Telerik.Reporting.Paging.PageCompositionBase.OutputPage() +825
   Telerik.Reporting.Paging.PageCompositionBase.CreatePages() +626
   Telerik.Reporting.Paging.PagerBase.Telerik.Reporting.Paging.IPager.CreatePages(IPageHandler handler, Report report) +73
   Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) +416
   Telerik.Reporting.RtfRendering.RtfReport.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) +202
   Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 reports, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) +1407
   Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) +103
   Telerik.ReportViewer.WebForms.ReportExportOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) +140
   Telerik.ReportViewer.WebForms.ReportExportOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, Hashtable renderingContext) +207
   Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride() +384
   Telerik.ReportViewer.WebForms.HandlerOperation.PerformOperation(HttpContext context, ICacheManager cacheManager) +74
   Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context) +276
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

 

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18034 

2 Answers, 1 is accepted

Sort by
0
Mike Hobbs
Top achievements
Rank 1
answered on 11 Jul 2013, 07:58 PM
Re-constructed reports object by object and this error happens when a Shape object is present and visible on the report.  As soon as you export to RTF you get above error I pasted.  Delete these shapes off the same report and the exception goes away.
We use these on all our reports.  Is there another solution besides not using them?
0
Stef
Telerik team
answered on 16 Jul 2013, 08:50 AM
Hello Mike,

We have tested the described issue by simply placing Shape and TextBox items in a report definition, applying your settings and exporting in RTF the result under IE10. There were no exceptions with the mentioned versions and with the latest available version of Telerik Reporting Q2 2013. Thus we will appreciate if you open a support thread and provide us with runnable sample project where the issue is reproducible.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Tags
General Discussions
Asked by
Mike Hobbs
Top achievements
Rank 1
Answers by
Mike Hobbs
Top achievements
Rank 1
Stef
Telerik team
Share this question
or