Telerik Forums
Reporting Forum
3 answers
446 views

Hi All,

I have a .Net Core + AngularJS project using Kendo UI. And now I want to use Telerik Reporting for reports. But I'm facing an issue with the integration. When I include the  javascript file : ReportViewer/js/telerikReportViewer.kendo-11.1.17.614.min.js, the existing application is not working anymore. The existing application is using kendo.all.min.js version : v2017.1.330.

 

Thanks,

Stef
Telerik team
 answered on 29 Jun 2017
2 answers
203 views

I just right click on the report table in visual studio report designer and choose insert column.
It's just a blank column, with no logic.
When i run the report, it throw the following exception:

"message":"","exceptionMessage":"Object reference not set to an instance of an object.",

"exceptionType":"Telerik.Reporting.Services.Engine.DocumentRenderException","stackTrace":"
at Telerik.Reporting.Services.Engine.Document.GetDocumentInfo()
at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetDocumentInfo(String clientID, String instanceID, String documentID) in c:\\temp\\reporting\\RBuild-28199\\Reporting_Build\\Source\\Code\\Telerik.Reporting.Services.WebApi\\ReportsControllerBase.cs:line 291
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
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.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeUsingResultConverterAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown --

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.ApiController.<InvokeActionWithExceptionFilters>d__1.MoveNext()"}

This exception just throw to web client and visual studio debugger and intellitrace can't record it.
I can see that there are some files have written in the report folder on the hard disk drive.
After removing that column from my report, everything work fine.
Can anyone explain why this happen and how can i fix this?

Katia
Telerik team
 answered on 29 Jun 2017
3 answers
720 views

Hello Telerik team!

I have a simple wpf report where there are detail section and report header. When report had been generated, an empty space appeared between them. I've tried to change this behavior by moving header items to detail section or by creating a sub report from detail section items. Also I've tried to set KeepTogether option in false condition where it was possible in detail section, but it had no effect.

If I use preview mode, everything is fine. I've colored every element in the report to see whether it grew up or not. But all of them seem to be fine. What can I do to avoid this problem? I've attached some screenshots with the report.

I will really appreciate if you can help me to figure this behavior out.

Stef
Telerik team
 answered on 29 Jun 2017
1 answer
260 views

Reporting 8.1.14.804

Using HTML Viewer, implemented reporting api and report renders perfectly.  In the api I am using a customreportresolver so I can pass url parameters that control the report sorting and filtering.

After the report initially renders if I hit refresh the first time I get an error:

 

    Error creating report document (Report = ItemReport?key=12345&sortBy=0&allDates=true&ReportTitle=it works!; Format = HTML5Interactive):

    Report instance with ID '082320-e65f' not found.

 

A second click of refresh renders the report correctly with no error.

Tracing through the custom resolver shows it executes without an error on the refresh request.

The report controller:

        Protected Overrides Function CreateReportResolver() As Telerik.Reporting.Services.Engine.IReportResolver
            Return New CustomReportResolver
        End Function

The custom resolver:

    Public Function Resolve(reportId As String) As Telerik.Reporting.ReportSource Implements Telerik.Reporting.Services.Engine.IReportResolver.Resolve
        Dim theReport = reportId.Substring(0, reportId.IndexOf("?"))
        Dim rpt As Object = Nothing
        Select Case theReport
            Case "ItemReport"
                rpt = New Reports.ItemReport
        End Select
        Dim queryString As String = reportId.Substring(reportId.IndexOf("?") + 1)
        Dim params As NameValueCollection = HttpUtility.ParseQueryString(queryString)
        For Each k As String In params
            rpt.ReportParameters(k).Value = params(k)
        Next
        Dim sb As New StringBuilder
        Using xmlWriter As System.Xml.XmlWriter = System.Xml.XmlWriter.Create(sb)
            Dim xmlSerializer As New Telerik.Reporting.XmlSerialization.ReportXmlSerializer()
            xmlSerializer.Serialize(xmlWriter, rpt)
        End Using
        Dim reportSource As New Telerik.Reporting.XmlReportSource()
        reportSource.Xml = sb.ToString
        Return reportSource
    End Function

 


Stef
Telerik team
 answered on 29 Jun 2017
4 answers
400 views

Hi,

I want to convert the rendering of one field when exporting to HTML from just text to an HTML Input tag, is that possible?

Thanks,

Scott

Scott Waye
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 28 Jun 2017
1 answer
306 views

Hi, we are developing a asp.net mvc application and we are using the Telerik Reporting and HTML5 Viewer (and javascript). Everything works fine when we use our "trdp" or "trdx" report files on the file system and we get the report on the page access a database and showing some data. 

Now, we are changing how we store the files on the system and we are going to a cloud storage environtment where all files will be on the cloud, including the trpd report files. It also could be stored on the database. We are using the InstanceReportSource to get the report object as byte array (from cloud or database) like this:

// get the stream for trdp report file
var reportStream = GetReportStreamFromCloud(...);
 
var reportDocument = (Telerik.Reporting.Report) reportPackager.UnpackageDocument(reportStream);
 
// check for subReports to replace it dynamically (code bellow here..)
 
var instanceReport = new InstanceReportSource() {ReportDocument = reportDocument};
 
return instanceReport;


It works fine when it is a simple report without subReports. The problem is when we have subReports and we try to set it dynamically as a byte array using InstanceReportSource and this SubReport has parameters (independently if it comes from main Data Source or from main Report Parameters). The code bellow is how we set the subReport:

