Hello all.
I am using Crystal XI via Citrix connecting to an SQL database.
I am reporting on client data. I am writing a report to use for data integrity as we cannot change the programming of the dbase.
The first stage is to collect information of a particular type of record (s01).
Once that is done, it's intended that this is to be used to check if other records (eg NDA) are in sync with the s01 dates. However, the s01 only has a creation date (eg s01.date) & so I'm using a shared variable to artificially create an end date (the date of the next s01 for that client. If there is no s01 for the client, then the end date is 31/12/1899 (dd/mm/yyyy)).
I've started by creating the report that finds the s01 data & creates the end date. The report is currently grouped on client and then grouped on the s01.date (a rule in the dbase means that a client cannot have more than s01 per day).
Thus:
Client A
s01 date is 12/01/2013 - end date is 07/02/2013 //(the date of the next s01)
s01 date is 07/02/2013 - end date is 03/04/2013
s01 date is 03/04/2013 - end date is 31/12/1899 //as no further s01 for this client, the default date is used.
Client B
s01 date is 15/01/2013 - end date is 30/03/2013
s01 date is 30/03/2013 - end date is 31/12/1899 //as no further s01 for this client, the default date is used.
This works fine.
I then want to use this to check that another type of record (NDA) is in date sync with the s01. Naturally the client can have multiple NDA. I can't see how to use a subreport for this (as I need the s01 date & enddate before I can check the NDA dates), so I was going to use an SQL command.
So my problem is - how can I create a SQL command that includes the shared variable to generate the end date of the s01?
I suspect this isn't possible, but I thought I'd ask.
The only thing I can think of is to create a report that generates the s01 end date etc, export it out into Excel or Access & then create another report that points to this s01 data & the dbase (for the NDA data) which does the comparison.
I'd rather not do this, as this would mean users could not access this report (due to network restrictions).
Edited by iSing - 04 Apr 2013 at 9:53pm