PDA

Click to See Complete Forum and Search --> : invoice printing using data report


sudhanuj
May 10th, 2009, 01:09 PM
hi, i am new to vbforums and vb6 . first i would like to thank all posters as i am learning a lot from the archives .

my problem :- i am using data report of vb6 and want to print an invoice . my invoice data is in two header and detail tables.

i want to ALWAYS print the totals at a particular height say 9.00 inch from the top whether the detail has 1 or 15 max rows. at present as soon the details are over the totals are printed.

help is appreciated

rasinc
May 10th, 2009, 08:41 PM
I've never used data reports but in typical report writing, if you want to put something at the bottom of the page, put it in the page footer. However, in some programs, like Crystal you can set the Report Footer, which normally shows up after the line items, to print at the bottom of the page above the page footer.

Hope this helps

sudhanuj
May 10th, 2009, 09:32 PM
thanks rasinc . but as i wrote :-
i want to ALWAYS print the totals at a particular height say 9.00 inch from the top whether the detail has 1 or 15 max rows. at present as soon the details are over the totals are printed.

brucevde
May 11th, 2009, 11:59 AM
The DataReport has very limited functionality. In order to do what you want you would need to (assuming a paper height of 11.5 inches)

Set the height of the Page Footer section to 1.5 inches (by default the Report's Bottom Margin is 1 inch)
Place an rptLabel control in the PageFooter.
Set the rptLabel.Caption property to your total amount using code, for example
DataReport1.Sections("Section3").Controls("Label1").Caption = FormatCurrency(curTotalAmount, 2)

However, when a report spans mutiple pages you might be sol. The total amount will print on every page. There is no way to print a "page total" using the DataReport.

sudhanuj
May 11th, 2009, 09:40 PM
thanks brucevde. i understand . i have the totals in the parent table viz. totalamt , discount amt , gross amt , tax amt , nett amt . can i put them in the page footer .

also , where do i write the code you mentioned , in the form from where i call my report .

i am starting on crystal report 9 . does the section expert help .

help appreciated