Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Saving report as a pdf
Saving report as a pdf
It used to be that when a report was printed to a pdf reader tab in my browser (Brave) clicking the down load button would save it as a pdf. Since upgrading to 4.5 and activating SSL when I try to save the report to a file this way it has a .php file extension and my browser reports a network error. Any idea on what might be going on here? Or where to look to find out?
Re: Saving report as a pdf
Further information, placed a pdf file on the server, opened it in the browser and saved with no problem.
-
- nuBuilder Team
- Posts: 506
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 8 times
- Been thanked: 18 times
Re: Saving report as a pdf
Hi treed,
Was checking the latest option of PDF generation and on my configuration it works OK.
(Debian server with PHP8 and local computer Win10 with Chrome).
Please find enclosed in the video how it works on my computer and how you can extend functionality if you need any other.
Does it behave on your configuration the same way or differently?
https://drive.google.com/file/d/1kbKyL1 ... sp=sharing
Was checking the latest option of PDF generation and on my configuration it works OK.
(Debian server with PHP8 and local computer Win10 with Chrome).
Please find enclosed in the video how it works on my computer and how you can extend functionality if you need any other.
Does it behave on your configuration the same way or differently?
https://drive.google.com/file/d/1kbKyL1 ... sp=sharing
If you like nuBuilder, please leave a review on SourceForge
Re: Saving report as a pdf
And now for the last couple days we're back to the same error. The system try's to save a php and gets a network error when saving. And I think I have a clue, when saving to the network attached storage I get the failure and to a local drive it works as expected. The workstation is Ubuntu 20.04 desk top. Could it be some sort of sandboxing that Ubuntu is doing? Where I eventually plan to go with this is to save a copy on the server and email the report to the customer.
-
- nuBuilder Team
- Posts: 506
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 8 times
- Been thanked: 18 times
Re: Saving report as a pdf
Hi,
You can try to save the pdf report to the disk on the server to the temp directory with:
https://wiki.nubuilder.cloud/ ... ReportSave
File name with path info will be stored in the mysql table pdf_temp
You can download as well the pdf from server to the local computer as following:
https://your.address/temp/nupdf_600b54434c864f0.pdf
Make sure that temp folder has proper writing permission:
chmod 744 temp
chown -R www-data:www-data temp
You can try to save the pdf report to the disk on the server to the temp directory with:
https://wiki.nubuilder.cloud/ ... ReportSave
File name with path info will be stored in the mysql table pdf_temp
You can download as well the pdf from server to the local computer as following:
https://your.address/temp/nupdf_600b54434c864f0.pdf
Make sure that temp folder has proper writing permission:
chmod 744 temp
chown -R www-data:www-data temp
If you like nuBuilder, please leave a review on SourceForge
Re: Saving report as a pdf
Hi Janusz, Finally got around to trying this and it works! While I can see the entry in pdf_temp, what are your thoughts on how to use that data? It would be nice to have the report code in there so we'd at least know what report it was.
-
- nuBuilder Team
- Posts: 4291
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 443 times
- Contact:
Re: Saving report as a pdf
treed,
I added a new column pdf_code in the table pdf_temp.
So when you call nuRunReportSave() to save a report, the report code is stored in the table too.
Updated these 2 files on Github:
core/nusystemupdatelibs.php
core/nurunpdf.php
Run "Update" after replacing these files.
Please let me know if it works for you.
I added a new column pdf_code in the table pdf_temp.
So when you call nuRunReportSave() to save a report, the report code is stored in the table too.
Updated these 2 files on Github:
core/nusystemupdatelibs.php
core/nurunpdf.php
Run "Update" after replacing these files.
Please let me know if it works for you.
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore