Though, I can run report by making a new function in report itself to initialize report and then run it. I call that function from codeunit as per requirement. Even, report run fine but the only issue is that if I do not want to show request page; then report does not run. It shows on RTC that it is printing report but it do not run report & nothing happens.
I am using code :
On Codeunit :-
>> SalesInvoiceHeaderReport.InitializeVariablesFunction('103001');
On Report :- (On "InitializeVariablesFunction" (ReportID) )
>> "Sales Invoice Header".RESET;
>> "Sales Invoice Header".SETRANGE("No.",ReportID);
>> REPORT.RUNMODAL(206,FALSE,TRUE,"Sales Invoice Header");
I pass report ID from codeunit and then put setrange.
>>Reports run fine when I use -> REPORT.RUNMODAL(206,TRUE,TRUE,"Sales Invoice Header");
>>Reports does not run fine when I use -> REPORT.RUNMODAL(206,FALSE,TRUE,"Sales Invoice Header");
I am using code :
On Codeunit :-
>> SalesInvoiceHeaderReport.InitializeVariablesFunction('103001');
On Report :- (On "InitializeVariablesFunction" (ReportID) )
>> "Sales Invoice Header".RESET;
>> "Sales Invoice Header".SETRANGE("No.",ReportID);
>> REPORT.RUNMODAL(206,FALSE,TRUE,"Sales Invoice Header");
I pass report ID from codeunit and then put setrange.
>>Reports run fine when I use -> REPORT.RUNMODAL(206,TRUE,TRUE,"Sales Invoice Header");
>>Reports does not run fine when I use -> REPORT.RUNMODAL(206,FALSE,TRUE,"Sales Invoice Header");