Former Member

### How can I duplicate this in Crystal Reports

Can I duplicate the output below in crystal reports 2013?

outi4.png (117.9 kB)
10|10000 characters needed characters exceeded

Former Member
May 25, 2017 at 01:06 PM

How can I get the distinct patient count(Number of Patients) for a given month to show at the top of the page? 2017-03 should have 2 patients and 2017-5 should have 4 patients

10|10000 characters needed characters exceeded
• Following similar format try

@patientMonth1// assuming patient id is a number if string replace zero with two single quotes ''

If {@month} = totext({?End Date}, 'yyyy-MM') then {paitentID} else 0

Unfortunately I think you will need another formula to do a distinct count and then subtract 1 as the default 0 or '' will give you a count of 1

@patientMonth1Cnt

distinctcount(@patientMonth1) - 1

Ian

• May 22, 2017 at 08:23 AM

Yes you can you need to use a manual cross tab, using a similar to the approach I suggested in this question

Ian

10|10000 characters needed characters exceeded
• Former Member
May 24, 2017 at 12:53 AM

How can I make sure that the count is for the dynamic month(2017-04) and so on?

If {@month} = totext({?End Date}, 'yyyy-MM') then count({Command.MRN},{@Med(n)}) --This is the formula for the 2017-05 column.

10|10000 characters needed characters exceeded
• May 24, 2017 at 08:45 AM

I think you will need another formula which will evaluate at detail level

@Count Month1

If {@month} = totext({?End Date}, 'yyyy-MM') then 1 else 0

Then add a sum of that in group {@Med(n)}

Ian