Telerik Forums
Reporting Forum
1 answer
770 views

Hi 

I'm using HTML5 report viewer.

According to the following post I should be able to retrieve the current report parameters using this code:

var viewer = $("#reportViewer1").data("telerik_ReportViewer");
 var currentParams = viewer.reportSource().parameters;

 

This method seems to return the last submitted values parameters only and not the 'current' values. For example the default start and end date parameter values in my report depend on another report-type parameter. This works well displaying the required default values in the parameter window. However the code above doesn't return these current values unless the values are actually submitted with "Preview".

Can you suggest a work around to retrieve the current displayed values of each parameter even before they are submitted to Telerik reporting. I already have custom editors and I could attach my own code to monitor the current values - but is there a better recommended way? 

Thanks in advance.

Ian

Todor
Telerik team
 answered on 26 Sep 2018
1 answer
524 views

I am looking for different options to use report viewer in Reactjs Component. Please help if somebody has implemented the same.

 

Silviya
Telerik team
 answered on 26 Sep 2018
6 answers
2.3K+ views
Hi,

I`m using Html Report viewer (R2 2016) integrated in a web application.
I`m experiencing the following problem:

When the application is published (to test or production environment) sometimes the report viewer seems to fail rendering the reports (this does not happen on my Dev environment).
It does not happen all the time, it just happens sometimes.
When the problem occurs the viewer seems to send never ending requests to the Report API controller with the following signature:
~/api/reports/clients/085352-e708/instances/083615-c3d7/documents/085412-2b2a085412-5cbd/info which result with the following json response:
{
"documentReady":false,
"pageCount":0,
"documentMapAvailable":false,
"bookmarkNodes":null
}
No errors, no timeouts just this same json returned saying "documentReady":false.
Once this happens the only way to stop these requests is:
-Restart iis
-Refresh browser
-Delete report viewer cache directory.

If for example I click back button and open the report again, it may be rendered but the requests from the old report continue running.
I`m not sure if the caching behavior has something to do with this but we are using File storage cache with changed default cache directory from "C:\Windows\temp" to internal directory for the Reports web application that is hosted in IIS.
This is the ReportServiceConfiguration object:

new Telerik.Reporting.Services.ReportServiceConfiguration
{
HostAppId = ...,
ReportResolver = ...,
Storage = new FileStorage(HttpContext.Current.Server.MapPath("~/Reports")),
ReportSharingTimeout = 0,
ClientSessionTimeout = 15,
};

I`m attaching a screenshot demonstrating the requests from Google Chrome.

I spent some time investigating the problem with enabled system diagnostics trace listener for the Reporting API.
I observed the following in the log:
If the report is rendered successfully, then the log is just filled with some performance metrics information:
*** ReportProcessor.ProcessReport STARTED ***
*** ProcessReport #0 STARTED ***
*** ReportProcessor.ProcessReport STARTED ***
*** ProcessReport #0 STARTED ***
*** ProcessReport #0 DONE in 00:00:00.5807344 ***
*** ReportProcessor.ProcessReport DONE in 00:00:00.5903065 ***
...

If some error occurs for some reason (bad query, data conversion error, data source discovery/connection problems) it is indicated in the log and the report is rendered showing the error to the user, which is ok:
...
An exception has occurred while processing 'table1' item:
System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting date and/or time from character string.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   ...

