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

details on the last record of the group

Status
Not open for further replies.

zsyed

MIS
Dec 25, 2011
73
CA
Need Help on formating. I would like to print details only once on the last record of the group. This is to avoid repeatition of details of records. PLase find below example. h/t feild is repeating from details of serial group. I would like to see detiails only once for last serial group.
Serial:1234

h/t:a1
h/t:a2

Serial:2345

h/t:a1
h/t:a2
 
You could use a suppression formula on the detail section like this:

groupnumber <> distinctcount({table.serial})

This assumes you only have a group on {table.serial}.

This would suppress the details for all group instances except the last one.

-LB
 
Another solution is to suppress the group header and all detail lines and show everything in the group footer. Record details in a group footer are the last record, and you can use Report Order to make sure the last record listed is the one you want.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
lbass response did not work because {table.serial} is not just the group but also other group levels exist above this group.

madawc response also did not work because, it print like below:
Serial:1234 h/t:a2
Serial:2345 h/t:a2
 
Then you can create a running total to replace the groupnumber in the suppression formula. What fields are you grouping on? If there are other groups, do you want the details to print only once per some group?

-LB
 
group1:JOBID
group2:MATERIALID
group3:pARTID
group4:SERIAL
details

I would print details for group 4 serial only.
 
Insert a running total {#serial} that is set up to do a distinctcount of {table.serial}, evaluate on change of group {table.serial}, reset never. Place this in a group #4 header or footer and then use a detail section suppression formula like this:

{#serial}<>distinctcount({table.serial})

-LB
 
Hello lbass,

Thanks for the reply. running total {#serial} logic works fine except one record details. This logic is not printing detail section having one record.
 
Try changing the evaluation section of the running total to evaluate for each record.

-LB
 
wish you Happy new year to all.

LB, changing evaluation to each record will print for some single record and for some it won't. I tried other combinations in evaluation but still the result is same.
 
I'm sorry--you should be resetting the running total on change of group: {table.PartID} and the suppression formula would then be:

{#serial}<>distinctcount({table.serial},{table.partID})

This would show one set of details per partID group.

-LB
 
Thanks LB, this trick fixed serial formatting.
 
There is a change in the design: I need to associate a relavant heatlot number for each serial number. The idea is, each serial number has a life cycle. the phses are 1) creation 2) receipt to inventory 3) issue for job 4) shipped.
basically the heat lot number will be introduced at the stage of 2. While printing serial numbers the logic (most probably SQL feild) should go back to serial number transaction to find stage 2 from there go into other table (lot trnsactions) to get the heat lot reference. So, there are two table involved in this query. these two tables re linked with jobID reference. Please note that there may be multiple phase two records exist. We would need to select the the first record.
Any help to get this information?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top