Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Reporting Current vs previous rows in a table Post Reply Post New Topic
Author Message
achandana01
Groupie
Groupie
Avatar

Joined: 20 Jul 2011
Online Status: Offline
Posts: 59
Quote achandana01 Replybullet Topic: Reporting Current vs previous rows in a table
    Posted: 08 Oct 2012 at 11:34am
Hi,

I do have the following data

Tx ID     Patient Payer
300     10001     2000
301     10001     2000
302     10001     2000
303     10001     2001
304     10001     2001
305     10001     2001
306     10001     2002
307     10001     2002

I would like to know whenever there is a change in payer for that patient I would like to report it.Finally my data should look something like this

                     Payer     
Patient     Current Payer     old     new
10001     2002             2000     2001
10001     2002             2001     2002

I am not sure where to start this report any help will be greatly appreciated.

Thanks,


chand
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 08 Oct 2012 at 1:40pm
group by patient, group by tx ID.
use a shared variable for the 'old' payer...since new should be current...one would suppose.
 
 
IP IP Logged
achandana01
Groupie
Groupie
Avatar

Joined: 20 Jul 2011
Online Status: Offline
Posts: 59
Quote achandana01 Replybullet Posted: 09 Oct 2012 at 7:40am
Can you also suggest me how to do a comparison as I only need to report rows when a payer was changed

Thanks
chand
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 10 Oct 2012 at 5:31am
shared stringvar old;
 
if old <> {table.payer} then
  //do something
 
old := {table.payer};
"" //hide the payer name
IP IP Logged
achandana01
Groupie
Groupie
Avatar

Joined: 20 Jul 2011
Online Status: Offline
Posts: 59
Quote achandana01 Replybullet Posted: 13 Oct 2012 at 3:11pm
Thanks but I couldn't able to get an idea of how to get Old,new, current payer in the scenario which I gave
chand
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.