This is a migrated thread and some comments may be shown as answers.

Report Watermark From Code Behind

1 Answer 300 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
james
Top achievements
Rank 1
james asked on 15 Jun 2015, 05:47 PM

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);

 

 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 17 Jun 2015, 12:19 PM
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
Tags
General Discussions
Asked by
james
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or