This is a migrated thread and some comments may be shown as answers.

Reports in IPad

9 Answers 305 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
shalu td
Top achievements
Rank 1
shalu td asked on 02 Feb 2011, 02:33 PM

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

Sort by
0
shalu td
Top achievements
Rank 1
answered on 04 Feb 2011, 06:51 AM
Hi,

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

0
Steve
Telerik team
answered on 07 Feb 2011, 12:49 PM
Hi shalu td,

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
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Ali
Top achievements
Rank 1
answered on 24 Oct 2012, 07:24 PM
I am having an issue using ReportViewer with IOS 6 IPAD. The Report Viewer does not work in IPAD which has IOS 6. It does not load the report when I select the preview button.

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
0
IvanY
Telerik team
answered on 29 Oct 2012, 04:11 PM
Hi Ali,

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!

0
Chad
Top achievements
Rank 1
answered on 06 Feb 2013, 05:36 AM
Can you give an example of this. I have tried doing it on my onLoad and haven't been able to get it to work my report is still wrong for the iPad. In fact the report data doesn't show up unitl it touch the export dropdown and then the data appears but it has no scroll bars. I am using the ReportViewer in an MVC site.
0
IvanY
Telerik team
answered on 07 Feb 2013, 03:21 PM
Hi Chad,

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!

0
Chad
Top achievements
Rank 1
answered on 07 Feb 2013, 05:02 PM
It didn't seem to help. I am pasting the code from my page. All of our reports run through our ReportViewer.aspx we will have some report file like ActivityAnalysis.cshtml with code like this

@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?
0
Dinusha
Top achievements
Rank 1
answered on 11 Feb 2013, 10:40 AM
Hi Chad,

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);
  }
Here I have given 3000 ms delay to call the AdjustReportAreaHeight() method. There are event handlers in viewer object to fire after the report is loaded(i.e: onReportLoadHandler) which I tried to use, unfortunately it didn't fire which is why I have used this delay method. Best way is to use the onReportLoadHandler or a similar handler if there are any. Hope this will work for you.

Cheers,
Dinusha

0
IvanY
Telerik team
answered on 11 Feb 2013, 02:06 PM
Hi Chad,

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!

Tags
General Discussions
Asked by
shalu td
Top achievements
Rank 1
Answers by
shalu td
Top achievements
Rank 1
Steve
Telerik team
Ali
Top achievements
Rank 1
IvanY
Telerik team
Chad
Top achievements
Rank 1
Dinusha
Top achievements
Rank 1
Share this question
or