JohnnyLong
Programmer
I have been asked to produce reports to show when a certain date has expired. Instead of having 5 separate reports we would like to have just 1. We want to use 1 stored procedure like this
CREATE PROCEDURE sp_CertificateReports
AS
/***A8 Returned By***/
SELECT Surname AS SurnameA8, FirstName AS FirstNameA8, A8ReturnedDate
FROM rc_Candidates
WHERE A8Returned <= DATEADD(day,30,CURRENT_TIMESTAMP)
ORDER BY A8Returned ASC
/***PLI Expiry Dates***/
SELECT Surname AS SurnamePLI, FirstName AS FirstNamePLI, PLIExpiryDate
FROM rc_Candidates
WHERE PLIExpiry <= DATEADD(day,30,CURRENT_TIMESTAMP)
ORDER BY PLIExpiry ASC
RETURN
If I select the stored procedure in Crystal's database expert and then in the report design choose Database Fields from the Field Explorer, I am only given fields from the first Select statement. Is there any way to see the other fields so I can drag them onto my report?
Hope this is clear.
CREATE PROCEDURE sp_CertificateReports
AS
/***A8 Returned By***/
SELECT Surname AS SurnameA8, FirstName AS FirstNameA8, A8ReturnedDate
FROM rc_Candidates
WHERE A8Returned <= DATEADD(day,30,CURRENT_TIMESTAMP)
ORDER BY A8Returned ASC
/***PLI Expiry Dates***/
SELECT Surname AS SurnamePLI, FirstName AS FirstNamePLI, PLIExpiryDate
FROM rc_Candidates
WHERE PLIExpiry <= DATEADD(day,30,CURRENT_TIMESTAMP)
ORDER BY PLIExpiry ASC
RETURN
If I select the stored procedure in Crystal's database expert and then in the report design choose Database Fields from the Field Explorer, I am only given fields from the first Select statement. Is there any way to see the other fields so I can drag them onto my report?
Hope this is clear.