Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Line Count Post Reply Post New Topic
Author Message
sandy
Groupie
Groupie


Joined: 10 Jan 2007
Location: United States
Online Status: Offline
Posts: 45
Quote sandy Replybullet Topic: Line Count
     Posted: 14 Jan 2009 at 10:31am
I have a report that I am trying to get a count of the number of inspections:
AP # 23521                          GH1a   bldgappl.apno
  Trans:   62,322   $200       Gh1b  calls a subreport to display trans#
  Trans:   65,222   $10
     Inspection #:  22223            Gh2     bldginsp.adbldginspkey
     Inspection #:  23423
     Inspection #:  32452
What I would like to do is sum the # of inspections (in this case 3)
then I would like to show that total in GH1a similar to:  # Inspections: 3
I donot use the detail section of the report
 
I am having a bit of difficult with the counts.   Although I always display the correct detail of inspections I never can get the count correct.  Could this have something to do with the linking??? 
 
Also, the user has requested that the AP record #23521 continues to show on the report until all inspections (whether there are 2 or 3) remain on the report until they have all been completed.    Any suggestions?  Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Jan 2009 at 11:35am
For you inspections count do not do a sum, do a Summary as a distinct count on the inspection # field at Group1 and insert it into GH1 (do not use a running total because they must be in a group footer, a summary can be in a header).

The second request I am not sure of exactly what you want but I think you are asking for the AP# to be excluded if the DistinctCount of the inspections is=0.

If that is the case you can exclude it from the report by using the above Summary of the distinct count in your select formula: as {DistinctCountSummary}<>0 or if you just want to suppress GH1a and GH1b on this use your section expert and use a formula to suppress as {DistinctCountSummary}=0

IP IP Logged
sandy
Groupie
Groupie


Joined: 10 Jan 2007
Location: United States
Online Status: Offline
Posts: 45
Quote sandy Replybullet Posted: 14 Jan 2009 at 12:08pm
Gosh I was making it soooo much harder.  Never thought to try Distinct count.    Thanks so much!!!!!Smile
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum