Telerik Forums
Reporting Forum
4 answers
2.0K+ views

(Test carried out using the BarcodeTypes demo report)

On my development machine, all export formats work fine.

When deployed to Azure, some formats work, some don't:

_ PDF, CSV, XLS, Tiff & MHTML all work fine

_ XLSX, PowerPoint, RTF and Word all give the same GDI+ error

I have found other instances of GDI+ errors on the forum (related to PictureBox, PDF export, ...) but this seems to be a different type of exception

 

I am aware of Report Export issues on Azure with cheap plans, and have upgraded to a higher plan (Basic); PDF export didn't work on cheaper plan and that works now, so I assume this is an unrelated issue.

Error message:

w3wp.exe Error: 0 : An error occurred while rendering the report in separate thread: System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
   at System.Drawing.Imaging.Metafile..ctor(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, String desc)
   at System.Drawing.Imaging.Metafile..ctor(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type)
   at Telerik.Reporting.Processing.Imaging.ImageUtils.CreateMetafileCore(Size sizePx) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\Processing\Imaging\ImageUtils.Full.cs:line 105
   at Telerik.Reporting.Processing.Imaging.ImageUtils.CreateMetafileImage(SizeF sizeMm) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\Processing\Imaging\ImageUtils.Full.cs:line 91
   at Telerik.Reporting.Processing.Imaging.MetafileImageFactory.CreateImage(SizeF sizeMm) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\Processing\Imaging\ImageFactory.cs:line 26
   at Telerik.Reporting.ExcelRendering.Barcode.RenderInternal(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\Barcode.cs:line 21
   at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\RenderingItem.cs:line 364
   at Telerik.Reporting.ExcelRendering.RenderingItemContainer.RenderInternal(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\RenderingItemContainer.cs:line 108
   at Telerik.Reporting.ExcelRendering.Table.RenderInternal(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\Table.cs:line 31
   at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\RenderingItem.cs:line 364
   at Telerik.Reporting.ExcelRendering.RenderingItemContainer.RenderInternal(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\RenderingItemContainer.cs:line 108
   at Telerik.Reporting.ExcelRendering.Section.RenderInternal(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\Section.cs:line 26
   at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\RenderingItem.cs:line 364
   at Telerik.Reporting.ExcelRendering.Group.RenderInternal(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\Group.cs:line 47
   at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\RenderingItem.cs:line 364
   at Telerik.Reporting.ExcelRendering.RenderingItemContainer.RenderInternal(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\RenderingItemContainer.cs:line 108
   at Telerik.Reporting.ExcelRendering.Report.RenderInternal(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\Report.cs:line 202
   at Telerik.Reporting.ExcelRendering.RenderingItem.Render(IWorksheet worksheet, RenderingContext context) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\RenderingItem.cs:line 364
   at Telerik.Reporting.ExcelRendering.Report.Render(IWorkbook workbook) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\ExcelRendering\Report.cs:line 137
   at Telerik.Reporting.OpenXmlRendering.Spreadsheet.SpreadsheetReport.Telerik.Reporting.Processing.IRenderingExtension.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting.OpenXmlRendering\Spreadsheet\SpreadsheetReport.cs:line 40
   at Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 processingReports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\Processing.ReportProcessor\ReportProcessor.RenderReport.cs:line 236
   at Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\Processing.ReportProcessor\ReportProcessor.RenderReport.cs:line 157
   at Telerik.Reporting.Services.Engine.ReportRenderer.Render(ReportRendererArgs args) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\Services.Engine\ReportRenderer.cs:line 40
   at Telerik.Reporting.Services.Engine.Rendering.RenderWithCulture(ReportRendererArgs args) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\Services.Engine\Rendering.cs:line 152
   at Telerik.Reporting.Services.Engine.Rendering.ThreadFunc(Object o) in c:\temp\reporting\RBuild-23266\Reporting_Build\Source\Code\Telerik.Reporting\Services.Engine\Rendering.cs:line 120

 

 

Any hep would be greatly appreciated,

 

Erik

Jordan
Top achievements
Rank 1
Iron
 answered on 21 Nov 2021
0 answers
288 views

Hi,

I am trying to Implement the RedisStorage in my application which uses Telerik Reporting but doesn't seem to get any hold of it. Can anyone please help me how to use it.

1 answer
2.0K+ views

I found some bits of code from long ago but still can't figure it out.

Any up to date clear code You could give me ?  I am using Angular/.NET core 5.0.

I am putting the report in the wwwroot and setting to copy always so the report seems to be there. The report has no parameters.

 

I get the error below


   [HttpGet]
        //https://localhost:44374/reports/testreport
        public string TestReport()
        {
            string webRootPath = _webHostEnvironment.WebRootPath;

            var rptName = Path.Combine(webRootPath, "Reports\\AllForms.trdp");
            var report = new Telerik.Reporting.Report { DocumentName = rptName };
            var instanceReportSource = new InstanceReportSource { ReportDocument = report };

            var reportProcessor = new ReportProcessor();
            var result = reportProcessor.RenderReport("PDF", instanceReportSource, new Hashtable());

            return "xxx";
        }

 

The current data set presented in the report did not produce any significant content, so no pages were generated. If you need to see the whole report content, including blank pages, please contact the report author.

Dimitar
Telerik team
 answered on 18 Nov 2021
1 answer
171 views

Hello,

We have a dynamic report book we create for one of our reports. It has been working for several years. 

We just implemented load balancing and had to change our "ReportServiceConfiguration" to use MsSqlServerStorage instead of FileStorage. That works for all of the other reports except for this report book.

When you run the reportbook it behave strangely, sometimes it will display a few pages, other times it will get an error "index out of range exception". It is as if something is cached and it gets confused when switching servers. 

We are using ASP.NET MVC.

Any suggestions?

Todor
Telerik team
 answered on 15 Nov 2021
1 answer
86 views

Hi,

I've set reportHeaderSection.Visible to false.  The contents of the page are blank but the reportHeaderSection still remains as a blank page.

How do I hide the entire section to remove the blank reportHeaderSection page?

Please reply to mrogers@sabreindustries.com.  Our login is a general email address which will not be sent to me.

Thank you for your help.

Mark Rogers

Sabre Industries, LLC.

Neli
Telerik team
 answered on 11 Nov 2021
1 answer
112 views

Hi guys,

I currently have a problem with the PageCount in a very specific situation.

I have a Report made in the Visual Studio Designer. This Report has a different Subreport based on a Parameter.
This Report is in a ReportBook in these variants with different parameters.

And this ReportBook is displayed in a ReportViewer.

Now the PageCount isn't always correct.
With always I mean, some versions of the Report have the correct number, some don't.

If the Report is not in the Book, the PageCount is correct.
If I try the same with a ReportBook in the Standalone Designer, it is also correct.

The PageNumberingStyle is set to ResetNumberingAndCount, so that can't be any problem.

Since it's a big C# project with Database connections, it's hard to give the whole code and just some snippets aren't relly informative.

But has anyone any idea what could help or how I could count the pages without the build in function?

Greetings Benedikt

Benedikt
Top achievements
Rank 4
Iron
Iron
Iron
 answered on 10 Nov 2021
0 answers
226 views

I'm using HTML5 Webforms Report Viewer, and I want to create multiple instances of the same report using the ReportBook. Here are my codes:

var myReportSource = new Telerik.ReportViewer.Html5.WebForms.ReportSource();

myReportSource.IdentifierType = IdentifierType.TypeReportSource;

myReportSource.Identifier = typeof(myReport).AssemblyQualifiedName;

ReportBook reportBook = new ReportBook();

for (int i=0; i < jsonObject.Count; i++)

{

        reportBook.Reports.Add(new MyReport());

        reportBook.Reports[i].ReportParameters["Field"].Value = jsonObject[i]["Field"];

}

ReportViewer.ReportSource = myReportSource;

Question:

1. How do I assign the Report Book to the report source, then to be assigned to the report viewer? 

2. How do I set the "Mergeable" property to "false" for the report parameters?

Note: 

I have tried the approach from https://www.telerik.com/forums/two-of-same-report-in-one-reportbook-different-parameters, but I got an error "Cannot Implicitly Convert type InstanceReportSource to Html5.WebForms.ReportSource

Adrian
Top achievements
Rank 1
 updated question on 05 Nov 2021
1 answer
959 views

   I'm having a problem using the Telerik Reporting WPF ReportViewer control.  I'm using Visual Studio 2017 v15.9.38 along with Telerik UI for WPF and Telerik Reporting v 15.2.21.915 (latest version).  My application is targeting .NET 4.5.2.

   In my application, I need to allow users to generate printed documents from system objects.  For example, a Purchase Order.  The user creates the Purchase Order, then needs to print it.  I'm trying to use Telerik Reporting to do this, much like other applications use embedded Crystal Reports.

   My application stores the reports as a byte array/varbinary in an MSSQL database.  To test, I copied the sample Invoice report, and removed all data sources and everything except a simple line of text and image to make sure it renders.  Later on I plan on adding data sources and binding those to internal system objects.  My application handles the uploading of the report document and pulls it from the database and generates a Telerik.Reporting.InstanceReportSource before showing it.

        Dim rsTelerik As New Telerik.Reporting.InstanceReportSource
        Dim rPack As New Telerik.Reporting.ReportPackager

            rsTelerik.ReportDocument = rPack.UnpackageDocument(New MemoryStream(MyByteArray))

   This all seems to work fine.  To display the report I have a custom control that hosts the Telerik ReportViewer and passes the ReportSource via DataBinding with a DependencyProperty.  I've made it extremely simple just to test things.

<base:TBaseUserControl

             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:tr="http://schemas.telerik.com/wpf" 
             xmlns:localcontrols="clr-namespace:Redstone.Controls"
             xmlns:base="clr-namespace:Redstone.Controls"
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="400"
        >

    <tr:ReportViewer x:Name="rptViewer" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type base:CtrlTelerikReportBinding}}}">
        <tr:ReportViewer.ReportSource>
            <Reporting:InstanceReportSource x:Name="rsInstance"/>
        </tr:ReportViewer.ReportSource>
    </tr:ReportViewer>
</base:TBaseUserControl>

   However the Visual Studio designer shows the ReportViewer control as a completely blank and transparent object.  See attached screenshot.  I've verified that I have references to both Telerik.Reporting and Telerik.ReportViewer.Wpf, and I verified that the References are set to copy local.  I dragged and dropped the report control to let it create the references.  I also verified that my Application.xaml has the Resource Dictionaries:

        <ResourceDictionary x:Key="keuUI">
            <ResourceDictionary.MergedDictionaries>
                <ui:ThemeResources />
                <ui:XamlControlsResources />
                <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/System.Windows.xaml" />
                <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/Telerik.Windows.Controls.xaml" />
                <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/Telerik.Windows.Controls.Input.xaml" />
                <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/Telerik.Windows.Controls.Navigation.xaml" />
                <ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Fluent/Telerik.ReportViewer.Wpf.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

   Both the VS designer and my application show the control as completely blank and transparent.  See attached screenshot from the application.  I tried uninstalling and re-installing the Telerik Reporting module, but still have the same issue.  I get information in the Output window about the control loading and some warnings about a Telerik XML package, but no errors.  I'm guessing that this is some kind of error with the References or DLLs since the designer won't show the control either.  Any suggestions?

Dimitar
Telerik team
 answered on 05 Nov 2021
2 answers
177 views

I want to remove these space when column ends next column should start and cut text for other page please tell me solution

Todor
Telerik team
 answered on 05 Nov 2021
0 answers
96 views
Hello, I am new to telerik, could you help me, I have several reports with a .cs extension, how can I view them in a ReportViewer
n/a
Top achievements
Rank 1
 asked on 03 Nov 2021
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?