I'm trying to print a report (from MS reporting service) on a continous piece of paper.
I have a printer that can print continous paper an cut's the paper when he's done(at end of page).
So I'm using reporting services to generate my report (which is variable in length)
When I print from reporting services I get 2 A4 sized papers (test report is 1.5 A4 pages long)
When I export to excel I get an excel file. When I set my printers print length to 1.5A4 (+-45cm) (in the printer properties) I can print the excel on 1 page that is 45cm long.
So the goal is to print the report from vb.net code.
From code I can export the report to excel (using the reporting webservice)
And I can print the excel to the printer, bu I can't change the print length while printing the excel.
I can however change the print length using the printdocument from vb.net (see attached code)
But I can't combine the 2. So I'm unable to print the excel using printdocument.
And I can't manualy create the report using graphics in the printdocument.printpage event because the report contains barcodes and those are hard to draw (+ this is to much coding)
I've been searching to print the xls to an image and print the image in the printdocument.printpage event, but the xls to image (from code) is still a problem...
So any ideas? tia
m_PrintDocument.PrinterSettings = printerSetting
Dim pk as New PaperSize("cstm",670,1850)
Dim intIdx As Integer
For intIdx = 0 To m_PrintDocument.PrinterSettings.PaperSizes.Count - 1 Step 1
If m_PrintDocument.PrinterSettings.PaperSizes(intIdx).Kind = Printing.PaperKind.Custom Then
pk.RawKind = m_PrintDocument.PrinterSettings.PaperSizes(intIdx).RawKind
m_PrintDocument.DefaultPageSettings.PaperSize = pk