Telerik Forums
Reporting Forum
4 answers
456 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
321 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
384 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
135 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.7K+ 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
334 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
4 answers
127 views

Hi there!

The situation is in the following.

On report load, before it loads finally, there are two inaccuracies.

First, by some reason, in report appears two strange boxes. It looks like one is for menu and other is for content. But in my final report there is nor menu neither separate content box.

[look at 1.png]

Second, when data have been loaded, on rendering all text became bold. After few seconds everything becomes normal.

[look at 2.png]

Final version of report looks like that:

[look at 3.png]

So, my question is in the following: how to prevent report to display two unnecessary boxes and how to stop report to make all text bold, when report loading?

Thanks for help.

Андрей
Top achievements
Rank 1
 answered on 26 Jun 2017
1 answer
121 views
We allow users to create their own check templates.  For example, they can enter X and Y coordinates in inches to specify where items (such as check number, check date, amount, and memo) should appear on the check.  These items are dynamically created at runtime and added to the detail section of the report.

Now, we want to add a signature image.  The problem is that when they specify where to put the signature, the PictureBox pushes the other items to the right.  Is there a setting that will allow the PictureBox to essentially overlap columns and not push them to the right?

Or, if there’s a better way to go about this, please let me know.
Stef
Telerik team
 answered on 26 Jun 2017
1 answer
425 views

I've got a report where I display a company name and logo at the top of a report. 

The requirement is to be able to hide the company name and logo for printing on pre-printed company stationary which already comes with the above. 

Another requirement is to be able to hide columns on the fly. Example: The first column of my report contains staff photos. The user would like to be able to hide the column by clicking on a checkbox in the parameter panel to hide the photo column. 

Is it possible to do the above in the HTML Telerik report viewer? And if it is possible, how can I do it?

Thanks. 

 

Stef
Telerik team
 answered on 23 Jun 2017
4 answers
139 views

We have many Telerik MVC Reporting reports developed in Visual Studio 2015 (VS15). Earlier today, I installed VS17 and opened the solution. Then I reverted to VS15, and my reports will no longer open. Clicking on the buttons that normally open them has no effect whatsoever - nothing happens. However - I published to a test server, and the reports ran fine from there - so it's something to do with my PC. I have tried the following:

1. rebooting the PC

2. running the Telerik Reporting repair from the Telerik Control Panel

3. deleting the entire solution from my PC, and then getting it back from source control

It looks as though something on my PC has been changed by the VS17 install - any idea what it could possibly be?

Stef
Telerik team
 answered on 23 Jun 2017
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?