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

How to change a report displayed in the DocumentViewer extension dynamically

$
0
0

This example demonstrates how you can dynamically change a report displayed by the DocumentViewer extension.

A callback is used to switch reports. So, the DocumentViewer extension is placed into the CallbackPanel extension. After the ComboBox selection is changed, a callback is sent to the CallbackPanel extension to update the DocumentViewer.

Question Comments

Added By: Réal Chartarnd at: 4/8/2016 6:47:41 AM    There's a bug in your example, if you add a dummy ribbon toolbar to DocumentViewerevery time we export to PDF is the first report that is exported, regardlessthe report that is displayed. if you have a solution, I am really interested 

@Html.DevExpress().Ribbon(settingsRb =>{ settingsRb.Name = "RibbonTest"; settingsRb.Tabs.AddRange(DocumentViewerExtension.DefaultRibbonTabs);}).GetHtml();
@Html.DevExpress().DocumentViewer(settings => {    settings.Name = "DocumentViewer";    settings.CallbackRouteValues = new {        Controller = "Home",        Action = "DocumentViewerPartial",        ReportName = Model.ReportName    };    settings.ExportRouteValues = new {        Controller = "Home",        Action = "DocumentViewerExport",        ReportName = Model.ReportName    };    settings.Report = Model.CreateReport();
    settings.ToolbarMode = DocumentViewerToolbarMode.ExternalRibbon;    settings.AssociatedRibbonName = "RibbonTest";}).GetHtml()

Viewing all articles
Browse latest Browse all 7205

Trending Articles



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