【问题标题】:How can I add more margin in the documentviewer?如何在文档查看器中添加更多边距?
【发布时间】:2015-12-25 11:54:20
【问题描述】:

我有一份报告,这是我的 html 页面的代码:

@Html.DevExpress().DocumentViewer(settings =>{
    // The following settings are required for a Report Viewer.
    settings.Name = "documentViewer1";
    settings.Report = (Misteryshopper.Reports.ResumenProyecto)ViewData["Report"];
    // Callback and export route values specify corresponding controllers and their actions.
    // These settings are required as well.    

    settings.CallbackRouteValues = new { Controller = "Report", Action = "ProyectDocumentViewerPartial" };
    settings.ExportRouteValues = new { Controller = "Report", Action = "ProyectExportDocumentViewer", ReportName = ReportName };
    // Parameters

    settings.SettingsReportViewer.EnableRequestParameters = false;
    settings.SettingsSplitter.SidePaneVisible = false;  

    }).GetHtml()

问题是在浏览器中我可以正确看到我的报告文档,但我无法正确看到报告的边框,我已为视图附加了一张图片。

有什么方法可以在文档查看器中添加更多边距?

我必须强调,当我打印我的报告时,它看起来不错, 问题仅在预览文档查看器中。

【问题讨论】:

    标签: asp.net-mvc xtrareport devexpress-mvc


    【解决方案1】:

    您只需在代码中添加这一行:

    settings.SettingsReportViewer.EnableMargins=true;

    @Html.DevExpress().DocumentViewer(settings =>{
    // The following settings are required for a Report Viewer.
    settings.Name = "documentViewer1";
    settings.Report = (Misteryshopper.Reports.ResumenProyecto)ViewData["Report"];
    // Callback and export route values specify corresponding controllers and their actions.
    // These settings are required as well.    
    
    settings.CallbackRouteValues = new { Controller = "Report", Action = "ProyectDocumentViewerPartial" };
    settings.ExportRouteValues = new { Controller = "Report", Action = "ProyectExportDocumentViewer", ReportName = ReportName };
    // Parameters
    
    settings.SettingsReportViewer.EnableRequestParameters = false;
    settings.SettingsSplitter.SidePaneVisible = false; 
    
    // YOU HAVE TO ADD THIS LINE ...... 
        settings.SettingsReportViewer.EnableMargins = true; 
    
        }).GetHtml()
    

    【讨论】:

      猜你喜欢
      • 2019-04-30
      • 1970-01-01
      • 1970-01-01
      • 2019-07-02
      • 2023-01-31
      • 2016-10-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多