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

ReportViewer does not work on iPad2

1 Answer 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dj Prpa
Top achievements
Rank 1
Dj Prpa asked on 05 Feb 2013, 02:12 AM
Hi,

I have MVC4 application with a partial view that contains ReportViewer control. When I viewed a page on IPad2 (iOS 6.1) the report content did not render. Report viewer showed toolbar with correct page numbers and all buttons, but the styling was lost. When I tried to export the report to PDF (worked just fine) or tried to print (worked too), and then when I used back button to return back to the report page, I was getting this error:

NullReferenceException
Object reference not set to an instance of an object. at Telerik.ReportViewer.WebForms.ViewerState.get_CurrentPage() at Telerik.ReportViewer.WebForms.ReportPageOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, IRenderingContext renderingContext) at Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride() at Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
https://***/Telerik.ReportViewer.axd?instanceID=86efca68bccf4a05b646716ff2110e00&optype=Report&PageIndex=0&RenderID=8ce444b8b34a41ecbd219ae649ac1674&RenderingFormat=HTML

Here is the content of the aspx page:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Telerik.Reporting.ReportSource>" %>
 
<%@ 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>
        <%--<link rel="stylesheet"
            type="text/css"
            href="/Telerik.ReportViewer.axd?optype=Resource&version=6.2.13.110&name=Skins.Metro.ReportViewer.css">--%>
    </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);
                EReportViewer.ReportSource = Model;
            }
  
        </script>
        <form id="main" method="post" action="">
            <div id="repcontent">
                <telerik:ReportViewer ID="EReportViewer" Width="100%" Height="750"
                    runat="server"
                    Font-Names="Segoe UI" Font-Size="Small"
                    ShowHistoryButtons="false"
                    ZoomMode="FullPage"
                    DocumentMapVisible="false"
                    ParametersAreaVisible="false"
                    ShowParametersButton="false"
                    ShowRefreshButton="false"
                    ProgressText="Generating report"
                    ViewMode="PrintPreview" 
                    EnableViewState="false"
                    >
                </telerik:ReportViewer>
            </div>
        </form>
    </body>
</html>

The same page worked fine on my PC using any browser. The report content is displayed and control's formatting was kept.

Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Feb 2013, 12:21 PM
Hello,

Unfortunately we cannot reproduce such a problem in our local tests. We have tested locally with the latest version ( Q3 2012 SP1 ) of Telerik Reporting on both iOS 5.1.1 and 6.1 - everything works as expected. Our suggestion is to test the online demos yourself and if they work for you, there must be something specific in your app causing the problem. In general it is highly unlikely that the whole report will disappear in Safari since we have tested locally different versions of Telerik Reporting on different versions of Safari (since each iOS includes a Safari browser that is specific to the OS).

The exception you get means that the report viewer cannot find the requested page, however, this should never happen because the pages are stored either in the ASP.NET Session (should be enabled for your application at all times) or as files. To track down the issue you can use an http debugging proxy like Fiddler to track requests and responses and see if you can get more info on the problem.
We would also suggest that you manually configure the Session State Management of our engine, so that the report pages and resources are cached in a single location e.g. in files by utilizing our File session provider. For more information please see Configuring the File Session State Provider. This way you can specify a folder where the rendered pages would be stored and you can observe in real time while navigating through the report, whether a requested page is present or not.

If the above suggestions do not yield any result, it will be best if you can send us a sample project that demonstrates the problem. Without it it will be very difficult to pinpoint the problem.

Greetings,
Steve
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
Dj Prpa
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or