Telerik Forums
Reporting Forum
8 answers
774 views
Hi to all,
i started to test telerik report system. I made a really simple report (a simple grid from an sql table of about 100 rows... without images). I added webreportviewer to my project and connected it to my report. When i test my application i can see the report preview, i can export it in RTF or CSV but i cannot export it in PDF or XLS due an out of memory exception.
I'm using it on windows azure development enviroment. My system is an updated windows 7 64 bit with 4GB of ram and visual studio 2010 pro.

This is the exception stack trace
[OutOfMemoryException: Memoria insufficiente.] 
   System.Drawing.Graphics.FromHdcInternal(IntPtr hdc) +203 
   System.Drawing.Font.ToLogFont(Object logFont) +184 
   System.Drawing.Font.ToHfont() +166 
   Telerik.Reporting.Pdf.Fonts.TrueType.FontReader.GetFontData(Font font, Boolean& isTTC) +390 
   Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(Font gdiFont) +736 
   Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(PdfFont font) +84 
   Telerik.Reporting.Pdf.PdfFontTable.GetDescriptor(PdfFont font) +399 
   Telerik.Reporting.Pdf.PdfFontDictionary..ctor(PdfDocument document, PdfFont drawingFont) +198 
   Telerik.Reporting.Pdf.PdfFontType0Dictionary..ctor(PdfDocument document, PdfFont font) +73 
   Telerik.Reporting.Pdf.PdfFontTable.GetFont(PdfFont font) +315 
   Telerik.Reporting.Pdf.PdfPageDictionary.GetFontName(PdfFont font, PdfFontDictionary& fontDictionary) +132 
   Telerik.Reporting.Pdf.Rendering.PdfRenderer.GetFontName(PdfFont font, PdfFontDictionary& fontDictionary) +101 
   Telerik.Reporting.Pdf.Rendering.PdfRendererGraphicsState.Update(PdfFont font, Brush brush, Int32 renderMode) +179 
   Telerik.Reporting.Pdf.Rendering.PdfRenderer.Update(PdfFont pdfFont, Brush brush, Int32 renderMode) +184 
   Telerik.Reporting.Pdf.Rendering.PdfRenderer.DrawString(String text, PdfFont font, Brush brush, RectangleF rect, Boolean rightToLeft) +404 
   Telerik.Reporting.Pdf.Drawing.PdfGraphics.DrawString(String s, Font font, Brush brush, RectangleF rect, StringFormat format) +303 
   Telerik.Reporting.ImageRendering.CanvasPdf.DrawStringMultiline(String s, Font font, Brush brush, RectangleF rect, StringFormat format) +954 
   Telerik.Reporting.ImageRendering.TextBox.Render() +846 
   Telerik.Reporting.ImageRendering.RenderingElement.RenderToPage(RectangleRF clip, RoundedFloat parentLeft, RoundedFloat parentTop, RoundedFloat parentReservedTop, RoundedFloat parentReservedBottom, RoundedFloat parentReservedLeft, RoundedFloat parentReservedRight) +2858 
   Telerik.Reporting.ImageRendering.RenderingElement.RenderChildren(RectangleRF clip) +473 
   Telerik.Reporting.ImageRendering.RenderingElement.RenderToPage(RectangleRF clip, RoundedFloat parentLeft, RoundedFloat parentTop, RoundedFloat parentReservedTop, RoundedFloat parentReservedBottom, RoundedFloat parentReservedLeft, RoundedFloat parentReservedRight) +3025 
   Telerik.Reporting.ImageRendering.CompositionBase.RenderPageSection(PageArea pageArea, RenderingElement pageSection, Single height) +713 
   Telerik.Reporting.ImageRendering.CompositionBase.ApplyPageSections() +405 
   Telerik.Reporting.ImageRendering.CompositionBase.SendPhysicalPages(Boolean force) +142 
   Telerik.Reporting.ImageRendering.CompositionBase.End() +145 
   Telerik.Reporting.ImageRendering.CompositionPdf.End() +262 
   Telerik.Reporting.ImageRendering.CompositionBase.Dispose(Boolean disposing) +94 
   Telerik.Reporting.ImageRendering.CompositionPdf.Dispose(Boolean disposing) +91 
   Telerik.Reporting.ImageRendering.CompositionBase.System.IDisposable.Dispose() +53 
   Telerik.Reporting.ImageRendering.ImageRendererBase.RenderReport(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) +557 
   Telerik.Reporting.ImageRendering.ImageRendererBase.Telerik.Reporting.Processing.IRenderingExtension.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) +96 
   Telerik.Reporting.Processing.ReportProcessor.Render(IList`1 reports, ExtensionInfo extensionInfo, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback) +2090 
   Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) +814 
   Telerik.ReportViewer.WebForms.ServerReport.Render(HttpResponse response, String format, Int32 pageIndex) +1390 
   Telerik.ReportViewer.WebForms.ReportExportOperation.PerformOperation(NameValueCollection urlQuery, HttpContext context) +180 
   Telerik.ReportViewer.WebForms.HttpHandler.ProcessRequest(HttpContext context) +501 
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1182 
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +230 
 

Some suggestion about to solve (or workaround) the problem?

Thanks

Sandro
Steve
Telerik team
 answered on 27 Jul 2011
1 answer
141 views
Hi,

I have 2 sub reports in one main report. Each sub report has its own sub total, however I wish to add the total of these 2 sub reports and show it at the main report.

Massimiliano Bassili
Top achievements
Rank 1
 answered on 27 Jul 2011
1 answer
52 views
I am using Reporting in WPF and had built several reports that relied upon a class and methods for custom date manipulation. Previosuly this class was in the same assembly as the reports but was moved to a new assembly that is shared amongst other projects in the sln.
In the Edit Expression window I can see the new namespace ('Shared') in the treeview but the static class within it that I need is not visible, nor (of course) are any of it's static methods.

How can I add a reference to the User Funcitons on a Report? Or what am I doing wrong that is preventing me from seeing my class?

Thanks,
John
Massimiliano Bassili
Top achievements
Rank 1
 answered on 27 Jul 2011
3 answers
94 views
I have created a self hosted WCF service that contains a single report using the instructions from:  http://www.telerik.com/help/reporting/self-hosted-telerik-reporting-wcf-service.html.

When I test the service using the url http://localhost:54321/reportservice/resources/export?format=pdf&report=ConsoleApplication1.SampleReport,ConsoleApplication1&deviceInfo={}&parameterValues={}
it generates a PDF document of my report.

I created a separate silverlight project with a ReportView control that I would like to access the report from this service.  What settings does the ReportViewer control need to view the report hosted in this WCF service?

Thanks,
Tom

Steve
Telerik team
 answered on 27 Jul 2011
1 answer
182 views
Hi Guys,

I'm evaluating Reporting 2011 Q2
Does anybody know if there is a way to pass table-valued parameter to a stored procedure?

When I'm trying to do that I'm getting the following exception thrown:

System.Data.SqlClient.SqlException (0x80131904): The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Table-valued parameter 7 ("@Hours"), row 0, column 0: Data type 0xF3 (user-defined table type) has a non-zero length database name specified.  Database name is not allowed with a table-valued parameter, only schema name and type name are valid.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
.. skipped..
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.<GetEnumerator>d__0.MoveNext()

According to comment in MSDN that could be caused by DeriveParameters method agains SqlCommandBuilder.

Indeed, the call exists in the reporting engine source code (SqlCommandProvider, ln.152):

var arguments = new[] { command };
methodInfo.Invoke(builder, arguments);

Can you please confirm the bug or suggest a right approach for passing TVP?

Regards, Maxim Tebenev.
Mobile Systems International
Ivan
Telerik team
 answered on 27 Jul 2011
0 answers
186 views
We are trying to use the new app fabric cache as a out of proc session state provider in azure.  This seems to be the only one that microsoft recommends (the table storage one has issues w/ concurancy, and the sql azure one seems to be more of a hack - that some folks have gotten working, we were able to get the site up, but could not get telerik to render our reports with it), so we decided to spend our time on the method that microsoft recomends, app fabric cache... we were able to configure it, and the site that hosts our wcf ReportServer.svc comes up without throwing any exceptions - which indicates our session state is in play.  Yet when we go to render a 3 page report, we get the following error (seen in fiddler looking at the text reply (status 500)) :

<b> Description: </b>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.

<br><br>

<b> Exception Details: </b>System.InvalidCastException: Unable to cast object of type 'System.Text.CodePageEncoding' to type 'System.Text.Encoding'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">

<tr>

<td>

<code>

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.</code>

</td>

</tr>

</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">

<tr>

<td>

<code><pre>

[InvalidCastException: Unable to cast object of type &#39;System.Text.CodePageEncoding&#39; to type &#39;System.Text.Encoding&#39;.]

ReadInternalEncoderBestFitFallbackFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] ) +648

System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context) +106

System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserializeInSharedTypeMode(XmlReaderDelegator xmlReader, Int32 declaredTypeID, Type declaredType, String name, String ns) +542

System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, String name, String ns) +109

Any one have any ideas or can anyone suggest any alternatives... as at present we are not able to scale out our reports

Deva
Top achievements
Rank 1
 asked on 26 Jul 2011
8 answers
338 views
Hi,
I am trying to connect to an Oracle Database using Devart dotConnect for Oracle.
I am able to configure the Data Source without any issues in the wizard and the Query Builder runs fine. The problem is when I  try to execute the query in the Wizard at the Preview Data Source Results I get an error dialog box only says Devart.Data.Oracle.

Thanks,
Yu
fabiopand
Top achievements
Rank 1
 answered on 26 Jul 2011
2 answers
404 views
Hey there...I have a report that I'm working on and I have a field called AssetOwner and AssetValue....this owner has a possibility of having 3 different values (Self, Spouse, Joint)

I can bind a table and display the raw values without any problems, but at the bottom of the table I want to sum up the AssetValues based on the Asset Owners...like this.


Asset Owner               Asset Type               AssetValue
--------------------------------------------------------------------
Self                            Car                                  $5000
Self                            Boat                                $1000
Spouse                      Jewelry                            $1000
-------------------------------------------------------------------
Self Asset Total:                                                $6000
Spouse Asset Total:                                          $1000
Joint Asset Total:                                                     $0   


I was trying to just do a sum(AssetValue) but I can't find out how to filter that sum for a particular AssetType.


Any help would be really appreciated.



Thanks in advance.


John Scott.
Mayank Tyagi
Top achievements
Rank 1
 answered on 26 Jul 2011
1 answer
107 views
Hello. I have added a Chart to my report that will be a Point chart. The axes both start at 0 and go to 6. For some reason, the 0 on the x-axis is indented about 1/3 inch from the origin. (and points with 0 for X are indented 1/3 inch) What property/setting can I change to make 0 be at the origin like it is with the Y origin?

Thanks,
Justin
Justin Lee
Top achievements
Rank 1
 answered on 26 Jul 2011
1 answer
347 views
Hello,

We have created one report in telerik reporting and provided facility to export report in PDF and Excel format.
Used Code :
byte[] buffer = Telerik.Reporting.Processing.ReportProcessor.Render(chkPDF.Checked ? "PDF" : "XLS", form, null, out mimType, out extension, out encoding);

PDF file and Excel file display data. But Excel file giving an error
File Error. Some number formats may have been lost

See screen shot of error.
Peter
Telerik team
 answered on 26 Jul 2011
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?