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!

Formulae calculation for the field 1

Status
Not open for further replies.

satyakumar

Programmer
Jun 29, 2008
44
0
0
US
Hi Folks,

I need some help in writing the formulae.

My Requirement is from database I am getting like this.

Person Status Code
------ -----------
ABC YES
DEF NO
GHI NO
JKL NO

I need to put a check box in Report Footer if status code for any person is 'YES' then I have to check the box. If the status code for any of the person is not YES then I have to uncheck the box. How do I write the formulae and put it in the Report Footer.
 

use 2 text boxes set to suppress when they are not to be seen.

for the unchecked box: use the font Webdings. the 'c' is an empty checkbox.
for the checked box: use the font WingDings2. the 'R' is a checked checkbox.
 
create a formula and place it in the details.
//{@TestCondition}
IF {table.StatusCode}="Yes" then 1 else 0;

create a Summary of the formula {@TestCondition} and 'Calculate this summary as' use Sum.

then on each text field, right click and select 'Format Text'
On the first tab, check the suppress checkbox and click on the formula editor (x+1) button.
enter in:
Sum ({@TtestCondition}, {GROUPEDONFIELD})=0

Replace {GROUPEDONFIELD} with the name of the grouped field used in the Summary.
change the =0 to >0 to suppress the other text box.
 
YOu could simplify process without need for formatting two text boxes

Use a single formula and then format that as webdings

If Sum ({@TtestCondition}, {GROUPEDONFIELD})=0 then 'c' else 'R'

Ian

 
Ian - that won't work unless you can also change font.
the checked checkbox is a Wingdings2 and the unchecked checkbox is Webdings.
 
Sorry skim reading again ;-)

I think you can do it with Wingdings 2 with a P and space then put a border around the field

Ian
 
Ian - good idea!
also could use Marlett and an 'a' as the checkmark and format the border as you said.
 
Thank you fisheromacse.. That formulae helped a lot and worked well....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top