foreach (var sections in reportDocument.Items.Where(x => x is DetailSection || x is GroupSection))
{
    foreach (var item in sections.Items.Where(x => x is SubReport))
    {      
        var subReport = (SubReport) item;                       
 
        // get the Stream for trdp subreport file.
        var subReportStream = GetReportStreamFromCloud(...);
         
        // unpack the report Stream
        var subReportDocument = (Telerik.Reporting.Report) reportPackager.UnpackageDocument(subReportStream);
 
        var instanceSubReport = new InstanceReportSource() {ReportDocument = subReportDocument};
         
        subReport.ReportSource = instanceSubReport;
    }
}

How can we pass the parameters to the subReport dynamically?

Thank you.

Stef
Telerik team
 answered on 28 Jun 2017
2 answers
352 views
Hello, i'm trying to show a graph in a report made in Visual Studio 2015, so far i'm able to show the graph (see attached picture), but i'm unable to change the spacing between the bars, i tried using the SpacingSlotCount property but it doesn't work because everything is inside the same category, and when i try to sort them in different categories the bars are just too thin. can you tell me what i'm doing wrong here?
Jairo Reyes
Top achievements
Rank 2
 answered on 28 Jun 2017
1 answer
119 views

I have installed "TELERIK_VERSION = "9.1.15.624" but missing Telerik Reporting Menu in Visual Community edition.

 

 

Stef
Telerik team
 answered on 28 Jun 2017
43 answers
6.3K+ views
3 questions in 1.

1 - I have a report with 3 sections.  A ReportHeader, a DetailSection and a ReportFooter.

The ReportHeader is a fixed height.  The ReportFooter is a fixed height.

The DetailSection can vary enormously depending on the data.

I need to set up the report so the ReportHeader is always at the top of the report and the ReportFooter is always at the very bottom of the last page of the report.  This means leaving white space if the detail section only covers part of the page.

I want to be able to access some information in my code but the objects don't seem to give me what I need.

2 - How do I get the number of pages in a rendered report?

3 - How do I get the height of a section of the report AFTER it has been rendered?

Thanks.
Stef
Telerik team
 answered on 27 Jun 2017
3 answers
288 views

 

Hi,

I am experiencing an issue with the MVC version of the ReportViewer control when attempting to utilise Events RenderingBegin and RenderingEnd.

The goal is to addClass to $('status') called icon-pulse that flashes a cog icon on the screen while the report renders, and returns back to solid colour when rendering finishes by removing the class.

The report is triggered via Ajax button call to replace the VisionReportDiv on the page with the following view code:

<VisionReport.cshtml>

@model Company.Trims.Hub2.Models.ViewModels.VisionViewModel

<script src="@Url.Content("~/ReportViewer/js/kendo.subset.2015.3.930.min.js")"></script>
<script src="@Url.Content("~/ReportViewer/js/telerikReportViewer-9.2.15.1126.min.js")"></script>

@if (Model.VisionReportSource != null)

    @(Html.TelerikReporting().ReportViewer()
            .Id("reportViewer1")
            .ServiceUrl(Url.Content("~/api/reports/"))
            .ReportSource(Model.VisionReportSource)
            .ViewMode(ViewMode.PrintPreview)
            .ScaleMode(ScaleMode.FitPage)
            .Scale(1.0)
            .PersistSession(false)
            .PrintMode(PrintMode.AutoSelect)
                .ClientEvents(ce => ce
                    .RenderingBegin("RenderingBegins")
                    .RenderingEnd("RenderingEnds"))
    )
}
else
{
    @Html.Partial("Homepage")
}

<script>

    $(document).ready(function () {
        $('#reportViewer1').height($(window).height() - ($('#vision-title-bar').height() + 16));
    });

    $(window).resize(function () {
        $('#reportViewer1').height($(window).height() - ($('#vision-title-bar').height() + 16));
    });

    function RenderingBegins() {
        $('#status').addClass('icon-pulse');
    };

    function RenderingEnds() {
        $('#status').removeClass('icon-pulse');
    };

</script>

 

The Model.VisionReportSource is of type TypeReportSource that is loaded via a class library as follows:

Model.VisionReportSource = new TypeReportSource() { TypeName = typeof(MyReport).AssemblyQualifiedName };

 

If I comment out the ClientEvents section from the reportViewer1 declaration, repeat pressing the ajax button works without issue.  After adding the ClientEvents centre back in (as above) - then it runs for the first call, but subsequent calls fail with the message:

jquery-1.9.1.min.js:5 Uncaught RangeError: Maximum call stack size exceeded at Function.isPlainObject (jquery.min.js:3) at Function.b.extend.b.fn.extend (jquery.min.js:3) at Function.b.extend.b.fn.extend (jquery.min.js:3) at Function.b.extend.b.fn.extend (jquery.min.js:3) at Function.b.extend.b.fn.extend (jquery.min.js:3) at Function.b.extend.b.fn.extend (jquery.min.js:3) at Function.b.extend.b.fn.extend (jquery.min.js:3) at Function.b.extend.b.fn.extend (jquery.min.js:3) at Function.b.extend.b.fn.extend (jquery.min.js:3) at Function.b.extend.b.fn.extend (jquery.min.js:3)

and the reportviewer dissapears from the page...  I'm not understanding why subscribing to the two Rendering functions to add remove a Class to $('#status') is causing this issue???  Anyone else experienced this issue?  Or does anyone have a good example of how to use the ClientEvents - I've looked pretty much everywhere and can't find a decent example.

Thanks in advance.

 

Stef
Telerik team
 answered on 27 Jun 2017
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?