Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Supressing Fields after a certain number Post Reply Post New Topic
Author Message
Virtualdodo
Newbie
Newbie


Joined: 11 Oct 2011
Online Status: Offline
Posts: 4
Quote Virtualdodo Replybullet Topic: Supressing Fields after a certain number
     Posted: 11 Oct 2011 at 6:06am
Here is the scenario we are using crystal reports 8.5 (Dont ask long story) We have a report that returns a list of deposits made we want to limit it to 4 showing up so if the user has 6 only 4 will show up and the last two will be surpressed, Right now it is a details section (How it has to be due to restrictions from the software) How do I do this? I would also like to have it show a message if it has to hide deposists so users know to refer to a different report that lists them all.

hopefully that makes sense

thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Oct 2011 at 6:20am
one way.
I assume here you have a grouping on the the depositer/customer
add a Running Total
name=suppressCount
field to summarize=anything that is on every row
type=count
evaluate=for each record
reset=on group (your deposite/customer group)
 
suppress  details with
{#suppressCount}>4
in the footer you can add a formula for you notification to the user of extra records (you can also use the actuall rT to give teh total count if you want)
if {#suppressCount}<5 then "" else "more records available at wherever"
IP IP Logged
Virtualdodo
Newbie
Newbie


Joined: 11 Oct 2011
Online Status: Offline
Posts: 4
Quote Virtualdodo Replybullet Posted: 11 Oct 2011 at 6:24am
ok maybe i did somthing wrong but I think I follwed your steps I set it to 2 to test and it is supressing when there are more then two but it is supressing everything in the detail not just the last 2 records?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Oct 2011 at 6:27am
add teh running total to the detail section
you should see it count each change per row and reset back to 1 on change of the customer (group).
 
Customer A
item 1
item 2
item 3
 
Customer B
item1
 item 2
 
Customer C
item 1
etc.
is that working?


Edited by DBlank - 11 Oct 2011 at 6:29am
IP IP Logged
Virtualdodo
Newbie
Newbie


Joined: 11 Oct 2011
Online Status: Offline
Posts: 4
Quote Virtualdodo Replybullet Posted: 11 Oct 2011 at 6:31am
I added the running total and it is just adding the fields together, So the first deposit is 5000 which is shows then if the next one is 2500 it shows 7500 is that how it is suppose to work?

Only 1 customer will appear on each report it is contract.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Oct 2011 at 7:05am
the evaluation type is COUNT not SUM

Edited by DBlank - 11 Oct 2011 at 7:06am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Oct 2011 at 7:08am
you can make reset=never if it is always one customer per report
IP IP Logged
Virtualdodo
Newbie
Newbie


Joined: 11 Oct 2011
Online Status: Offline
Posts: 4
Quote Virtualdodo Replybullet Posted: 11 Oct 2011 at 7:16am
Originally posted by DBlank

the evaluation type is COUNT not SUM


yeah got that after I sent it

thanks for your help working great now
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Oct 2011 at 7:21am
Thumbs%20Up
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