Hi,
im getting this error,
Error executing code: QueryRun object not initialized.
(C)\Classes\QueryRun\next
(C)\Classes\SK_AR_EINVOICE3\run - line 26
(C)\Classes\SK_AR_EINVOICE3\main - line 9
I have to generate SalesInvoiceReport to a folder. im using ax2009
public static void main(Args args)
{
SK_AR_EINVOICE3 SK_AR_EINVOICE3 = new SK_AR_EINVOICE3();
;
if (SK_AR_EINVOICE3.prompt())
{
SK_AR_EINVOICE3.run(); -->- line 9
}
}
public void run()
{
str strFolderPath;//n=new
str filepath;
str _filename;//n
FileIOPermission dirPermission, filePermission;//n
Set permissionSet;//n
custInvoiceJour custInvoiceJour;
SalesFormLetter salesFormLetter;
PrintJobSettings printJobSettings;
Args args = new Args();
boolean prompt = false;
boolean printIt = true;
str strMainFile;//n
str strFilePath;//n
//date dateFrom, dateTo;
//str 100 printfilename;
;
select salesParameters;
strMainFile = salesParameters.SKEInvoiceFilePathARV;
while (queryRun.next()) → Line 26
{
gTblCustInvoiceJour = queryrun.get(tableNum(CustInvoiceJour));
InvoiceAccount = gTblCustInvoiceJour.InvoiceAccount;
//gFilePath = strFmt(@"%1%2-%3",strMainFile, year(dToDate), mthOfYr(dToDate))+ strFmt(@"%1",strCostCenter) + strFmt(@"%1",gCustTable.AccountNum) ;
gFilePath = strFmt(@"%1",strMainFile) + strFmt(@"%1",gTblCustInvoiceJour.InvoiceAccount) ;
info(strFmt("%1", gFilePath));
if(InvoiceAccount)
{
this.checkAndCreateFolder(gFilePath);
this.checkCustAccountStatement(fromDate,toDate);
}
}}//close class
Thanks