Skip to Content
0

Capture the last 2 values of a field in Crystal Reports

May 18, 2017 at 06:46 PM

47

avatar image

Is there a way to capture the last 2 values of a field in Crystal Reports either by formula or some other way. A persons weight can get documented multiple times a day, is there a way to get the last 2 values only to display on a report ?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ian Waterman May 19, 2017 at 07:47 AM
0

Create two formula

@Count

whileprintingrecords;

global numbervar n:=n+1;

@Countreset

whileprintingrecords;

global numbervar n:=0;

Place count in detail line and suppress

Place countreset in patient group header and suppress

In section expert go into the formula box on the Suppress section and enter this condition

whileprintingrecords;

{@Count}< count({anydetailfield}, {yourpatientgroupfield})-1

Ian

Share
10 |10000 characters needed characters left characters exceeded