Good day.
i am hoping that somebody could help me and point me in the right direction.
i am looking for a way to run customer account statements to XML file in bulk.
i know that i can run an individual statement to XML but there doesn't seem to be a way to run multiple accounts.
i have looked around the web and have only come across exporting to .PDF.
is this possible to export to XML files.
any help would be appreciated.
*This post is locked for comments
Good day Paul.
the code is on this post mid way down. you should just be able to change the SRSReportFileFormat to PDF.
Kind regards.
B.A
Hi Sir, I just want to ask if you still have the codes or the steps you've done for this. I'm facing the similar issue. We want to generate into pdf file. Thank you so much in advance.
Regards,
Paul
Hi Martin.
I created a 'Save' method in the CustAccountStatementExtController class and call that to do the actual saving/exporting of the report.
Can you share the solution with others? It's possible that somebody will run into a similar problem, find this thread and will like to know what was the underlying cause in your case.
Good day Martin.
i have resolved my issue. Thank you so much for all your help.
It seems to me that you don't have print management used at all, but I don't know your setup. If you believe it's correct, I suggest you debug how your report gets printer settings.
Hi Martin.
thank you for your reply.
how do we setup so that the user uses print management and not last used settings?
Okay, but if you say that then all subsequent prints go to XML instead of to screen, it must mean they don't use your print management setup and what you have configured there is irrelevant.
Good day Martin.
Thank you for your reply.
this is what i have under print management (random Customer Account)
this is the code that i am using to generate the statement to xml.
CustAccountStatementExtController controller = new CustAccountStatementExtController();
SRSPrintDestinationSettings printSettings;
CustAccountStatementExtContract Contract;
MapEnumerator enumerator;
Query query;
TransDate Fromdate;
Str1260 XmlFile;
Fromdate = str2Date("2003/01/15",321);
CurrentTodate = _CustAccountStatementExtPDFParameters.Todate;
if(CurrentTodate == dateNull())
{
CurrentTodate = today();
}
XmlFile = _CustAccountStatementExtPDFParameters.XMLFilePath + '\\' + _CustTable.AccountNum + '.xml';
// controller.parmReportName(PrintMgmtDocType::construct(PrintMgmtDocumentType::CustAccountStatement).getDefaultReportFormat());
controller.parmReportName( ssrsReportStr( CustAccountStatementExt, Report ));
//controller.parmLoadFromSysLastValue(true);
controller.parmShowDialog(false);
printSettings = controller.parmReportContract().parmPrintSettings();
printSettings.printMediumType(SRSPrintMediumType::File);
printSettings.fileFormat(SRSReportFileFormat::XML);
printSettings.overwriteFile(true);
printSettings.fileName(XmlFile);
Contract = controller.parmReportContract().parmRdpContract() as CustAccountStatementExtContract;
enumerator = controller.parmReportContract().parmQueryContracts().getEnumerator();
enumerator.moveNext();
query = enumerator.currentValue();
query.dataSourceTable(tableNum(CustTable)).addRange(fieldNum(CustTable, AccountNum)).value(queryValue(_custTable.AccountNum));
Contract.parmAgingBucket(_CustAccountStatementExtPDFParameters.AgingDefn);
Contract.parmAgingBucketPrintDescription(NoYesCombo::Yes);
Contract.parmAgingPeriod(true);
Contract.parmOnlyOpen(_CustAccountStatementExtPDFParameters.BalanceOtherThanZero);
Contract.parmPrintAging(true);
Contract.parmPrintingDirection(ForwardBackwardPrinting::Backward);
Contract.parmPrintNonZero(_CustAccountStatementExtPDFParameters.BalanceOtherThanZero);
Contract.parmToDate(CurrentTodate);
controller.parmShowDialog(false);
controller.startOperation();
What you're describing doesn't sound like Print management. It seems that your users are getting their last used print settings; therefore it's not coming from print management. If your intention was using print management, you'll have to review your setup. Or maybe you didn't actually meant print management.
I'm going to wait for your clarification.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156