Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: how to make a chart ignore the suppressed lines? Post Reply Post New Topic
Author Message
rami_7
Newbie
Newbie


Joined: 23 Dec 2007
Online Status: Offline
Posts: 1
Quote rami_7 Replybullet Topic: how to make a chart ignore the suppressed lines?
     Posted: 23 Dec 2007 at 11:32pm
hi.
i have a long data-base and my report shows details of one record only (the user initialieze a parameter field with the record info) - the rest are suppressed. among the shown data, there are 3 fields i would like to make a chart of (line chart). the result chart contains all records instead of one. how do i make crystal ignore the suppressed lines?
thanks,
rami.
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 26 Dec 2007 at 7:10am
The short answer is you can't.  Not really.

There are two basic approaches to handling this kind of scenario, though.  The first is to create a group based on whichever field you are using to suppress, and put the chart in the group header.  This is particularly useful when your parameter is used to select a single value to filter your report (e.g., sales for one region, or for one salesman).  Then, the chart only reports on data for that group, which should give you the slice you want.

If you have a more complex scenario, however, that solution won't work.  In that case, you will want to create a formula for each of the values that you want to appear on your chart.  The formula should be a fairly straightforward IF..THEN..ELSE structure.  IF (criteria to appear in the report) THEN (value to be charted) ELSE (0 if numeric, "" if string).  When you run the chart, this lumps all the suppressed data together into either one group, or ignores it if you are summing the values.  However, do note that zero values can still appear on the chart.  A TopN sorting may help you here.

Out of curiosity, why are you using parameters to suppress data, rather than putting them in the select criteria to actually restrict the data returned?  In the long run, that's probably the preferred solution.

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