I have a Web Api project with Telerik reporting, and a client Angular site that hosts the reportviewer.
The reports are triggered by a button on the angular app, which opens a new window which hosts the reportviewer,
The initial call to the report Web Api works as expected, the data is read from the database using an object datasource and the report is displayed.
If I then change the values in the database and click the browser refresh button, or the button that fired the report, I get the report with the old values being displayed. I have also tried modifying the report by adding new labels, recompiling the Wep Api project and refreshing, but I still get the old report showing.
If I click the refresh button on the report viewer, the report is refreshed correctly.
I initially thought this may have something tho do with the ReportsController in the Web Api as described in this thread, but I have the same symptoms irrespective of whether I override CreateCache with a File case or a database cache, or override CreateStorage with a MsSqlServerStorage.
I ran a Fiddler trace and noticed that when I clicked the report button a second time (or clicked the browser refresh button) the call to
GET /api/reports/clients/114416-a7b5/instances/112216-ebd8/documents/113600-3f1a113600-57c1/info returned
{
"documentReady"
:
true
,
"pageCount"
: 1,
"documentMapAvailable"
:
false
,
"bookmarkNodes"
:
null
}
and when I clicked the refresh button on the report viewer it returned
{
"documentReady"
:
false
,
"pageCount"
: 0,
"documentMapAvailable"
:
false
,
"bookmarkNodes"
:
null
}
after this the call was made a second time and returned
{
"documentReady"
:
true
,
"pageCount"
: 1,
"documentMapAvailable"
:
false
,
"bookmarkNodes"
:
null
}
and the report was rendered with the correct data.
I also noticed that if I recycle the app pool, the report is rendered correctly, which points to something being cached in session. This is odd as the Web Api project has session state disabled.
What do I need to do to get the report to be re rendered every time?
Regards
Colin
Hello Telerik Team!
My apologies if this question has already been asked a hundred times, but I am having trouble with the end-user display of report parameters. No matter what value the parameter is given on the end-user side, the report still displays the parameter's default value set in the designer. Is there a step that I am missing?
Thanks so much.
We have a report with a Navigate to Url Action on a cell. The Url generated consists of a time range where the times specified are DateTimeOffsets. We discovered an issue where times with a non-negative time zone offset would result in an incorrect Url string. The root cause of this was due to the '+' in the '+00:00' portion of the DateTimeOffset not being UrlEncoded as it should be and resulted in a space instead of a plus.
I believe this may be a bug/issue in how Telerik's Report Viewer generates the Url when the report is generated. I believe it is not properly escaping all characters that should be escaped in a Url.
Our solution is to create a User Function called UrlEncode which receives a string and returns the results of the C# WebUtility.UrlEncode() function. This standard .Net function properly UrlEncodes all necessary characters in the string. The only limitation I've seen is that it is new as of .NET 4.5. (Here is the MSDN documentation for this method: https://msdn.microsoft.com/en-us/library/system.net.webutility.urlencode.aspx)
I've detailed an example below.
With:
A start date of 04/07/2015 13:29:32 +00:00
An end date of 04/07/2015 13:34:25 +00:00
The following is the original version of the Target Url expression used to generate the Url in the Navigate To Url action. This resulted in the '+' portion of a positive time zone offset being replaced by a space in the resulting Url:
= '../RptExternal?' +
'sDate=' + Fields.StartDate.ToString() +
'&eDate=' + Fields.EndDate.ToString()
This resulted in a Url such as:
http://localhost/RptExternal?sDate=2015/04/07%2013:29:32%20+00:00&eDate=2015/04/07%2013:34:25%20+00:00
While relatively easy to decipher visually, our ASP.NET MVC web app would receive that and translate the URL incorrectly by replacing each occurrence of a '+' with a space.
With the solution described above, the following is the working version of the Target Url expression used to generate the Url in the Navigate To Url action:
= '../RptExternal?' +
'sDate=' + Reporting.Helper.UserFunctions.UrlEncode(Fields.StartDate.ToString()) +
'&eDate=' + Reporting.Helper.UserFunctions.UrlEncode(Fields.EndDate.ToString())
This results in a Url such as:
http://localhost/RptExternal?sDate=2015%2F04%2F07+13%3A29%3A32+%2B00%3A00&eDate=2015%2F04%2F07+13%3A34%3A25+%2B00%3A00
Which our web app receives and properly translates the date times into valid DateTimeOffsets as expected.
I've been looking for an "If>Then>Else" or Case statements, but haven't found them in the documentation.
Are logic structures like these available? If so, will someone provide examples of the syntax?
While my reports are displayed perfectly during runtime, it is not possible to get a preview during development in Visual Studio 2013. I got the following solution structure (WPF):
Main Application EXE
Data-ClassLibrary
Report-ClassLibrary
(... other ClassLibraries and Modules...)
All reports use objectDataSources which itself use the ApplicationDbContext defined in Data-ClassLibrary. What do I have to do to display a preview inside the Visual Studio ReportDesigner? I just can't find any help document for that scenario. The objectDataSources are not even instantiated when showing preview. :-(
And second question: why is it still (after YEARS) not possible to enter a value for an external stylesheet that is an embedded resource? You have to open the designer code to accomplish that. Is this SO HARD TO DEVELOP for Telerik?
We are designing a report with an ObjectDataSource in Visual Studio 2013.
The ObjectDataSource uses a method to retrieve data-items.
All works fine when the code needed to retrieve data is included in same library as the report.
However, when I want to use another (shared) library to retrieve the data, the designer fails to load that assembly (that's the exception that is shown).
I know that putting the library in same location as Visual Studio works, but that's not an option for us.
Hi
We use RadPdfViewer 2013 Q1 in our Silverlight application. After installing a fresh copy of Chrome v42, enabling NPAPI in Chrome://flags and enabling Silverlight Plugin, report still cannot be previewed. Report could be previewed fine in the old version of Chrome (e.g. v39).
Any other flags, plugins and extensions do I need to turn on in Chrome v42?
Previewed report result is attached.
Thanks
Hi all!
I have installed Reporting Trial version and I want to create a report using XML Datasource.
Reading online documentation, i found this article :
"Binding to XML at Design-Time using an XMLDataSource"
link: http://www.telerik.com/help/reporting/buildingdatabindxmldesigntime.html .
but in my software i not found "Chart Smart Tag " and when i want to select a Data Source i have only these option ( DataSourceWizard1.png) .
any suggestions???
Thanks,
Elena