Telerik Forums
Reporting Forum
2 answers
112 views

I'm trying to programically at runtime add a new group works, but when i try to add a header row the report returns and error. Is there something wrong i'm doing in the code in the attached picture?

 

This is the error i get...

Internal Server Error
Telerik.Reporting.Services.Engine.DocumentRenderException: Object reference not set to an instance of an object. at Telerik.Reporting.Services.Engine.Document.GetDocumentInfo() at Telerik.Reporting.Services.Engine.ReportEngine.GetDocumentInfo(String clientID, String instanceID, String documentID) at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetDocumentInfo(String clientID, String instanceID, String documentID) in c:\temp\reporting\RBuild-6690\Reporting_Build\Source\Code\Telerik.Reporting.Services.WebApi\ReportsControllerBase.cs:line 287 at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Tracing.ITraceWriterExtensions.d__18`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Tracing.ITraceWriterExtensions.d__18`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Controllers.ExceptionFilterResult.d__0.MoveNext()

 

Nasko
Telerik team
 answered on 25 May 2016
15 answers
1.2K+ views
Hi Guys
There are many threads on here about the reporting + azure = outofmemory issues but none seem to have a solution.

Our situation, we have been using our site for a few years now and it's worked fine until we deployed it to Windows Azure Websites.
Each time we generate a pdf report (approx 30-40kb) we get the following exception.

Out of memory. STACK TRACE: at System.Drawing.Font.ToLogFont(Object logFont) at System.Drawing.Font.ToHfont() at Telerik.Reporting.Pdf.Fonts.TrueType.FontReader.GetFontData(Font font, Boolean& isTTC) at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(Font gdiFont) at Telerik.Reporting.Pdf.PdfFontDictionary..ctor(PdfDocument document, PdfFont drawingFont) at Telerik.Reporting.Pdf.PdfFontType0Dictionary..ctor(PdfDocument document, PdfFont font) at Telerik.Reporting.Pdf.PdfPageDictionary.GetFontName(PdfFont font, PdfFontDictionary& fontDictionary) at Telerik.Reporting.Pdf.Rendering.PdfRendererGraphicsState.Update(PdfFont font, Brush brush, Int32 renderMode) at Telerik.Reporting.Pdf.Rendering.PdfRenderer.Update(PdfFont pdfFont, Brush brush, Int32 renderMode) at Telerik.Reporting.Pdf.Rendering.PdfRenderer.DrawString(String text, PdfFont font, Brush brush, RectangleF rect, Boolean rightToLeft) at Telerik.Reporting.Pdf.Drawing.PdfGraphics.DrawString(String s, Font font, Brush brush, RectangleF rect, StringFormat format) at Telerik.Reporting.ImageRendering.CanvasPdf.DrawStringMultiline(String s, Font font, Brush brush, RectangleF rect, Single lineHeight, StringFormat format) at Telerik.Reporting.ImageRendering.DocumentBase.WriteText(String text, RectangleF bounds, Single lineHeight, IStyle style, StringFormat format) at Telerik.Reporting.Writing.TextBoxWriter.Write(DocumentWriter writer, ProcessingElement element, ElementPageInfo pageInfo, IPageClip pageClip) at Telerik.Reporting.Writing.ProcessingElementWriter.StartWrite(ProcessingElement element, ElementPageInfo pageInfo, DocumentWriter writer) at Telerik.Reporting.Processing.ProcessingElementVisitor.Visit(ProcessingElement element) at Telerik.Reporting.Paging.PageElementLayer.AddToPage(IPageHandler handler) at Telerik.Reporting.Paging.PageElementManager.AddToPage(IPageHandler handler) at Telerik.Reporting.Paging.PageComposition.SendPhysicalPages(Boolean lastPage) at Telerik.Reporting.Paging.PageComposition.PageOverride() at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) at Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, 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)

We have purchased priority support with Azure to help us with this issue, noting that it hasn't been happening on our previous host.
They concluded that this was a telerik issue, since the azure sites run in Full Trust by default.
We are using .NET4.5 framework with Telerik Reporting Q3 2011 SP1 (5.3.12.119)

