Crystalguru
Technical User
Hello,
I am using CR 8.5, MS SQL 2000 and a stored procedure for this report.
In the stored procedure, one field captures the Height and Weight of a person - call it typecode. Another field captures the numeric value of the height or weight - call this HTWT.
Here is how my data looks like from the stored procedure:
Person ID CodeNum TypeCode HTWT
100 1 Height 65
100 2 Weight 82.89
101 1 Height 60
101 2 Weight 75.45
My report is grouped:
GH1 = Person ID
GH2 = CodeNum
GH3 = Typecode, HTWT
My report looks:
John Smith
Height: 65
Weight: 82.89
My problem is - I need to use the height and weights to form a calculation.
I tried a running total, here's my formula minus the reset and display formula-
whileprintingrecords;
numbervar nHeight;
numbervar nWeight;
numbervar BSA;
nHeight := if {codenum} = 1 then {HTWT}
nWeight := if {codenum} = 2 then {HTWT}
BSA := (nHeight ^ 0.725)*(nWeight^0.432)
I'm not getting the height and weight to calculate. I only get the weight value.
Any ideas?
I am using CR 8.5, MS SQL 2000 and a stored procedure for this report.
In the stored procedure, one field captures the Height and Weight of a person - call it typecode. Another field captures the numeric value of the height or weight - call this HTWT.
Here is how my data looks like from the stored procedure:
Person ID CodeNum TypeCode HTWT
100 1 Height 65
100 2 Weight 82.89
101 1 Height 60
101 2 Weight 75.45
My report is grouped:
GH1 = Person ID
GH2 = CodeNum
GH3 = Typecode, HTWT
My report looks:
John Smith
Height: 65
Weight: 82.89
My problem is - I need to use the height and weights to form a calculation.
I tried a running total, here's my formula minus the reset and display formula-
whileprintingrecords;
numbervar nHeight;
numbervar nWeight;
numbervar BSA;
nHeight := if {codenum} = 1 then {HTWT}
nWeight := if {codenum} = 2 then {HTWT}
BSA := (nHeight ^ 0.725)*(nWeight^0.432)
I'm not getting the height and weight to calculate. I only get the weight value.
Any ideas?