I am very much new to printing using FWH. I need to print Invoices from the application using FWH on a laser printer.
I am trying to convert only the printing portion of an old Clipper application. My new FWH application will have a dialog with a text box in it accepting the Invoice no. Once the user keys in the Invoice no. the FWH application should print on an Blank A4 paper on a laser printer with all the Heading, Address, Invoice No, Date, Boxes/Lines and then the detailed lines containing the Items and then at the end of the page with the Bill Total and other Statuatory declarations.
In DOS Clipper I am doing this using the code
- Code: Select all Expand view
- @prow()+1,00 say BOLD_ON+PADC("Company Name",80) +BOLD_OFF
@prow()+1,00 say PADC("Company Address",80)
@prow()+1,00 say "Invoice No : "+str(nInvoiceNo,4)
@prow() ,50 say "Invoice Dt : "+dtoc(dInvDate)
@prow()+1,00 say "/---------------------------------------------------------------------------------------------\"
@prow()+1,00 say "| Sr# | Item Name | Qty | Price | VAT % | VAT Amt | Total Amt |"
@prow()+1,00 say "|-------|--------------------|--------|----------|----------|--------------|---------------|"
// Process and Print the Line Items
Do while Bill->InvoiceNo == nInvoiceNo .and. !eof()
cLine:="|"+str(n++,5)+"| "+ITEM_NAME+" | "+str(QTY,3)+" | "+STR(PRICE,8,2)+" | "+str(VAT_TYPE)
cLine+=+" | "+ STR(VAT_AMT,8,2)+" | "+str(TOTAL_AMT)+" |"
@prow()+1,00 say cLine
Select Bill
Skip
Enddo
@prow()+1,00 say "|-------|--------------------|--------|----------|----------|--------------|---------------|"
@prow()+1,00 say "| TOTAL |"+str(GRAND_TOTAL)+" |"
@prow()+1,00 say "\---------------------------------------------------------------------------------------------/"
Bill should appear like this
- Code: Select all Expand view
- [b]ABC Company[/b]
Address 12/123445, That Street, Pincode : 999999
Invoice No : 23 Invoice Dt : 15-05-2009
/---------------------------------------------------------------------------------------------\
| Sr# | Item Name | Qty | Price | VAT % | VAT Amt | Total Amt |
|-------|--------------------|--------|----------|----------|--------------|---------------|
| 1 | Item 1 | 3 | 10.00 | 4% | 0.40 | 10.40 |
| 2 | Item 2 | 5 | 15.00 | 4% | 0.40 | 15.40 |
| 3 | Item 3 | 2 | 20.00 | 4% | 0.40 | 20.40 |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
|-------|--------------------|--------|----------|----------|--------------|---------------|
| TOTAL | 46.20 |
\---------------------------------------------------------------------------------------------/
Goods once sold will not be take back .........
Any sample code will be helpful. I am confused after seeing the Samples TestPrn3 etc etc. like CMSay()
I would also like to use Boxes and Lines instead of the character "-----" so that the print out appears neat and tidy
Regards
Anser