Create report group headers based on criteria

  • Thread starter Thread starter ernpal
  • Start date Start date
E

ernpal

I have a report that prints out a statement based on weekly invoices
for 24 customers. However, the 24 customers are not all the same
company. Here's what I want to do:
1) group by company with grand total then
2) group by customer with subtotals

The customer table does not have a "company" field, but the customer
number indicates the company. If the customer number is 1-199, it's
one company; if it is >= 200, it's the other.

Any ideas?

Thanks,
E
 
ernpal said:
I have a report that prints out a statement based on weekly invoices
for 24 customers. However, the 24 customers are not all the same
company. Here's what I want to do:
1) group by company with grand total then
2) group by customer with subtotals

The customer table does not have a "company" field, but the customer
number indicates the company. If the customer number is 1-199, it's
one company; if it is >= 200, it's the other.

Any ideas?

Thanks,
E

I get to use the same answer twice. Base the report on a query and set
up a query with a temporary (computed) "Company" field using an IIF
statement based on the customer number.
 
Thanks... I though of that after I posted the question, as I re-read
the last sentence. I guess what they say is true... "A problem well
defined is a problem half solved."

And by the way... the suggested solution, worked.
 
I got the report separating into the two company groups, but I noticed
another problem. Firstly, to try and make things a little clear,
here's the report's structure:

---------------------------------------------------------------------
Page Header:
<blank>
---------------------------------------------------------------------
Company Header:
[CompanyName] [=Sum([SubTotal])]
---------------------------------------------------------------------
CustomerID Header:
[CustomerName]
---------------------------------------------------------------------
Details:
[InvoiceDate] [InvoiceID] [SubTotal]
---------------------------------------------------------------------
CustomerID Footer:
Customer Total: [=Sum([SubTotal])]
---------------------------------------------------------------------
Page Footer:
[="Page " & [Page] & "of " & [Pages]]
---------------------------------------------------------------------

Here's the problem: I want the section grouped on CustomerID to span
two columns, but I do not want the "parent" group's header (Company
Header) to get divided into columns. I want to the Company group
header(s) to cover the width of the page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top