Quickreport forum
Go to Quickreport website
Welcome Guest Search | Active Topics | Log In | Register

Save as .pdf not working (RAD Studio 10.1 Berlin) nothing is saved
Jimmy
#1 Posted : 28 November 2016 10:47:20(UTC)
Rank: Newbie

Groups: Registered
Joined: 28/11/2016(UTC)
Posts: 2

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I am using RAD Studio 10.1 Berlin and in the preview when I click on save as, a dialogue opens and when I type a name and click save nothing is being saved. (funny thing is when I choose .QRP Type it DOES SAVE the .QRP file)

I even downloaded this Sample to double check if not my implementation is wrong but for this Sample the Save as .pdf is not working either http://www.quickreport.c...s/Labels%20by%20row.zip


We purchased the Professional Version and it is still not working.


What could I do wrong?


Thanks for any help
QRAdmin
#2 Posted : 05 December 2016 07:48:18(UTC)
Rank: Administration

Groups: Administrators
Joined: 27/06/2016(UTC)
Posts: 50

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)

This was finger trouble and is solved.
rdmare
#3 Posted : 23 December 2016 13:58:23(UTC)
Rank: Newbie

Groups: Registered
Joined: 23/12/2016(UTC)
Posts: 2
Location: Netherlands

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I have the same issue with Delphi XE7 update 1 and QR 6.00 build 4.08
What is or where can we get the fix?
Jimmy
#4 Posted : 02 January 2017 13:15:37(UTC)
Rank: Newbie

Groups: Registered
Joined: 28/11/2016(UTC)
Posts: 2

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I talked with the Support and this was the trick



"you have not put a QRPDFilter component on ( any) form."


so all you have to do is to apply a QRPDFilter.



However, there is a BIG flaw (not sure a bug or designed so). In case you use RELATIVE paths to access files/databases or whatsoever,
exporting the .pdf will IMPACT the relative path.


e.g. you place your tool.exe in this folder

C:/super/tool.exe

and you use this to access a database

Params.Database := 'DB\' + databaseSelection.Text;

after exporting a .pdf it WILL NO LONGER WORK because the relative path is no longer directing to this
C:/super/DB/XXX.db

but wherever you have exported the .pdf before e.g. to your desktop
then you are redirecting to

C:\Users\YOUR_NAME\Desktop\


Thats pretty mean and it took me forever to figure out because if you export the .pdf to the same directory 'C:/super/'
the code is still working . . .
rdmare
#5 Posted : 03 January 2017 11:56:29(UTC)
Rank: Newbie

Groups: Registered
Joined: 23/12/2016(UTC)
Posts: 2
Location: Netherlands

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi Jimmy, thank you for your posting. Placing a QRPDFFilter component on *any* form indeed fixed the save as PDF issue. Then all the reports have the same 'save as' options.


The confusion here is created by the fact that the Save As button by default offers the '.PDF' and 'QuickReport file (*.QRP)' types. With an added QRPDFFilter component the 'PDF document (*.PDF)' option is added.
IMHO the default '.PDF' option in the Save As... dialog should not be there at all.


As for the relative path issue. We always initialize programs with some global vars:

ProgName := ParamStr(0);
ProgDir := ExtractFilePath(ProgName);
ProgName := ExtractFilename(ProgName); //remove '.exe' using additional code if you want.

Then use ProgDir if you need to build a path/file reference from the application directory. This way you are not depending on the (user changeble) current directory.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.035 seconds.