Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'New Page before/after' concerns 1

Status
Not open for further replies.

marabou

IS-IT--Management
Jan 12, 2001
86
GB
I have a query concerning the 'new page after' and 'new page before' options in 'format section'.

I would like the report to start a new page after every change of name of two groups where either one or the other is displayed depending on whether the group above that is true or false.

I have ticked new page before or after on both group footers, however, this messes with the data displayed on the page. If there are no breaks in the report the data is as it should be. However if there are then it breaks the data up and puts what should be a list onto seperate pages.

Is there any other way to specify when a new page should be started, or a way to do the above without it messing with the data.

I would really appreciate any help on this

Thanks in advance
 
What do you mean by a "break"?
Have you tried just doing the New Page After with just the Group 1 footer?
Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Sorry, I mean any page breaks (new pages before or after).

I have tried doing a New Page After the group 1 footer, but that isn't where I need a new page to start.

I am currently working on a formula within the Section Editor for new page after in each group (however, it still does the same as before).

Next ({CUSTOMERS.NAME}) <> Previous ({CUSTOMERS.NAME})

or
Next ({CUSTOMERS_AGENTS.NAME}) <> Previous ({CUSTOMERS_AGENTS.NAME})

The problem is that because of the change in groups at runtime, it is listing the customers who have bought from an agent on seperate pages, whereas I need a list, headed by the agent's details, of customers who have bought from them. Or if the customer bought directly from the company, their details and a list of what they have bought. The Customer/Agent details come from the same table and whther they are an agent or not is only held in the sales table.

Any ideas would be greatly appreciated

Thanks in advance
 
You didn't mention a change in the groups at runtime before. What controls the change? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Sorry, I thought I had.
A group above them which is a formula based on a boolean within the AgentID field if it is null within the sales table.

My group tree looks like this

Products -
Is Agent -
Agent Details - (changes at runtime)
Customer Details - (changes at runtime)
Details (sales and customer names)

Hope that's clearer
Any ideas would be greatly appreciated
 
Sorry, that is not clearer.

Open up the &quot;Change Group Expert&quot; and tell me what the group fields are. Give me the actual field names. If any of these fields are formulas, give me the formula for that field. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
The Group Name fields are, in order

PRODUCTS.NAME - A
@Licence Agent - A
CUSTOMERS_AGENTS.CUSTOMERID -
CUSTOMERS.CUSTOMERID - A

Where @Licence Agent - A =

If IsNull ({LICENCES.AGENTID}) Then &quot;Direct Customer&quot; Else &quot;CASCAiD Agent&quot;

Hope that that's clearer (sorry, I've never been very good at explaining things)
Thanks in advance
 
Now describe how often you want a page break in both scenarios. My guess is that you don't really want groups 3 and 4, you want either group 3 OR group 4. Which would mean another formula like the one you used for group 2. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
I want a new page on a change of group 3 or group 4.
Where a product is sold through an agent, it should list all sales of that product for one agent and who bought them (clients) on the same page, which it is only doing if I don't put any page breaks in for groups 3 and 4.

If I put page breaks in those groups, it lists more than one sale for an agent(group 2), but only if it was sold to the same customer (client). If there are different clients, it lists them on different pages. The Direct Customers (group 3) are fine as they will only have sales for themselves anyway.

Hope that is clearer
Thanks in advance
 
Sometimes you want a customer page break, and sometimes you dont. This depends on whether an agent is involved.

Create another formula that says:

If IsNull ({LICENCES.AGENTID})
Then {CUSTOMERS.CUSTOMERID}
Else {CUSTOMERS_AGENTS.CUSTOMERID}

Use this as group 3, and delete group 4.

Now page break on group 3. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thanks very much, that has solved my problem.

I did not delete group 4 as I do want a page break on every change of customer/agent. But the grouping on the ID worked wonderfully. I don't know why I never thought of that.

Thanks very much for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top