I am creating a report using the FWH REPORT class and would like to save it as a PDF file AND name it from my code (no user interface).
If I put the PDF option on the REPORT it pops up the Save As Dialog and they can type a name to save the PDF.
Using the oReport:cName() function it doesn't pop up the dialog, but it also does not seem to save the file.
Is there a different method to try, or am I just not using it properly?
Here is the code being used.
FWH 15.01 + Harbour + Embarcadero C++ 6.50
I have tried the oReport:cName() with full path + file name + extention, also with out extention and just file name only.
Has anyone else already done this???
Thanks,
Brad
P.S. - Really like the latest version of FHW!!
If I put the PDF option on the REPORT it pops up the Save As Dialog and they can type a name to save the PDF.
Using the oReport:cName() function it doesn't pop up the dialog, but it also does not seem to save the file.
Is there a different method to try, or am I just not using it properly?
Here is the code being used.
FWH 15.01 + Harbour + Embarcadero C++ 6.50
REPORT oReport TITLE ALLTRIM(OPTIONS->LOGO1),"INVENTORY VALUE REPORT","FOR "+DTOC(DATE()) CAPTION "Inventory Value Report" ;
HEADER "Date: " + dtoc( date() ), ;
"Time: " + time(), ;
OemtoAnsi( "Page: " ) + str( oReport:nPage, 3 ) ;
RIGHT ;
FONT oFont1, ;
oFont2, ;
oFont3 ;
CENTERED PDF
COLUMN TITLE "UPC CODE" DATA str(UPCCODE,15) LEFT
COLUMN TITLE "Description" DATA UPCDESC
COLUMN TITLE "Stock" DATA CURRENT picture "99999"
COLUMN TITLE "Cost" DATA COST picture[ 99999.99 ]
COLUMN TITLE "Ttl Cost" DATA COST*CURRENT picture "999999.99" TOTAL
COLUMN TITLE "Price" DATA PRICE picture[ 99999.99 ]
COLUMN TITLE "Ttl Price" DATA PRICE*CURRENT picture "999999.99" TOTAL
oReport:cName("INVVALUE")
oReport:CellView()
GROUP on ( DEPT ) HEADER "Department " + str( DEPT, 4 ) + " " + SHOWDEPT( DEPT ) FOOTER "Department Total " FONT 3
end REPORT
if oReport:lCreated
/*
First line of title bold
*/
oReport:oTitle:aFont[ 1 ] := { || 2 }
/*
Total descriptors
*/
oReport:cGrandTotal := "Grand Total..."
oReport:cPageTotal := "Page Total..."
endif
IF m_Dept = 0
ACTIVATE REPORT oReport FOR CURRENT > 0
Else
ACTIVATE REPORT oReport FOR (CURRENT > 0) .and. (DEPT = m_Dept)
EndIfI have tried the oReport:cName() with full path + file name + extention, also with out extention and just file name only.
Has anyone else already done this???
Thanks,
Brad
P.S. - Really like the latest version of FHW!!