Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2004
    Location
    Raleigh, NC
    Posts
    146

    Question Unanswered: Formatting invoice reports properly

    I'm trying to generate invoice reports for a number of customers, but I'm having some difficulty formatting them correctly. Each invoice should contain the company logo and address at the top of the first page only. If I place it in the 'page header', it will print on every page; however, if I place it in the 'report header', it will only print once at the beginning of the report. Access runs all of the invoices together into 1 report rather than individual reports based on the account.

    Any advice on how I can get the logo/address to print on the first page only? Or how I can place it in the report header and somehow tell Access to print individual reports based on the account?

    Additionally, I'm having the same problem with the footer. I have a calculated control that sums up all of the totals in the 'detail' section and creates a grand total. If I place the calculated control in the 'page footer', it does not work - I get the dreaded "#Error". If I place it in the 'report footer', I get the same effect as with the header. It prints at the end of the report and sums up ALL customers totals instead of for each individual account.

    Any advice on how to remedy this situation would be greatly appreciated. Thanks again and have a good one.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Quote Originally Posted by smacdonaldnc
    Any advice on how I can get the logo/address to print on the first page only? Or how I can place it in the report header and somehow tell Access to print individual reports based on the account?.
    Try this: In the properties window for the Report Form, under the Format tab is a property named: Page Header

    Set this property to: Not with Rpt Ftr

    For the Page Footer property, set it to: Not with Rpt Hdr



  3. #3
    Join Date
    Sep 2004
    Location
    Raleigh, NC
    Posts
    146
    Still no dice. Maybe I should try some rewording:

    I need to print invoices for every Account returned by a query. Each Account can have several pages worth of ads with it. I need the pages for a specific invoice to be numbered 1 of X (where X is the last page of the invoice). Each invoice would restart at 1 and loop until all invoices are accounted for. Each invoice needs the logo in it's header and an address in it's footer. I can print individual invoices just fine, but when I want to print invoices for all accounts, I can get a logo in the header on the first page, followed by all of the accounts, and followed lastly by the address in the footer on the last page. I need the accounts separated and I don't want to have to switch to each account and print individual invoices. Can't this be done programmatically so that I can run all invoices in one shot?

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Use the Report header ... Not the Page Header. The Report Header and Footer appear only once.
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    If you want to print page x of x then the best way I can think of would be to run the report as many times as required.
    If you had a query containing the unique customerID's for the current invoice run I'd then write a bit fo VBA to read that recordset and call the report with the filter set to the customer ID from the recordset, print rather than preview. Iterate throiugh the recordset and print all invoices.

    The reuirement for page n of n is the killer in my view, could your customers make do with page N, you cna set the pagenumber yourself within access. And to get a logo on the first page you could test on a page header print event to see if the customer number has changed, if it has changed then print the logo, otherwise set cancel to inhibit printing the page header. It'll require a bit of VBA code in background.

    You will need to retain the previous / current customer number, you can probably set that in detail_format event

  6. #6
    Join Date
    Sep 2004
    Location
    Charlotte, NC
    Posts
    164
    If you need the Logo on the first page of the Invoice for each account and the address at the very end, get rid of the Report Header and Footer and the Page Header and only use the Page Footer for the Numbering. Use this article to accomplish the page numbering and resetting. http://support.microsoft.com/default...b;en-us;841779

    As for the Logo and the Address, use the Group Header and Footer. That way the Logo will be printed at the beginning of each Group (CustomerID and Account) and the Address will print at the end of the Invoice at the end of the Group.

    TD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •