CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Aug 2006
    Posts
    20

    Changeing Dpi settings when rendering a RDLC report

    Hello

    I am trying to change the DPI resolution of the metafile produced when rendering a LocalReport using LocalReport.Render("Image");

    with the following DeviceInfo

    Code:
    // Build Device Info string.
                string deviceInfo = string.Format(
                  "<DeviceInfo>\r\n" +
                  "  <OutputFormat>EMF</OutputFormat>\r\n" +
                  "  <PageWidth>{0}in</PageWidth>\r\n" +
                  "  <PageHeight>{1}in</PageHeight>\r\n" +
                  "  <MarginLeft>{2}in</MarginLeft>\r\n" +
                  "  <MarginRight>{3}in</MarginRight>\r\n" +
                  "  <MarginTop>{4}in</MarginTop>\r\n" +
                  "  <MarginBottom>{5}in</MarginBottom>\r\n" +
                  "  <DpiX>{6}</DpiX>\r\n" +
                  "  <DpiY>{7}</DpiY>\r\n" +
                  "</DeviceInfo>",
                  (float) mPageSettings.Bounds.Width / 100,
                  (float) mPageSettings.Bounds.Height / 100,
                  (float) mPageSettings.Margins.Left / 100,
                  (float) mPageSettings.Margins.Right / 100,
                  (float) mPageSettings.Margins.Top / 100,
                  (float) mPageSettings.Margins.Bottom / 100,
                  mPageSettings.PrinterResolution.X,
                  mPageSettings.PrinterResolution.Y);
    When executing this, DpiX and DpiY get set to 600. However the rendered metafile remains to 72 Dpi. Is there a way to make it render using other dpi settings as rendering in 72 dpi seems to make every line of the document to appear bolder than it should. the minimum line width that can be set in an RDLC report is 1pt. When printing, the lines are far from being as thin as the printer can as they do appear to be 1/72 of an inch thick.

    Thanks
    Last edited by [email protected]; November 28th, 2008 at 04:23 PM.
    -Sylvain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured