Mr. Rao,
Can you please set up by default bInit to be DbGoTop() if DBF is used?.
Mr. Rao,
Can you please set up by default bInit to be DbGoTop() if DBF is used?.
elvira wrote:Mr. Rao,
Can you please set up by default bInit to be DbGoTop() if DBF is used?.
And oReport:bInit can be setted globally at the main function?
elvira wrote:And oReport:bInit can be setted globally at the main function?
I see, I was bad myself.
Thank you!!!!!.
cFile := cFilePath( ::aMeta[ 1 ] ) + StrTran( cName, '.', '' ) + ;
Left( HB_TToS( HB_DateTime() ), 14 ) + ".pdf"
Regards,
Michel D.
Genk (Belgium)
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773
cFile := cFilePath( ::oDevice:aMeta[ 1 ] ) + StrTran( cName, '.', '' ) + ;
DTOS( Date() ) + StrTran( Time(), ':', '' ) + ".pdf"Mr. Rao,
I made the change you suggested.
I still go a gpf but now between MsgInfo("cFile") and MsgInfo(cFile).
What now?
Regards,
Michel D.
Genk (Belgium)
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773
Between these two msginfo()s the effective code is
FWSavePreviewToPDF( Self, cFile, .f. )
If we press the PDF button ( between SaveAs button and Email button ) also the same function FWSavePreviewToPDF( Self ) is executed.
First please click this button and see if PDF File is created and displayed properly.
If this works correctly, then we shall lookin into other reasons.
Mr. Rao,
I did some more test at your advice.
I try to save the report as a PDF, but I also got the gpf in that occasion.
I rebuild my application with FWH 13.06 and tried to save my report as a PDF-file. No problem, everything is running fine.
But I noticed something :
In FWH 13.07, a PDF-file is saved and is named after the name of the report. But if I want to open this PDF-file, I got the message that the file is corrupt. Its size is more than 1.5 MB only for 1 page.
In FWH 13.06, a PDF-file is also saved but I have to name it manually. I can open the PDF without any problem. Its size is only approx. 50 KB for one page.
I just wanted to share this with you.
Thanks a lot for all your efforts to help me.
And sorry if my English is not always as it should be.
Regards,
Michel D.
Genk (Belgium)
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773
cFile := cFilePath( ::oDevice:aMeta[ 1 ] ) + StrTran( StrTran( cName, '.', '' ), " ", "" ) + ;
DTOS( Date() ) + StrTran( Time(), ':', '' ) + ".pdf"About Size of PDF:
Even in 13.07, if you select SaveAsPDF option in the drop down menu under the SaveAs button, you still get PDF with compact size. This option uses MSWord's functionality to save as PDF if MSWord 2007 with pdf plug-in is installed.
Mr. Rao,
I substituted the code you send me (cfile = ...) into my preview class, but I still got the gpf at the same place.
I also put "cfile" in a MsgInfo and there are no spaces in the name.
Regards,
Michel D.
Genk (Belgium)
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773
Thanks for your patience.
Please confirm my understanding of the issue.
Saving to PDF through MS Word is working well ( 2nd option in the dropdown menu of SaveAs Button on the Bar).
Yes/No ?
Saving to PDF by pressing the PDF button directly on the Bar: This uses the built-in FW function. Is this working ( though file size is large ) or not?
working / not working.
Send to email is failing with GPF at the SavetoPDF stage in the function. This uses the built in fw function.
Yes/No.
I am aware of one issue with the built-in function that it tries to grap large chunks of memory with _xgrab() and this occasionally, though rarely, fails with run-time error.
While this is working with Harbour or xHarbour problem seems to be with xHb. We need time to locate the issue with xHb. We shall get back soon. Meanwhile please confirm 1,2 and 3 above.