Ajitkumar Rajput

Ajitkumar Rajput

  • NA
  • 76
  • 1.3k

WebDocumentViewer not load report ?

Jul 5 2021 6:56 AM

Dear All 

I have generate the report using XtraReport(DevExpress) inn ASP.Net MVC but after loading page in browser only WebDocumentViewer is show but XtraRepot not load ??

 

Controlller Action Method 

public ActionResult Index()
        {
            UserDBHandle userDBHandle = new UserDBHandle(_CSSSQLConStr);
            DataSet ds = new DataSet();
            ds = userDBHandle.GetUserRPT();
            ds.Tables[0].TableName = "UserDetails";
            XtraReport1 xtraReport1 = new XtraReport1();
            rptUser userReport = new rptUser();
            userReport.DataSource = ds;
            userReport.DataMember = "UserDetails";

            var cachedReportSource = new CachedReportSourceWeb(new XtraReport1());
            return View(cachedReportSource);
        }

or Index.cshtml   Code :

 

@model DevExpress.XtraReports.Web.CachedReportSourceWeb
@Html.DevExpress().WebDocumentViewer(settings =>
    {
        settings.Name = "WebDocumentViewer";
    }).Bind(Model).GetHtml()
 

 

But report is not show 


Answers (1)