There are though other errors that occur (for unknown reasons) that don`t seem to stop report from being executed, resulting in endless requests that were previously described.
I managed to catch two of these errors without any explanation why and when they happen (the same report with the same input parameters sometimes fails and sometimes not):

1.
...
An error has occurred while rendering the report: System.Threading.ThreadAbortException: Thread was being aborted.
   at Microsoft.Win32.Win32Native.CreateDirectory(String path, SECURITY_ATTRIBUTES lpSecurityAttributes)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   at Telerik.Reporting.Cache.File.FileCache.Write(String key, Byte[] bytes)
   at Telerik.Reporting.Cache.CacheStorage.SetBytes(String key, Byte[] value)
   at Telerik.Reporting.Services.Engine.DocumentResources.AddResource(RenderingResource resource)
   at Telerik.Reporting.Services.Engine.Document.AddResource(RenderingResource s)
   at Telerik.Reporting.Services.Engine.RenderingStream.Finish()
   at Telerik.Reporting.Html5Rendering.Writers.ContentOnlyPage.WritePageStyles(String css)
   at Telerik.Reporting.Html5Rendering.Writers.PageBase.WriteEndPage()
   at Telerik.Reporting.Paging.PageCompositionBase.SendPhysicalPages()
   at Telerik.Reporting.Paging.PageCompositionBase.OutputPage()
   at Telerik.Reporting.Paging.PageCompositionBase.CreatePages()
   at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
*** RenderReport #0 DONE in 00:00:00.3681450 ***

2.
...
*** RenderReport #0 STARTED ***
An error has occurred while rendering the report: System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Delegate.DelegateConstruct(Object target, IntPtr slot)
   at Telerik.Reporting.Processing.ElementTreeHelper.GetFirstDescendantsOfType[T](LayoutElement element)
   at Telerik.Reporting.Paging.PagerBase.ResetBookmarkPages(ProcessingElement element)
   at Telerik.Reporting.Paging.PagerBase.ResetBookmarkPages(ProcessingElement element)
   at Telerik.Reporting.Paging.PagerBase.Telerik.Reporting.Paging.IPager.CreatePages(IPageHandler handler, Report report)
   at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
*** RenderReport #0 DONE in 00:00:00.7007492 ***

An error has occurred while rendering the report: System.Threading.ThreadAbortException: Thread was being aborted.
   at Telerik.Reporting.Html5Rendering.CssStyleBuilder.AddBackgroundDeclarations(LayoutElement element)
   at Telerik.Reporting.Html5Rendering.CssStyleBuilder.AddCssStyleFromProcessingElement(LayoutElement element, ElementPageInfo pageInfo)
   at Telerik.Reporting.Html5Rendering.Writers.Html.Element.Begin(LayoutElement element, ElementPageInfo pageInfo)
   at Telerik.Reporting.Html5Rendering.Writers.Report.WriteStartElement(LayoutElement element, ElementPageInfo pageInfo)
   at Telerik.Reporting.Paging.PageElementLayer.AddToPage(IPageHandler handler)
   at Telerik.Reporting.Paging.PageElementManager.AddToPage(IPageHandler handler)
   at Telerik.Reporting.Paging.PageCompositionBase.SendPhysicalPages()
   at Telerik.Reporting.Paging.PageCompositionBase.OutputPage()
   at Telerik.Reporting.Paging.PageCompositionBase.CreatePages()
   at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
*** RenderReport #0 DONE in 00:00:00.7177329 ***



Is there any explanation of this behavior, how can I troubleshoot the reason behind it?
Sainand
Top achievements
Rank 1
 answered on 25 Sep 2018
3 answers
346 views
Is there a way to fix the total width of the cross-tab to force completing the columns in the same line instead of completing them in another page ?

Silviya
Telerik team
 answered on 25 Sep 2018
1 answer
139 views

My report is used crosstab wizard.How can I fix this UI inconvenience? My problem is in the following attachment file.

Thank !!!

Silviya
Telerik team
 answered on 25 Sep 2018
0 answers
74 views

HI,

       I'm facing an issue on Telerik reporting while rendering into word(DOCX). My generated docx file table 1st cell name has been disappearing ...Not only one table. Every table 1st cell Name has disappered.. Why? 

  I don't know? can some one help

A.p.kumar
Top achievements
Rank 1
 asked on 24 Sep 2018
12 answers
895 views

Hi,

We are trying to use HTML5 Report viewer in Angular 2 and Typescript. We are able to render report with hard coded parameters. Now we need to dynamically pass parameters both key and value.

 

ngAfterViewInit() {

 var reportViewer = jQuery("#reportViewer1");
        if (reportViewer) {
            telerik_ReportViewer({
                serviceUrl: this.baseUrl,
                templateUrl: this.templateUrl,
                reportSource: {
                    report: "test.testreport,report",
                    parameters: {
                        "p1": 1,
                        "p2": 2,
                        "p3": "head"
                    }
                }
            });
         }

}

Instead of hard coded p1,p2, p3 we want to read key value pair from array and assign both key and value to  parameters.

We are unable to get how to assign parameters dynamically. Please guide us. We are not able to find a sample which does this.

 

Bashir
Top achievements
Rank 1
 answered on 22 Sep 2018
8 answers
510 views
I've followed the steps on this link http://www.telerik.com/help/reporting/advanced-creating-multi-column-reports.html
I tried in VS2010 and Telerik Report Designer.

But I keep getting only one column report.

I've also tried with a simple report, just listing some codes and I've got the same issue.

Attached all the screenshots of design and preview.

Thanks,
Ezequiel
Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
 answered on 21 Sep 2018
6 answers
730 views

I am getting the following message

 

"Can not start the wizard. Consider restarting Visual Studio. DesignerHost is null."

 

I have restarted over and over again, including rebooting my machine.

 

Any help

Thanks.

Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
 answered on 21 Sep 2018
1 answer
321 views

Hello, we are (ab)using reports to design printable documents, and we're having an issue with printing multiple reports on a page.

Normally, printing works fine, however when a certain field is long enough to create a new line, the size of the item gets increased, causing report items to get bumped to a new page. See attached image for the report item, which fits 6 to a 8.5x11 page in landscape mode.

What I'd like to happen is that items near marker #2 expand to take up the space up till the grid at marker #1, whereas right now any new line in the items at marker #2 will simply cause the entire report to be longer. I've attached a second image showing the actual printed result. If the third item weren't a line longer, there would be 3 more items on that page.

Todor
Telerik team
 answered on 21 Sep 2018
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?