Invoicing system - Different first page - print preview problem



Hi,
I am trying to build an invoicing system in Access 2003. Eventually, I would
like to retrieve data from a server, populate tables, preview and print
invoices. I have managed to do everything except the preview part.
An invoice has the following properties:
- all pages have the same header (company logo and contact details + customer
name and address)
- the first page contains a stub that the customer will cut and send back to
us with a check
- the first page can contain 12 records maximum (because of the stub)
- the following pages can contain 24 records each
Users will have access to a form to select the invoices they want to print
preview and/or print.
What I have done so far is create a report that contains all the objects I
need (logo, stub, 24 textboxes). I have put everything in the detail section.
Then, in the code, I fill in the pages and hide objects I do not need
depending on the page I am on. Once a page is full, I programatically print
it (using DoCmd.OpenReport).
The problem if I do that is that when I hit print preview I only see the last
page of the invoice as I am constantly deleting and rewriting on the same
page.
So I have changed my report and I am now using a subreport to display only
the records. This subreport is based on a query that retrieves all the
records for this invoice and is contained in the detail section of the report.
The idea here is to change the height of the subreport if I am on another
page than the first one. The thing is, I do not see how I can count pages.
I thought I could create a query that returns only 12 records (using the SQL
keyword TOP) and another query for the other pages and link each one of them
to a subreport. But it still does not solve my problem which is that I want
to be able to see all the pages of one invoice in the print preview window.
Does someone have an idea on how to do that?
Thank you very much for your help.

.



Relevant Pages

  • Re: extending inner border lines for report that displays an invoice
    ... the subreport displays the individual lines within the invoice. ... What we are aiming for is that the subreport which contains the "invoice ... In a main report, this kind of thing is best ... Static intBlanks As Integer ...
    (microsoft.public.access.reports)
  • Re: extending inner border lines for report that displays an invoice
    ... the subreport displays the individual lines within the invoice. ... What we are aiming for is that the subreport which contains the "invoice ... In a main report, this kind of thing is best ... Static intBlanks As Integer ...
    (microsoft.public.access.reports)
  • Getting subreports parameter values in Crystal Reports.NET
    ... they click on an invoice in the details section of the main report. ... I added a on-demand subreport in the details ... Private Sub CRViewer_DrillDownSubreport(ByVal source As Object, ...
    (microsoft.public.vb.crystal)
  • Re: Subreport information not printing when Report empty
    ... The main report has all the heading information, ... One has equipment charges for that invoice ... One has labor charges for that invoice. ... which the subreport needs for its records. ...
    (microsoft.public.access.reports)
  • Re: Calc when zero value
    ... If each invoice is a subreport then you may need to put the text box in the ... > subreport containing the data is a group footer of ... > Footer) of the main report. ...
    (microsoft.public.access.reports)