Hi all
Crystal 11
using a sql view and crystal command
I have a report that show dates and weights
need to be able to show the difference in weight loss or gained.
(IDEALLY Would like it to take the pre date first and then show + or - from Post weight before the date of the pre weight from the next row.)
But do not not mind if it takes it from the row below.
I have the dates in desc order therefore "Post" date is on top and limit to 12 rows.
Would this need to be done via a running total and Please how
Thank you for all your time this would help me enormously
ralph
"Date" "Pre or Post" "Weight" "Weigt Diff"
09/05/2012, "", 85.00, I would like this to show +5,
04/01/2011, "Post", 80.00, -2,
04/01/2011, "Pre", 82.00, -7,
02/01/2011, "", , ,
10/11/2010, "Pre", 89.00, +5 etc,
10/11/2010 "Post" 85.00
08/11/2010 ""
13/10/2010 "" 86.00
30/09/2010 "" 81.90
07/09/2010 "" 110.00
06/09/2010 "" 120.00
10/08/2010 "" 88.15
this is my sql view called patwtht
select p_anthropometry . oid AS recid ,
p_anthropometry . fk_oid AS patientid ,
p_anthropometry . DIDAT AS date ,
p_anthropometry . PREPOST AS prepost , p_anthropometry . DIWT AS weight ,
p_anthropometry . DIBPS AS DIBPS , p_anthropometry . DIBPD AS DIBPD ,
p_anthropometry . DIGAIN AS DIGAIN , p_anthropometry . DIIW AS DIIW ,
p_anthropometry . DIHEIGHT AS DIHEIGHT ,
sp_bmi ( p_anthropometry . oid ) AS BMI from p_anthropometry
order by p_anthropometry . fk_oid , p_anthropometry . DIDAT desc
and in Crystal command
SELECT * FROM patwtht
where Patientid={?ThisPat}
limit 12;
Crystal 11
using a sql view and crystal command
I have a report that show dates and weights
need to be able to show the difference in weight loss or gained.
(IDEALLY Would like it to take the pre date first and then show + or - from Post weight before the date of the pre weight from the next row.)
But do not not mind if it takes it from the row below.
I have the dates in desc order therefore "Post" date is on top and limit to 12 rows.
Would this need to be done via a running total and Please how
Thank you for all your time this would help me enormously
ralph
"Date" "Pre or Post" "Weight" "Weigt Diff"
09/05/2012, "", 85.00, I would like this to show +5,
04/01/2011, "Post", 80.00, -2,
04/01/2011, "Pre", 82.00, -7,
02/01/2011, "", , ,
10/11/2010, "Pre", 89.00, +5 etc,
10/11/2010 "Post" 85.00
08/11/2010 ""
13/10/2010 "" 86.00
30/09/2010 "" 81.90
07/09/2010 "" 110.00
06/09/2010 "" 120.00
10/08/2010 "" 88.15
this is my sql view called patwtht
select p_anthropometry . oid AS recid ,
p_anthropometry . fk_oid AS patientid ,
p_anthropometry . DIDAT AS date ,
p_anthropometry . PREPOST AS prepost , p_anthropometry . DIWT AS weight ,
p_anthropometry . DIBPS AS DIBPS , p_anthropometry . DIBPD AS DIBPD ,
p_anthropometry . DIGAIN AS DIGAIN , p_anthropometry . DIIW AS DIIW ,
p_anthropometry . DIHEIGHT AS DIHEIGHT ,
sp_bmi ( p_anthropometry . oid ) AS BMI from p_anthropometry
order by p_anthropometry . fk_oid , p_anthropometry . DIDAT desc
and in Crystal command
SELECT * FROM patwtht
where Patientid={?ThisPat}
limit 12;