tax invoice report

how to open two different reports i.e. sales invoice and tax invoice same time while opening sales invoice.

does the DataSource in both the reports Sales Invoice and Tax Invoice is same?

if yes than

  1. On the “Clicked” method of the Button on the Form code like…

void clicked()
{
Args args = new args();
Args args1 = new args();
ReportRun reportRun,reportRun1;

;
args.parm(CustInvoiceJour.InvoiceId);
args1.parm(CustInvoiceJour.InvoiceId);
// breakpoint;
args.name(reportstr(ACX_SalesInvoice));
args1.name(reportstr(Acx_TaxInvoice));
reportRun = classFactory.reportRunClass(args);
reportRun1 = classFactory.reportRunClass(args1);

reportRun.init();
reportrun.run();

reportRun1.init();
reportrun1.run();

super();
}

  1. And on the “init” method of both the reports code like…

public void init()
{
try
{
if(element.args().parm())
{
this.query().dataSourceTable(tablenum(CustInvoiceJour)).addRange(fieldnum(CustInvoiceJour, InvoiceId)).value(element.args().parm());

this.query().userUpdate(false);
this.query().interactive(false);
super();
}
}
catch(exception::Error)
{
info(“Error in init method”);
}

}

Regards

Vijay Parashar

Thanks vijay…[:)]

do we need to write code for printer settings or in print() method for this…

no samruddhi,

We are not required to write code in print method except the codes i have send you early.

Vijay Parashar