Member Avatar for sanjeewa.abeywardana
sanjeewa.abeywardana

Recently we created a Crystal Report that supports a custom papersize (Half A4 papersize) and attached to our Windows app.

When we deployed to a server machine,
(the server machine contains application installed and the user logged into the server by remote desktop connection to use the application , while the** printer is attached to a seperate machine shared)
the use has to always pick the custom paper size each and every time to print , **if not it set as "Letter" even it is set to default in the server machine and the printer connected machine

Code

frmReportNew frmGRN_ERP = new frmReportNew(); // create a instance of the cystal Report viewer
frmGRN_ERP.MdiParent = this.MdiParent;
frmGRN_ERP.ReportDocument = new report.VGRN.ALCDAT.Pre_V_rptGRN_WBCALC(); // report file named "Pre_V_rptGRN_WBCALC"

frmGRN_ERP.ReportDocument.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.DefaultPaperSize;

frmGRN_ERP.ReportDocument.SetParameterValue("GRNNO", txtShpShipNo.Text.Trim());
frmGRN_ERP.ReportDocument.SetParameterValue("VatRegNo", vatCode);
frmGRN_ERP.TopMost = true;

frmGRN_ERP.Show();

How can we resolve this issue where user will NOT have to set it to the default paper size always

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.