Is there any way to do something like this in Crystal? This is a Visual Foxpro view where I need to find new clients in a contract by comparing activity enrollments this month to enrollments from the start of the contract up to this month:
SELECT Famserv.contr_id, (client demog fields, famserv.contract activity and group _ids)...
FROM famserv
INNER JOIN client ON Famserv.client_id = Client.client_id
WHERE Famserv.contr_id LIKE ?vp_ccontract_id
AND Famserv.start_dt >= ?vp_dstartmonth
AND Famserv.start_dt <= ?vp_dendmonth
AND Famserv.client_id
NOT IN (SELECT Famserv.client_id
FROM Famserv
WHERE Famserv.contr_id LIKE ?vp_ccontract_id
AND Famserv.start_dt < ?vp_dstartmonth
AND Famserv.start_dt >= ?vp_dstartcontract) )
I initially thought I could run Crystal on the results from this, but a VFP parameterized view doesn't show as a Crystal data source. Is there any way around that?
I thought then that I could use Crystal's parameter setup, but there is no way I've found to pass the values to the subquery. Searching the Crystal web site, it says that subqueries can only be done by using a stored procedure. How would you do that, or is there any way around that?
Thanks
Bob Hagan
SELECT Famserv.contr_id, (client demog fields, famserv.contract activity and group _ids)...
FROM famserv
INNER JOIN client ON Famserv.client_id = Client.client_id
WHERE Famserv.contr_id LIKE ?vp_ccontract_id
AND Famserv.start_dt >= ?vp_dstartmonth
AND Famserv.start_dt <= ?vp_dendmonth
AND Famserv.client_id
NOT IN (SELECT Famserv.client_id
FROM Famserv
WHERE Famserv.contr_id LIKE ?vp_ccontract_id
AND Famserv.start_dt < ?vp_dstartmonth
AND Famserv.start_dt >= ?vp_dstartcontract) )
I initially thought I could run Crystal on the results from this, but a VFP parameterized view doesn't show as a Crystal data source. Is there any way around that?
I thought then that I could use Crystal's parameter setup, but there is no way I've found to pass the values to the subquery. Searching the Crystal web site, it says that subqueries can only be done by using a stored procedure. How would you do that, or is there any way around that?
Thanks
Bob Hagan