Hi there
I'm trying to print labels with a label printer using Telerik Reporting. I just updated it to the latest version to make sure that I don't have any version conflicts. In my application I created a report by designer with just one textbox to make sure it's not my data which causes the problem.
I then use this code on button click:
01.
// prepare report
02.
Telerik.Reporting.Report report =
new
TestLabel();
03.
report.PageSettings.Margins =
new
TelerikDrawing.MarginsU(
new
TelerikDrawing.Unit(0),
new
TelerikDrawing.Unit(0),
new
TelerikDrawing.Unit(0),
new
TelerikDrawing.Unit(0));
04.
report.PageSettings.PaperKind = PaperKind.Custom;
05.
report.PageSettings.PaperSize =
new
TelerikDrawing.SizeU(
new
TelerikDrawing.Unit(97, TelerikDrawing.UnitType.Mm),
new
TelerikDrawing.Unit(97, TelerikDrawing.UnitType.Mm));
06.
07.
// set printer settings
08.
PrinterSettings printSet =
new
PrinterSettings();
09.
printSet.Copies = 1;
10.
printSet.PrinterName = LabelPrinterName;
11.
12.
// create report processor
13.
ReportProcessor repProc =
new
ReportProcessor();
14.
repProc.PrintController =
new
StandardPrintController();
15.
16.
InstanceReportSource repSrc =
new
InstanceReportSource();
17.
repSrc.ReportDocument = report;
18.
19.
// print report
20.
repProc.PrintReport(repSrc, printSet);
I set a breakpoint on line 20 on the PrintReport method. When I continue the code, it takes about three minutes to finally print the report and the code to continue. I'm wondering why this is taking so long. Is there anything wrong with my code during preparation, is there a setting missing or causing problems?
Cheers,
Roman