c# - XtraReport not showing any data -
i have followed instructions documentation link. xtrareport shows box toolbar doesnot shows data. doing wrong?
in homecontroller.cs
public actionresult index() { viewbag.message = "welcome devexpress extensions asp.net mvc!"; viewdata["report"] = new dxapplication.reports.xtrareport1(); return view(); } public actionresult documentviewerpartial() { viewdata["report"] = new dxapplication.reports.xtrareport1(); return partialview("documentviewerpartial"); } public actionresult exportdocumentviewer() { return devexpress.web.mvc.documentviewerextension.exportto(new dxapplication.reports.xtrareport1()); }
documentviewerpartial.cs
**@html.devexpress().documentviewer(settings => { settings.name = "documentviewer"; settings.report = (dxapplication.reports.xtrareport1)viewdata["reports"]; settings.callbackroutevalues = new { controller = "home", action = "documentviewerpartial" }; settings.exportroutevalues = new { controller = "home", action = "exportdocumentviewer" }; }).gethtml()**
and index.cshtml
{ viewbag.title = "home page"; } @viewbag.message @html.action("documentviewerpartial")
try changing in documentviewerpartial.cs viewdata["reports"]
viewdata["report"]
Comments
Post a Comment