Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I turn on Logging for Telerik Reports?
    primarykey
    data
    text
    <p>I have a Telerik Report project which is throwing a NullReferenceException somewhere in the <code>ReportProcessor.RenderReport("PDF", reportToExport, null);</code> method. I get the following stacktrace:</p> <pre><code>System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Reporting.Processing.Table.MeasureColumns(Graphics graphics) at Telerik.Reporting.Processing.Table.Measure(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.ProcessingElement.MeasureElement(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.ProcessingElement.Measure(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.ReportSectionBase.Measure(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.ProcessingElement.MeasureElement(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.Group.MeasureElement(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.Report.MeasureElement(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.ProcessingElement.Measure(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.ProcessingElement.MeasureElement(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.ProcessingElement.Measure(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.ReportSectionBase.Measure(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.ProcessingElement.MeasureElement(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.Group.MeasureElement(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.Report.MeasureElement(MeasureDirection dir, Graphics graphics) at Telerik.Reporting.Processing.Report.MeasureElement(ProcessingElement elementToMeasure) at Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRender(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRenderStateless(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo) at JIIGCAL.CareerCompass.Reports.Views.ReportsDefault.ExportToPDF(IReportDocument reportToExport) in C:\dev\.....\Reports\Viewer.aspx.cs:line 236 </code></pre> <p>Line 236 in Viewer.aspx.cs is the call to RenderReport(); I have no idea how to track this error down. Is there a way to enable logging for the runtime report engine so I can get some more info on which field/column/table is the offending one?</p> <p><strong>Edit: Solution Found</strong></p> <p>Received the following response from Telerik:</p> <blockquote> <p>Such an error can occur if you have a textbox in a Table cell which has zero set for Size. Changing the size from zero to a very small value would resolve the problem. Note that setting row/column groups to zero size sets them Visible=false, which is not supported. Due to the data driven nature of the CrossTab/Table, when you want to hide some data, you need to filter the CrossTab groups instead of hiding them.</p> </blockquote> <p>I was setting a couple of text boxes to Visible=false based on certain conditions. I changed this and it worked perfectly. </p> <p>As far as getting a result for how to log the internal runtime engine they gave this advice:</p> <blockquote> <p>The standard way to enable any .NET application to output some logs is to use Trace Listeners. For example you can add TextWriterTraceListener to the configuration file of your application:</p> <pre><code>&lt;configuration&gt; &lt;system.diagnostics&gt; &lt;trace autoflush="false" indentsize="4"&gt; &lt;listeners&gt; &lt;add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="TextWriterOutput.log" /&gt; &lt;remove name="Default" /&gt; &lt;/listeners&gt; &lt;/trace&gt; &lt;/system.diagnostics&gt; &lt;/configuration&gt; </code></pre> <p>We use the same approach in our reporting engine. You can see some of the tracing we do in the Visual Studio output window and you can also download the product source code for reference.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload