Page 1 of 1

printing page without data when print to special printer

Posted: Wed Jun 01, 2016 11:22 am
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;

Re: printing page without data when print to special printe

Posted: Wed Jun 01, 2016 11:56 am
by Alex K.
Hello,

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

Thank you.

Re: printing page without data when print to special printe

Posted: Sun Jun 05, 2016 6:09 am
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.

Re: printing page without data when print to special printe

Posted: Mon Jun 06, 2016 7:04 am
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.

Re: printing page without data when print to special printe

Posted: Mon Jun 06, 2016 8:53 am
by hajar.kian@yahoo.com
Hello,

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

thanks.

Re: printing page without data when print to special printe

Posted: Mon Jun 06, 2016 11:47 am
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.