Hi All,
Today want to show you very simple example of getting printing report and getting it’s PDF representation thought Screen Based API.
For doing this we need:
- Screen-based Endpoint to Report.
- Import Web services References to our project
- Fill report parameters using Value command.
- Request Report to be formatted as PDF (schema.ReportResults.PdfContent). Please note that you also can get a HTML representation of report.
- Receive report binary data from Acumatica using Submit command from Web Services.
- Save data somewhere. In my case i’m just saving report as a file to file system, but you can process it however you need.
Full Code Sample:
Have a nice Integration.
Hi Sergey,
I am polling invoice from SO643000.asmx
and it works fine for Open and Closed Invoices,
but not Balanced invoice,
it returns the layout no data.
while I tried on screen “run report” the pdf show properly.
is anything i can do to get balanced invoice PDF?
thanks,
yw
Hi Yiwen,
I’m not aware of any problems with the specific status of the document. It should work with API the same way.
I can recommend you to try our new REST API for printing reports, may be it will help. Read more here – https://community.acumatica.com/develop-integrations-with-web-services-apis-289/retrieve-documents-from-api-18854
i will try the new API,
great thanks.
Hi Sergey,
I face an issue with the acumatica report ,when we print the report it show properly but with pdf the vertical lines extended
Hi Riyaz, to answer this we need to review the report.
I recommend you to create a case, so Acumatica team can review it.
Hi Sergey,
Is there any limitations to use of vertical lines in report?
Don, t see vertical line in any of acumatica reports.
Plz suggest.
Regards,
Gaurav Katiyar
Gaurav,
It is hard to answer. There are some limitations due to the reporting engine itself.
Will it work or not we need to see case by case.
Is there any limitations to use of vertical lines in report?
Don, t see vertical line in any of acumatica reports.
Plz suggest.
Regards,
Gaurav Katiyar
Hi Sergey,
Is it possible to retrieve a PDF version of an Invoice/Quote/Order using the Web Service Endpoint (Rest API) by creating an “Action” on a custom endpoint? We are trying to use the “Print Invoice/Memo@Report” mapped action but its doesn’t seem to be working. Is this possible? What are the required parameters? We are accessing from outside Acumatica, do you have sample Python code or any documentation that would point us in the right direction?
Thanks!
Hi John,
As far as I know, only Screen Based Soap version of API has a feature to get PDF of the report back.
I recommend you to submit an idea on http://feedback.acumatica.com
As alternative, i guess you can generate a PDF version and attach it somewhere as a file. Than using Rest API get this file back from Acumatica. Rest API supports file getting.