Hi all,
I am using telerik reports(Q3 2010 ,version 4.2.10.1110) in my application and I have a 'reports.aspx' page
where i am using a telerik report viewer
Now here is the funnier part; My application works correctly in all browsers (including Safari on windows platform). But when I open the 'reports.aspx' page in an Ipad I am getting the below error,
“Potentially dangerous request.path value was detected from the client (&)“
I tried a variety of solutions like setting ValidateRequest="false" & requestValidationMode="2.0" , but none of them helped.
To check whether the error was caused by the Telerik report viewer i tried adding the report viewer to a fresh application, with the page containing only the report viewer (not even binded). And guess what it works well in all browsers but not in Ipad.
Is this a problem with the report viewer; is there a work around for this issue?
Thanks in advance
9 Answers, 1 is accepted
It seems like your 2010 Q3 version wont work in IPad. I checked some of the older applications in which i was using telerik reporting( 2010 Q1) and its working in Ipad.
My only option seems to be reverting back to that version
We just tested our online demos which use the latest official version Q3 SP1 on iPad and we did not notice such errors. Can you try opening the examples yourself and if there is a problem, provide the exact steps to reproduce it?
Greetings,
Steve
the Telerik team
I am using Telerik.ReportViewer.WebFroms(4.1.10.921)
I believe it works for the previous versions.
Please let me know what I have to do to make this run on IPAD IOS 6
We have tested locally with the specified version of Telerik Reporting and Safari 5.1.2 and we were not able to reproduce the issue. Additionally we have tested the latest version ( Q3 2012 ) of Telerik Reporting on both 5.1.1 and 6.0 - everything works as expected and I have attached a photo of the working examples. Please also note that 4.1 is a very old version and therefore fixes will not be applied to it (we can recommend you to update your reports to a more recent version).
Also a similar issue has been noticed when the Report Viewer is placed in a tab control for example or in general because the viewer is not initially visible on the page. The solution in such cases is to simply call reportViewer1.AdjustReportAreaHeight() on the client right after the Report Viewer has become visible and everything will work as expected.
Kind regards,
IvanY
the Telerik team
HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!
Usually the report gets measured correctly upon refresh and not when interacting with the dropdown, so you might have a different issue. Nevertheless the correct way to use the AdjustReportAreaHeight() function is the following one:
var viewer = <%=ReportViewer2.ClientID%>;
viewer.AdjustReportAreaHeight();
var viewer2 = eval("CodedReportViewer");
viewer2.AdjustReportAreaHeight();
Choose one of the approaches and use it when you are about to make the Report Viewer visible (for example if it is in a tab and the tab control has onTabOpen or something similar - add this snippet there). The first approach can be easily changed to Razor syntax if needed - @ReportViewer2.ClientID.
I hope that helps.
Regards,
IvanY
the Telerik team
HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!
@model Reporting.ActivityAnalysis
@Html.Partial("ReportViewer", Model)
and then it would hit our ReportViewer.aspx which has the code to AdjustReportHeight but it doesn't change the effect on the report for the iPad.
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<
IReportDocument
>" %>
<%@ Import Namespace="System.Data" %>
<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=6.2.13.110, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>
<%@ Register Assembly="Telerik.Reporting, Version=6.2.13.110, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.Reporting" TagPrefix="telerik" %>
<!DOCTYPE html>
<
html
>
<
head
runat
=
"server"
>
<
title
><%= ViewBag.Title %></
title
>
</
head
>
<
body
>
<
script
runat
=
"server"
>
public override void VerifyRenderingInServerForm(Control control)
{
// to avoid the server form (<
form
runat
=
"server"
> requirement
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = Model;
ReportViewer1.ReportSource = instanceReportSource;
}
</
script
>
<
script
type
=
"text/javascript"
>
window.onload = function () {
var viewer = <%=ReportViewer1.ClientID%>;
viewer.AdjustReportAreaHeight();
}
</
script
>
<
form
id
=
"main"
method
=
"post"
action
=
""
>
<
telerik:ReportViewer
ID
=
"ReportViewer1"
Width
=
"100%"
Height
=
"800px"
runat
=
"server"
>
</
telerik:ReportViewer
>
</
form
>
</
body
>
</
html
>
Can you see what I am missing here?
I came across with a pretty much similar issue. My implementation was working totally fine in desktops, android tabs and ipads having IOS below 6.
After the report is generated in ipad (above IOS 6), the HTML mark up is actually there in the browser even though you can't see it. Its just not rendered in the browser (invisible).
What you have done is correct expect the way you call the method, viewer.AdjustReportAreaHeight();.In your implementation you call this method before telerik report generate the markup in the browser. What actually should happen is call this method after telerik finishes rendering the markup in the browser (preferably have a onReportLoadHandler). So try delaying this method call using either jquery throttle or underscorejs delay method.
window.onload = function () {
var viewer = <%=ReportViewer1.ClientID%>;
function refreshReport() {
viewer.AdjustReportAreaHeight();
_.delay(refreshReport, 3000);
}
Cheers,
Dinusha
You are adjusting the height of the Report Viewer manually when it is still not visible - window.onload is similar to the jquery's document ready (the difference is that it is fired after all the content is loaded, including images for example). You need to call your function when you are making the Report Viewer visible - in events like onTabChanged and onPopUpOpened (this depends on the javascript libraries that you are using).
If your Report Viewer is visible at all times the issue is elsewhere. If that is the case please check our online demos to make sure that only your Report Viewer is problematic. Then it will be best if you are able to open a support ticket and send us a runnable sample that exhibits the issue so that we are able to view it locally - this will help us identify the issue faster and advise you more accordingly.
Kind regards,
IvanY
the Telerik team
HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!