Print Page | Close Window

formula field

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=15023
Printed Date: 05 May 2024 at 9:56pm


Topic: formula field
Posted By: radheshyam
Subject: formula field
Date Posted: 24 Nov 2011 at 10:57am

User has two options through radio buttons in the front end:
1. with tax
2. without tax

If the user selects option 1, then I should filter the report based on table.tax>0
If the user selects option 2, then I should filter the report based on table.tax=0

 
I need to write the formula for it and include in the record selection formula.

And I should make the formula applicable to subreport as well.

I have done the following, could anyone let me know if I am right or wrong

I have a taken a parameter field named 'tax' of type string

then I introduced a formula field named 'tax'

if ({?tax} = "Without tax") then
{table.tax}=0
else if({?tax} = "With tax") then
{table.tax}>0

Then in the record selection formula

I just added

@tax

Is this method right or any flaws in it.

Could anyone correct it and also let me know how do i make it applicable in subreport



Replies:
Posted By: rahmaniac22
Date Posted: 28 Nov 2011 at 4:19am
Create a linked subreport using the same parameter.



Print Page | Close Window