I'm using Infragistics.Windows.Reporting.Report to print simple reports. Now I noticed that the JobName in the printers queue always has the same ugly name ("Infragistics.Windows.Reporting.Report+Paginator") and I can't figure out how to set my own.
My code:
var report = new Report();report.ReportSettings.Margin = new Thickness(55);report.ReportSettings.HorizontalPaginationMode = HorizontalPaginationMode.Scale;report.PageHeader = ...; // Header datareport.PageHeaderTemplate = ...; // Header templatereport.PageFooter = ...; // Footer datareport.PageFooterTemplate = ...; // Footer templatereport.Section = new EmbeddedVisualReportSection(... /* some Control */);report.Print(true, false);
Any hint? Thanks in advance!
Patrick
Yes, that's the property to set. Thanks!
However, I had to slightly change the way how I call the Print() method, otherwise the PrintQueue is null:
var report = new Report(); report.ReportSettings.Margin = new Thickness(55); report.ReportSettings.HorizontalPaginationMode = HorizontalPaginationMode.Scale; report.PageHeader = ...; // Header data report.PageHeaderTemplate = ...; // Header template report.PageFooter = ...; // Footer data report.PageFooterTemplate = ...; // Footer templatereport.Sections.Add(new EmbeddedVisualReportSection(... /* some Control */));if (report.ShowPrintDialog()){ report.ReportSettings.PrintQueue.CurrentJobSettings.Description = "MyCustomPrintJobName"; report.Print(false, false);}
HI,
Try setting the
Report.ReportSettings.PrintQueue.CurrentJobSettings.Description.
Sincerely, Matt Developer Support Engineer
I am investigating this issue.
Of course 2nd last line should read:
report.Sections.Add(new EmbeddedVisualReportSection(... /* some Control */));