Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crosstab + parameter selection Post Reply Post New Topic
Author Message
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Topic: Crosstab + parameter selection
    Posted: 04 Jul 2007 at 3:06am
I have a report that has several parameters, each of which is either 'All' or a selection. There is a crosstab in the footer which summarises one of the fields, and the overall total in the crosstab should match with the numbers of records actually brought back depending on the parameter selections.
So far, so good. But one of the parameters only relates indirectly to the records, and I get the right details records showing by using a conditional formula to suppress the detail section when required. This does not show in the crosstab. All the other parameters are in the Report Selection in one way or another, the crosstab works with these.
How can I tell the crosstab that if {?Area} is not 'All' it should only count those records where {?Area} = 'S' (for example)
I have looked at Group formula in the crosstab but I don't see how or if that would work.
Thank you
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 04 Jul 2007 at 9:12am
That's a tough question. I'm not sure what the answer is. Buy my initial idea is that rather than base the crosstab on a field, base it on a formula. THe formula performs the logic you are talking about and if successful it returns the field's value. If not successful then it returns a zero. That might work. 
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 05 Jul 2007 at 3:58am

Thank you for your encouragementBig%20smile  I have spent the best part of a day on it, and finally got it to work! 

The explanation I gave you initially was very simplified. I am already using formulae both in and out of the crosstab, and quite a few of those give rise to nulls, due to incomplete data in the tables.  I now have a string of formulae which find the nulls, check the criteria and label each record with a 1 or 0. Summing these gives the result I want, as you suggested.

Now all I have to do is adapt it for the other two even more complicated reports......

IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.023 seconds.