Has this issue been identified and is there now a solution?
p3mek
Top achievements
Rank 1
 answered on 25 May 2016
11 answers
933 views
Hello,

I would like to know if it is possible to convert the HTML render of an ASPX page to a PDF fil with the Telerik Reporting DLL ?

Is there something which can take an URL and transform it to a PDF document ?

Thank you for help...
Stef
Telerik team
 answered on 25 May 2016
1 answer
516 views
Hi guys,

I am using Telerik Reporting R2 2016 and I need to create a query in a SqlDataSource which has a IN operator that should use an parameter. For sample, I have list of IDs (Supplier Id) that will be passed into the report and I need to apply it using the IN operator on the dataSource. How can I do it on Telerik Report?

I tried to configure a query on the SqlDataSource like this:

select s.* from suppliers s where s.Id in (:Ids)

And after that I tried to run by Telerik Report Design and keep the :Ids parameter as string, int32 or object does not work. I fiil up the parameter like 1,2,3 (separated by comma) but I get an Oracle exception saying it is not a valid number. How can I define a string parameter on the report and pass it to the report?

(i will use it on a asp.net mvc using the javascript/html5 telerik reporting viewer).

Thank you.
Stef
Telerik team
 answered on 25 May 2016
1 answer
91 views
How do I disable the clickable datapointlabel that's added and shown in the report viewer. I don't need the labels to be shown and interactive.
Katia
Telerik team
 answered on 24 May 2016
3 answers
156 views

I am trying to add toggle visibility functionality in my telerik reports. The telerik report version which I'm using is Q3 2014.

In my report, I have two groups, and a detail section. 

Group1: catalog number

Group2: date

I have read the documentation for it, and when I set, it's not working. I think I'm making some mistake but I don't know where I'm going wrong.

Can someone please provide a demo code or solution to me.
Nasko
Telerik team
 answered on 24 May 2016
1 answer
462 views

Hi,

I'm trying to pass a parameter to a Telerik report that is expecting a DateTime parameter from javascript. My code is this:

$("#reportViewer")
            .telerik_ReportViewer({
                serviceUrl: "/api/reports/",
                templateUrl: "/src/vendor/ReportViewer/templates/telerikReportViewerTemplate.html",
                reportSource: {
                    report: "MyFullyQualified assembly name",
                    parameters: {
                        sessionId: "b57c7405-5d1d-4513-841c-4c7b2015d376",
                        otherId: "8e44c09d-771e-453c-83e9-1723faaed2fd",
                        periodEnd: "2015-06-30"
                    }
                }
            });

As you can see the periodEnd is currently represented as a string in javascript. Looking at my Chrome dev tools, it looks like it's failing because the string containing the periodEnd is not being parsed as a .Net DateTime. I've also tried passing a javascript date object i.e. new Date("2015-06-30") with the same result.

The exception message I'm getting is: "Missing or invalid parameter value. Please input valid data for all parameters."

The Telerik API response to /api/reports/clients/2334-etc is as follows. You can see that the value for periodEnd is null even though I am specifying it.

[{"name":"sessionId","type":"System.String","text":"sessionId","multivalue":false,"allowNull":false,"allowBlank":false,"isVisible":false,"autoRefresh":false,"hasChildParameters":false,"childParameters":null,"availableValues":null,"value":"b57c7405-5d1d-4513-841c-4c7b2015d376","id":"sessionId","label":"b57c7405-5d1d-4513-841c-4c7b2015d376"},

{"name":"otherId","type":"System.String","text":"otherId","multivalue":false,"allowNull":false,"allowBlank":false,"isVisible":false,"autoRefresh":false,"hasChildParameters":false,"childParameters":null,"availableValues":null,"value":"8e44c09d-771e-453c-83e9-1723faaed2fd","id":"otherId","label":"8e44c09d-771e-453c-83e9-1723faaed2fd"},

{"name":"periodEnd","type":"System.DateTime","text":"periodEnd","multivalue":false,"allowNull":false,"allowBlank":false,"isVisible":false,"autoRefresh":false,"hasChildParameters":false,"childParameters":null,"availableValues":null,"value":null,"id":"periodEnd","label":null}]

