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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report Formula

Status
Not open for further replies.

Manish09

Programmer
Joined
Dec 6, 2011
Messages
1
Experts ,

I need your help in crystal report.
I have 4 Feilds in detail section

Sample Frombale Tobale Qty
A 1 6 3
A 7 9 4
A 11 15 4
B 16 18 2
B 19 21 2
B 23 25 1


Output required
Sample FromToBale TotalQty
A 1-9 7
A 11-15 4
B 16-21 4
B 23-25 1


Thanks
 
How are determined the values for FromToBale column ?

What will be the output for a record like this:
Sample Frombale Tobale Qty
A 5 14 3




Viewer, scheduler and manager for Crystal reports.
Send you report everywhere.
 
Please explain the rule that lumps 1-6 with 7-9 but keeps 11-15 separate.

Whatever the rule is, if you create a formula field that applies it at detail-line level, you can then group, suppress details and show group totals. Or do a crosstab.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Extra idea - if you lump records where 'To' of one is immediately before 'From' of the next, they you can check this condition:
Code:
{Sample} <> Previous({Sample})
or 
{Frombale} <> (Previous({Tobale}) + 1)
First check this works against the data, that it displays True or False. Then do a running total using it, clearing when a discontinuity is found. Finally have an extra detail that is suppressed except where a discontinuity is found.

You can't group using tests that relate to more than one detail line, as with a Next or Previous test.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top