UseClientAPI is not working in Flash viewer report V12 (GrapeCity is undefined)

Posted by: rd on 30 April 2018, 2:02 pm EST

    • Post Options:
    • Link

    Posted 30 April 2018, 2:02 pm EST

    Hi Guys,

    I’m using ActiveReport V12 on ASPX page. The Flash Web Viewer work well in IE but I’m not able to get a postback when I click a link on the report.

    Here is my set up (useclientapi is set to true):

    			<%@ Register assembly="GrapeCity.ActiveReports.Web.v12" namespace="GrapeCity.ActiveReports.Web" tagprefix="ActiveReportsWeb" %>
                
    			<ActiveReportsWeb:WebViewer ID="ARWebViewer"  runat="server" height="1150px" width="1004px"  ViewerType="FlashViewer" TabIndex="1" SlidingExpirationInterval="00:00:00" FlashViewerOptions-WindowMode="Opaque">
                    <FlashViewerOptions MultiPageViewColumns="1" MultiPageViewRows="1" useclientapi="True"></FlashViewerOptions>
                </ActiveReportsWeb:WebViewer>
    

    I added the following code in the header section. The Internet browser tell me that GrapeCity is undefined. Did I missing something (handler, assembly ref,…)? I suppose that this is the reason why I cannot call any javascript function from a link on the report… I set a label like this: label1.Hyperlink = "javascript:alert(‘Test’). When I click the link nothing happen.

    Any idea. Thanks you.

  • Posted 1 May 2018, 3:00 am EST

    Hello,

    I am unable to reproduce the issue at my end. Please refer the attached application. Could you please either modify the attached application or provide your own stripped down project so that I can try reproducing the same behaviour at my end and assist you further accordingly?

    Also, please share the exact version of AR that you are using.

    Thanks,

    Mohit

    TestApp_UseClientApi.zip

  • Posted 10 May 2018, 11:58 am EST

    Thanks Mohit,

    I have version 12.1.12924.0. This is the last update on your web site.

    I will take a look of your project.

    Marc Lamontagne, eng.

  • Posted 10 May 2018, 4:43 pm EST

    I found why GrapeCity was undefined… Some of my reports need to enter filters before generating. So, in this case, I set ARWebViewer.Visible = false then set to true when the user click the Generate Report button (postback button). It seems that the assembly is not loaded when the viewer is not visible…

    Therefore, it not solve the issue that I explained above:

    I set a label on the report like this: label1.Hyperlink = "javascript:alert(‘Test’). When I click the link nothing happen.

    Any idea.

    Thank you

    Marc Lamontagne, eng.

  • Posted 11 May 2018, 5:23 am EST

    The syntax label1.Hyperlink = "javascript:alert(‘Test’) is obsolete now. It is blocked by all modern browsers, hence nothing happens when you click the label. You can use the Hyperlink property to set a web address eg. http://www.msn.com, unfortunately not to run javascript.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels