I want to create the PDF directly with the SaveAs FiveWin, after making the report of the dps EndPrint use saveas, how to operate?
I want to create the PDF directly with the SaveAs FiveWin, after making the report of the dps EndPrint use saveas, how to operate?
if you are using FWH13.04, you can use
PRINT oPrn FILE "filename.pdf"
In case of REPORTs, first create oPrn as above and then use REPORT command DEVICE oPrn
In case of earlier versions, this would help.
&
#include "FiveWin.ch"
#include "report.ch"
request DBFCDX
STATIC oReport
Function Rep01()
LOCAL oPrn, oReport
USE TEST NEW VIA "DBFCDX"
Print oPrn FILE "report.pdf"
REPORT oReport TITLE "*** My First Report ***" TO DEVICE oPrn
COLUMN TITLE "St" DATA Test->State
COLUMN TITLE "First Name" DATA Test->First
COLUMN TITLE " Salary" DATA Test->Salary
END REPORT
oReport:CellView()
ACTIVATE REPORT oReport
CLOSE TEST
RETURN NILit also flashes a message box on the screen but it vanishes too fast for me to see it.
OK, so I am going to have to modify the report class to prevent the dialog from being displayed?
Regards,
James
If you think about it again, you will appreciate that this dialog is necessary ( or atleast very much desirable).
For longer reports (real life situations in an application) user needs some visual indication that the report generation (in this case pdf generation) is in progress. Otherwise the user has no clue as to what is happening and the application appears to be doing nothing.
If you still want to remove it you need to modify the Activate method of report class (towards the end, you can find DEFINE DIALOG ::oRepWnd).
Rao,
Yes, I agree with you, however, most of my reports are one page and are going directly to email so there isn't much of a delay. I am considering a progress bar in the status bar instead of the center screen dialog.
Also, whenever I see a long report I have to wonder if it can be shorter. A long report indicates to me the the users haven't yet figured out what information they really want. Once we can that defined then one page usually is enough.
Thanks for your reply.
Regards,
James
One simple improvement can be that the dialog be made visible if the report is going more than say two pages.
In the generic report class, progress bar may be difficult, because report class does not know in advance how many pages will be printed. Actually report class does not know the datasource and it navigates only in forward direction.
But such customisations are possible for individual programmers because they know what kind of data they are dealing with.
Rao,
I forgot about the pages issue. One possibility is a back-and-forth bar just to show it is busy. I will have to do some more thinking on this.
Thanks for the suggestions.
James