Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Hide formula as per group

Status
Not open for further replies.

raccess

Programmer
Dec 31, 2002
91
0
0
US
Hi,

I want to display some formulas as per group name. How can I do that with Crystal 10?

Colm1
Grp1
Formula1

Grp2
Formula2


I know I have to put some code in Formula's suppress section. But I don't know what type of expression I have to put to suppress formula based on group.

Thanks,

R
 
Dear Raccess,

Can yoube perhaps more explicit?

regards,

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Please post technical information:

Crystal version
Databsae/connectivity used
Example data
Expected output

If you want to conditionally suppress a formula field, right click it and select format field->Common and place the condition in the X2 next to Suppress

-k
 
Hi,

I'm using

Crystal-10
DB = ORACLE

I have report in which i have two formulas and wants to show formula as per group's value.

These formulas calculate employee expense as per department number. So if there is DeptNumber = 001 then I would like to use Formula1 and if DeptNumber = 002 then use Formula2. Here report is grouped on DeptNumber.

Both formulas are on same column and at group level it's showing total.
I know I can create two different reports but wants data in single report.

How I can do this that dynamically as per group value report shows value from formula.

Thanks in Advance,
R


 
Why not use one formula instead of two, e.g., something like:

if {table.dept} = "Dept A" then
{table.qty} * {table.discount} else
if {table.dept} = "Dept B" then
{table.qty} * {table.cost} else
{table.qty} * {table.otheramt}

Otherwise, if you feel you need to use separate formulas, you can suppress them by using the corresponding department value, e.g., to suppress the Dept A formula for all departments except A, use a field suppression formula of:

{table.dept} <> "Dept A"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top