Hi Qureshi,
I have to create Customer Payment Journal Report, based on the code you provided I created one for the same:
I have created a class "CustPaymentJournal"
Created a method Custprocessfile(), which includes the following code:
static void CustprocessFile()
{
CustPaymentJournalController_NA customerpaymentjournalcontroller;
CustPaymentJournalContract_NA customerpaymentjournalcontract;
SRSReportExecutionInfo reportexecutioninfo;
Args args=new Args();
SrsReportRunImpl srsreportrun;
CustPaymentJournalTmp_NA customerpaymentjournal;
ReportName reportname=ssrsReportStr(CustPaymentJournal_NA,Report);
AccountNum accountnum;
str fileName;
;
select firstOnly customerpaymentjournal
order by RecId desc
where customerpaymentjournal.AccountNum=='';
if(!customerpaymentjournal)
return;
args.record(customerpaymentjournal);
customerpaymentjournalcontroller = CustPaymentJournalController_NA::construct();
customerpaymentjournalcontroller.parmArgs(args);
customerpaymentjournalcontroller.parmReportName(ReportName);
reportexecutioninfo = customerpaymentjournalcontroller.parmReportContract().parmReportExecutionInfo();
customerpaymentjournalcontract = customerpaymentjournalcontroller.parmReportContract().parmRdpContract();
customerpaymentjournalcontract.parmLedgerJournalTransRecId(customerpaymentjournal.RecId);
customerpaymentjournalcontroller.parmArgs(args);
srsReportRun = customerpaymentjournalcontroller.parmReportRun() as SrsReportRunImpl;
Filename = System.IO.Path::Combine(WinAPIServer::getTempPath(), strFmt('CustomerPaymentJournal_%1.pdf', AccountNum));
customerpaymentjournalcontroller.parmReportRun(srsReportRun);
customerpaymentjournalcontroller.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::File);
customerpaymentjournalcontroller.parmReportContract().parmPrintSettings().overwriteFile(true);
customerpaymentjournalcontroller.parmReportContract().parmPrintSettings().fileFormat(SRSReportFileFormat::PDF);
customerpaymentjournalcontroller.parmReportContract().parmPrintSettings().fileName(Filename);
customerpaymentjournalcontroller.runReport();
}
//////////////////////////////////////
When I run the report, I get an empty report. Is there anything I am doing wrong or have to do something more to get the report?