Hi
i have create HTML5 report and it works with parameter but it's don't refresh (get new data from DB) as example:
1. items qty in db was 5 for order is no 1
2. i type in parameter section 1 and get qty 5 in my report >> that is OK
3. now i edit qty in my db and set it to be 3
4. i type in parameter section 2 and get qty of orderid 2
5. now i type 1 again in parameter section and get qty 5 >> that is wrong qty now in db is 3 ??!!
so how can i let report refreshed as it should be (check data each time i type value in parameter section)
Note: when i click refresh icon in report viewer i get report with new data - but i don't need client to click this button each time i just need report data refreshed each time i type an value or each time report is created
Code:
@* Order Report *@
<
div
id
=
"reportViewer2"
style
=
"height:1241px;"
>
loading...
</
div
>
@* Order Report *@
<
script
>
$(document).ready(function () {
$("#reportViewer2")
.telerik_ReportViewer({
serviceUrl: "/api/reports",
templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-9.0.15.225.html',
reportSource: {
report: "Hemdan.Views.kinds.Select_Order_BarCode, Hemdan",
},
viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
scale: 1.0,
});
});
</
script
>
16 Answers, 1 is accepted

This is an optimization in the reports caching which allows you to render a specififc report for a given set of parameters and save time from processing the same report with the same set of parameters on consecutive calls.
Please check the following forum thread and test upgrading your project to the mentioned internal build 9.0.15.422 and/or adding a DateTime parameter, which value is always updated from the client ( a new Date() is submitted on each request for report) - Web Api Caching and resolving issues.
I hope the provided information is helpful.
Regards,
Stef
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Thanks for Replying
I can't download ver 9.0.15.422 - i try click the link on the post but can't download it - and i download trial again but got ver 9.0.15.324 - are it's not available for download yet ?
Not: i try code in the same post but i get err in 2 lines
static ReportServiceConfiguration preservedConfiguration;
static IReportServiceConfiguration PreservedConfiguration
Error 2 The type or namespace name 'ReportServiceConfiguration' could not be found (are you missing a using directive or an assembly reference?)
Error 3 The type or namespace name 'IReportServiceConfiguration' could not be found (are you missing a using directive or an assembly reference?)
and try to add date time param but report still not refreshed as it should be ??!!
so please how can i resolve that ?

please if you can give me an example for report works with 2 params
1. is orderid or any thing else
2. datetime params >> that make report refreshed each time
or fix above err in my previews reply ...
You can download the latest available internal build after logging into your Telerik account and navigating to Products & Subscriptions - Latest internal Builds. Then in the drop-down select Reporting and there will be displayed a download link for the internal build, including release notes link.
Please give a try of the internal build and let us know if you still need a workaround.
Regards,
Stef
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Hi Stef
i download it and use code as:
using System.Web;
using Telerik.Reporting.Cache.Interfaces;
using Telerik.Reporting.Services.Engine;
using Telerik.Reporting.Services.WebApi;
using System.Linq;
using Telerik.Reporting.Services;
using Telerik.Reporting.Cache.File;
using System.IO;
namespace WebApplication1.Controllers
{
public class ReportsController : ReportsControllerBase
{
static ReportServiceConfiguration preservedConfiguration;
static IReportServiceConfiguration PreservedConfiguration
{
get
{
if (null == preservedConfiguration)
{
preservedConfiguration = new ReportServiceConfiguration
{
HostAppId = "WebApplication1",
Storage = new FileStorage(),
ReportResolver = CreateResolver(),
CachedReportTimeout = 0,
ClientSessionTimeout = 0,
};
}
return preservedConfiguration;
}
}
public ReportsController()
{
this.ReportServiceConfiguration = PreservedConfiguration;
}
static IReportResolver CreateResolver()
{
var reportsPath = HttpContext.Current.Server.MapPath("~/Reports");
return new ReportFileResolver(reportsPath)
.AddFallbackResolver(new ReportTypeResolver());
}
//protected override ICache CreateCache()
//{
// return Telerik.Reporting.Services.Engine.CacheFactory.CreateFileCache();
//}
}
}
but report still not refreshed as i need, so please did i set CachedReportTimeout into right format or what is the problem ?

