Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to switch web reports at runtime and enable caching

$
0
0

This example illustrates the capability to switch web reports displayed via the ReportViewer control at runtime, and also enable the native caching capability.
The HiddenField value is used to identify a report before initializing it (see the ASPxClientComboBox.SelectedIndexChanged event handler). The initialization is performed within the Page_Load event handler.

Example Comments

Added By: Chad Eklund at: 6/7/2012 5:15:15 PM    

This does not work, refresh is no a property of ReportViewer

viewer.Refresh();

Added By: Alex (DevExpress Support) at: 9/18/2012 5:06:55 AM    

Hi Chad,
The Refresh method is a part of the ReportViewer client-side API: http://documentation.devexpress.com/#XtraReports/DevExpressXtraReportsWebScriptsASPxClientReportViewer_Refreshtopic.

Added By: Øyvind Hægeland 1 at: 10/8/2012 10:59:25 AM    

I try to use 2 reports activated by a combobox, but get an error on the hf surroundeed by quotation marks.
I have tried single quotation marks ' , but i won't help.

                <dx:ASPxComboBox ID="cboNorskEngelsk" runat="server" ValueType="System.String">
                    <Items>
                        <dx:ListEditItem Text="Norsk" Value="1" />
                        <dx:ListEditItem Text="Engelsk" Value="2" />
                    </Items>
                    <ClientSideEvents SelectedIndexChanged="function(s, e) {
                  document.getElementById("hf").value = s.GetSelectedItem().value;
                        viewer.Refresh();
                    }" />
                </dx:ASPxComboBox>

Regards
Reidar Thorsvik


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>