Report Watermark From Code Behind

2 posts, 0 answers
  1. james
    james avatar
    24 posts
    Member since:
    Aug 2014

    Posted 15 Jun 2015 Link to this post

    When I print my report with a watermark from code behind, the Watermark text prints as dotted as opposed to printing from the ReportViewer which prints the watermark as solid. How can I get the watermark to print solid like it does in the ReportViewer from code behind?

     

     

    // Obtain the settings of the default printer
    System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings();

    // The standard print controller comes with no UI
    System.Drawing.Printing.PrintController standardPrintController = new System.Drawing.Printing.StandardPrintController();

    // Print the report using the custom print controller
    Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();

    reportProcessor.PrintController = standardPrintController;
    Telerik.Reporting.TypeReportSource typeReportSource = new Telerik.Reporting.TypeReportSource();

    // reportName is the Assembly Qualified Name of the report
    typeReportSource.TypeName = typeof(BuildPlanReportLib.Traveler3).AssemblyQualifiedName;

    Report3 rep2 = Report3();
    rep2.PageSettings.Landscape = true;

    reportProcessor.PrintReport(rep2, printerSettings);

     

     

  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 17 Jun 2015 Link to this post

    Hello James,

    The provided code snippet illustrates how the report is printed programmatically, but does not include information how the watermark is added in the report.

    Please compare the settings of a watermark added at run-time and such added through the Report Designer (designer.cs code), and verify all required properties are set - How to add a Watermark. Also test running both reports in print-preview to check how the watermark will appear in the document (watermarks are physical pages' settings).

    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top