my report code is:
@* Order Report *@
<
div
id
=
"reportViewer2"
style
=
"height:1241px;"
>
loading...
</
div
>
@section scripts
{
@* Order Report *@
<
script
>
$(document).ready(function () {
$("#reportViewer2")
.telerik_ReportViewer({
serviceUrl: "/api/reports",
templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-9.0.15.422.html',
reportSource: {
report: "WebApplication1.Report1, WebApplication1",
},
viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
scale: 1.0,
});
});
</
script
>
}
In your last post in HTML5 Report Viewer - Report don't get value from drpdownlist and not refreshed ? you state that the issue with refreshing reports is resolved.
If I questions are not related and the problem still occurs, please open a support ticket and send us the following details:
- A video illustrating the problem on your machine;
- Log file created by Fiddler. For the purpose download and install Fiddler and run it in parallel to the application in browser - Create a Session Archive Zip (SAZ) Traffic archive.
Regards,
Stef
Telerik
See What's Next in App Development. Register for TelerikNEXT.


Note: the problem is resolved when try to pass param value from external input not (Parameter Area) like textbox or dropdownlist ......
i try it again and the problem is still (ver 9.0.15.324) - i just need any way that i can refresh report each time i change values like this :
$('#ProductID').change(function () {
var viewer = $("#reportViewer1").data("telerik_ReportViewer");
viewer.reportSource({
report: viewer.reportSource().report,
parameters: { Orderid: $(this).val() }
});
viewer.refreshReport();
});
this is working very good if i have an external dropdownlist and each time i select new value or change values in db and then select item again from drp i got report with new data each time
i need to do this way with working with parameter area i set params to auto refresh but still don't get data with last update i must click on refresh button in the report viewer and when i do that i got report with correct data ?
so how can i do refresh here as i do with above code ?
$(document).ready(function () {
$("#reportViewer2")
.telerik_ReportViewer({
serviceUrl: "/api/reports",
templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-9.0.15.324.html',
reportSource: {
report: "WebApplication1.Reports.Report2, WebApplication1",
},
viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
scale: 1.0,
});
});
i think there is must be way to do that - hope to give me full steps?
the options are:
- Use the current version and add a Datetime parameter in the report, where parameters values are updated via external custom UI;
- Upgrade to 9.0.15.422 and use the new cache settings for the Reporting REST service - Web Api Caching and resolving issues (my last post). The internal build can be downloaded after logging into your Telerik account and navigating to Products & Subscriptions - Latest internal builds - select Reporting in the drop-down.
With these update you will not need to call the viewer's refreshReport method.
Regards,
Stef
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Thanks, can you please give me sample project that working with DateTime Param to let me know how to do it ?
please when will ver 9.0.15.422 will be out ?
Telerik Reporting v9.0.15.422 is available for download as of April 22, 2015. It can be downloaded from your Telerik account - Products & Subscriptions - Latest internal builds - Reporting.
The other approach requires:
- A DateTime report parameter in the report - How to: Add Report Parameters.
- Update the value of the DateTime parameter on updating the viewer's reportSource as follows:
$(
'#ProductID'
).change(
function
() {
var
viewer = $(
"#reportViewer1"
).data(
"telerik_ReportViewer"
);
viewer.reportSource({
report: viewer.reportSource().report,
parameters: {
Orderid: $(
this
).val(),
TheDatetimeParameter:
new
Date() }
});
viewer.refreshReport();
});
Regards,
Stef
Telerik

hi Ahmad
i stared work telerik reporting with MVC
can you help me by provide me sample work i need to desing report by "telerik stand alone designer"
and add it to MVC project and can send data to report in controller ??
best regards
Samer Al-Dwaik

Set the ReportSharingTimeout Property in the ReportsController file to 0 to prevent the cached report from being reused. Also, set the PersistSession option of the viewer to False.
In case the issue persists, please attach a runnable demo project reproducing this behavior in a support ticket so we can test it locally and provide you further suggestions.
Regards,
Katia
Telerik by Progress