Any help is much appreciated,

Ciaran O'Neill

Ciaran
Top achievements
Rank 1
 answered on 22 May 2016
1 answer
156 views
Hi i am having a issue where on preview of data everything loooks ok but on but on the actual report in csv their are three blank lines appearing. I have shown an example of the report here. In my screen shots below i provide my excel file the actually query window result and designer that shows no way that extra blank columns are being created.
Katia
Telerik team
 answered on 20 May 2016
3 answers
278 views
When we deploy our application to production the reports work fine for a period of time. Then the reports stop working and we get an "Object not set to a reference" error when trying to load any report. If we redeploy then the error goes away (for a period of time).

We are using Telerik Reporting v7.1.13.612 in an MVC4 web application running on Windows Server 2008 with IIS7 (Integrated Mode). The bin folder contains the assemblies Telerik.Reporting.dll and Telerik.ReportViewer.WebForms.dll (both v7.1.13.612) and the application pool has Read rights to both files.

Exception information:
    Exception type: NullReferenceException
    Exception message: Object reference not set to an instance of an object.
   at Telerik.Reporting.Processing.DocumentParametersManager`1.CreateManagers(IReportDocument definition)
   at Telerik.Reporting.Processing.DocumentParametersManager`1..ctor(IReportDocument definition)
   at Telerik.ReportViewer.WebForms.ReportRenderOperation.ProcessReport(ReportSource reportSource, Hashtable deviceInfo, IRenderingContext renderingContext)
   at Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride()
   at Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperationOverride()
   at Telerik.ReportViewer.WebForms.HandlerOperation.PerformOperation(HttpContext context, ICacheManager cacheManager)
   at Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)







 
Victor
Top achievements
Rank 1
 answered on 20 May 2016
20 answers
1.1K+ views
I'm using the ReportViewer control in the context of an MVC app, and have it setup as per an example that was provided on these forums, just like below.

This all works just great, until I deploy the application to production. When I access the application through its deployed URL, I get a yellow screen of death (although, it works if I log on to the web server locally). On the web server, the following log entry has been produced:
Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 24/09/2012 17:53:02 
Event time (UTC): 24/09/2012 17:53:02 
Event ID: 1b93729293e4496bb55489a6a5febb04 
Event sequence: 333 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1/ROOT/JobSystem.Mvc.csproj_deploy-1-129929735681023175 
    Trust level: Full 
    Application Virtual Path: /JobSystem.Mvc.csproj_deploy 
    Application Path: C:\inetpub\wwwroot\JobSystem.Mvc.csproj_deploy\ 
    Machine name: AMAZONA-NN5G6SK 
 
Process information: 
    Process ID: 3876 
    Process name: w3wp.exe 
    Account name: IIS APPPOOL\DefaultAppPool 
 
Exception information: 
    Exception type: NullReferenceException 
    Exception message: Object reference not set to an instance of an object.
   at Telerik.ReportViewer.WebForms.ViewerState.get_CurrentPage() in c:\temp\reporting\@RBuild-28250\Reporting_Build\Net20\Telerik.ReportViewer.WebForms\ViewerState.cs:line 123
   at Telerik.ReportViewer.WebForms.ReportPageOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, Hashtable renderingContext) in c:\temp\reporting\@RBuild-28250\Reporting_Build\Net20\Telerik.ReportViewer.WebForms\ReportPageOperation.cs:line 69
   at Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride() in c:\temp\reporting\@RBuild-28250\Reporting_Build\Net20\Telerik.ReportViewer.WebForms\ReportRenderOperation.cs:line 79
   at Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context) in c:\temp\reporting\@RBuild-28250\Reporting_Build\Net20\Telerik.ReportViewer.WebForms\HttpHandler.cs:line 191
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
 
Request information: 
    Request URL: http://development.intertekjobsys.com/JobSystem.Mvc.csproj_deploy/Telerik.ReportViewer.axd?instanceID=52255353489a40518fb367501fb9e5b7&optype=Report&PageIndex=0&RenderID=2722cd64754447ab82f6da5f52745be7&RenderingFormat=HTMLInteractive 
    Request path: /JobSystem.Mvc.csproj_deploy/Telerik.ReportViewer.axd 
    User host address: 10.248.22.26 
    User: admin@intertek.com 
    Is authenticated: True 
    Authentication Type: Forms 
    Thread account name: IIS APPPOOL\DefaultAppPool 
 
Thread information: 
    Thread ID: 10 
    Thread account name: IIS APPPOOL\DefaultAppPool 
    Is impersonating: False 
    Stack trace:    at Telerik.ReportViewer.WebForms.ViewerState.get_CurrentPage() in c:\temp\reporting\@RBuild-28250\Reporting_Build\Net20\Telerik.ReportViewer.WebForms\ViewerState.cs:line 123
   at Telerik.ReportViewer.WebForms.ReportPageOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, Hashtable renderingContext) in c:\temp\reporting\@RBuild-28250\Reporting_Build\Net20\Telerik.ReportViewer.WebForms\ReportPageOperation.cs:line 69
   at Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride() in c:\temp\reporting\@RBuild-28250\Reporting_Build\Net20\Telerik.ReportViewer.WebForms\ReportRenderOperation.cs:line 79
   at Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context) in c:\temp\reporting\@RBuild-28250\Reporting_Build\Net20\Telerik.ReportViewer.WebForms\HttpHandler.cs:line 191
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
Any ideas at all? This is virtually the last thing that I need to get working before I can put the app into production.

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Guid>" %>
<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
    Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>
<%@ Register Assembly="Telerik.Reporting, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
    Namespace="Telerik.Reporting" TagPrefix="telerik" %>
<%@ Import Namespace="System.Web.Mvc" %>
<%@ Import Namespace="JobSystem.BusinessLogic.Services" %>
<%@ Import Namespace="JobSystem.Reporting.Data.NHibernate" %>
 
<!DOCTYPE html>
<html>
<head runat="server">
    <title>Consignment Note</title>
</head>
<body>
    <form id="main" method="post" action="">
        <telerik:ReportViewer ID="ReportViewer1" Width="100%" Height="800px" runat="server">
        </telerik:ReportViewer>
    </form>
    <script runat="server">
        public override void VerifyRenderingInServerForm(Control control)
        {
            //To avoid the server form (<form runat="server">) requirement
            //base.VerifyRenderingInServerForm(control);
        }
 
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            var dataSource = new Telerik.Reporting.ObjectDataSource();
            dataSource.DataSource = typeof(NHibernateConsignmentReportDataProvider);
            dataSource.DataMember = "GetConsignmentReportData";
            dataSource.Parameters.Add(new Telerik.Reporting.ObjectDataSourceParameter("consignmentId", typeof(Guid), Model));
            var companyDetailsService = DependencyResolver.Current.GetService<CompanyDetailsService>();
            var report = new JobSystem.Reporting.ReportDefinitions.TelerikConsignmentReport();
            var company = companyDetailsService.GetCompany();
            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(company.DefaultCultureCode);
            var logo = companyDetailsService.GetCompanyLogo();
            var pageWidth = report.Width.Value;
            report.MainLogo.Value = logo;
            report.DataSource = dataSource;
 
            var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
            instanceReportSource.ReportDocument = report;
            ReportViewer1.ReportSource = instanceReportSource;
        }
    </script>
</body>
</html>

The web.config like so:
<system.web>
<httpHandlers>
            <add type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" validate="true" />
        </httpHandlers>
<system.web>
<system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true" />
        <handlers>
            <add name="Telerik.ReportViewer.axd_*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" preCondition="integratedMode" />
        </handlers>
    </system.webServer>
Stef
Telerik team
 answered on 20 May 2016
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?