printing page without data when print to special printer

Stimulsoft Reports.NET discussion
Post Reply
hajar.kian@yahoo.com
Posts: 7
Joined: Sun May 29, 2016 10:10 am

printing page without data when print to special printer

Post by hajar.kian@yahoo.com »

Hello,

I wrote a code that according to that sent report to special printer by server, but my report was printed a empty page.
my collection data had data.
my printer started to printing,but print empty page.

please help me.

my code is:

Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();
var path = Server.MapPath("~/SLPrintSalesInvoiceReport10.mrt");
report.Load(path);

SaleInvoiceBUC buc = new SaleInvoiceBUC();
List<long> list = new List<long>();
var ids = sourceIds;

var q = buc.GetPrintSalesInvoiceReport(list);
report.RegBusinessObject("RptPrintSalesInvoiceReport", q.GetList());
report.Render(false);

//Create Printer Settings
PrinterSettings printerSettings = new PrinterSettings();
//Set Printer to Use for Printing
printerSettings.PrinterName = "\\\\MyPc\\HP LaserJet 5200L UPD PCL 5";
var defaulrSetting = printerSettings.DefaultPageSettings.PaperSize;
// printerSettings.FromPage = 2;
//printerSettings.ToPage = 2;
string msg = "Unable to print A3";
foreach (var item in printerSettings.PaperSizes)
{

if (((PaperSize)item).PaperName.ToLower() == "a3")
{
printerSettings.DefaultPageSettings.PaperSize = (PaperSize)item;
msg = "";
}

}

//Direct Print - Don't Show Print Dialog
report.Print(false, printerSettings);

printerSettings.DefaultPageSettings.PaperSize = defaulrSetting;
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: printing page without data when print to special printe

Post by Alex K. »

Hello,

Can you please send us a simple project which reproduces the issue for analysis on support@stimulsoft.com

Thank you.
hajar.kian@yahoo.com
Posts: 7
Joined: Sun May 29, 2016 10:10 am

Re: printing page without data when print to special printe

Post by hajar.kian@yahoo.com »

Hello,

I change my printer that don't support A3, it print my report in A4 size, But printer "HP LaserJet 5200L UPD PCL 5" print empty page.

please help me until send simple project for you.

thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: printing page without data when print to special printe

Post by HighAley »

Hello.

What page size is set in your report?
Please, send us a screen-shot of the report in the Designer.

Thank you.
hajar.kian@yahoo.com
Posts: 7
Joined: Sun May 29, 2016 10:10 am

Re: printing page without data when print to special printe

Post by hajar.kian@yahoo.com »

Hello,

I set A3,
and I sent a screen-shot of my report for you.

thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: printing page without data when print to special printe

Post by Alex K. »

Hello,

Thank you for the sent information. We need some time for check the issue. We will let you know about the result.
Post Reply