Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Parameter based on a formula? Post Reply Post New Topic
Author Message
Megan10e
Newbie
Newbie


Joined: 19 Aug 2010
Online Status: Offline
Posts: 24
Quote Megan10e Replybullet Topic: Parameter based on a formula?
    Posted: 01 Sep 2010 at 10:43am
I want my report to display customers whose order totals fall into certain ranges, but the order totals are a calculation (the orders are on the database as separately, but I'm using a formula to get the total of the orders). I need to create a parameter based on that formula, so that I can use conditional formatting to only show customers whose order totals fall into the selected ranges.
 
How could I do this in a different way?
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 02 Sep 2010 at 2:17am

Instead of using the parameters in the Selection Expert, use them to suppress the detail when they don't meet the criteria in the Section Expert.

|< /\ '][' ( )
IP IP Logged
Megan10e
Newbie
Newbie


Joined: 19 Aug 2010
Online Status: Offline
Posts: 24
Quote Megan10e Replybullet Posted: 07 Sep 2010 at 10:52am
Okay, I did this, and it works well if I'm only selecting one range, but I want the parameter to allow for multiple selections.
 
My formula looks like this:
 
({?Range Select}="< 101" and Sum ({HORDHDR.ORDERTOTAL},{HORDHDR.CUSTNO}) >100.99)
or
({?Range Select}="101-1000" and Sum ({HORDHDR.ORDERTOTAL},{HORDHDR.CUSTNO})  <> 101 to 1000.99)
or
({?Range Select}="1001-2500" and Sum ({HORDHDR.ORDERTOTAL},{HORDHDR.CUSTNO})  <> 1001 to 2500.99)
etc.
 
So the formula is saying: suppress this section when the parameter chosen is "< 101," and the totals come to more than 101, so all the totals I want are shown. But when I select more than one range, they cancel one another out and no values are shown. How can I fix this?
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.031 seconds.