I'm using Crystal 9.0 with a SQL database. My end result is a 3 page form with fields that would be filled in based on specific data elements. So far I've made my form in the report header using 3 sections with a new page after each section.
I have 1 group in the report which I've hidden and I've hidden the detail segments.
Here is my SQL statement:
SELECT DISTINCT "PcsPocWorkTdResults"."QueryID", "AdmVisits"."AccountNumber", "AdmVisits"."Name", "PcsPocWorkTdResults"."DateTime", "PcsPocWorkTdResults"."Response", "PcsPocWorkTdResults"."VisitID"
FROM "livedb"."dbo"."AdmVisits" "AdmVisits" INNER JOIN "livedb"."dbo"."PcsPocWorkTdResults" "PcsPocWorkTdResults" ON ("AdmVisits"."VisitID"="PcsPocWorkTdResults"."VisitID" AND ("AdmVisits"."SourceID"="PcsPocWorkTdResults"."SourceID"
WHERE "AdmVisits"."AccountNumber"='V00015867534' AND "PcsPocWorkTdResults"."Response"<>''
ORDER BY "PcsPocWorkTdResults"."QueryID"
The formula works fine if there is only one response. However most of the data I want on the form has multiple entries and I'm only interested in the last entry. I've made the following formula:
if {PcsPocWorkTdResults.QueryID} = "APS.ACTAB2"and
{PcsPocWorkTdResults.DateTime}=MAXIMUM({PcsPocWorkTdResults.DateTime},{PcsPocWorkTdResults.QueryID})
then {PcsPocWorkTdResults.Response}
Which works great if the formula is placed in the detail or even group sections.
I've tried moving my form pages to the report footer so that the formula is evaluated first with no luck.
My next thought is an evaluation statement but when I use them I get the following error:
"Too many arguments have been given to this funciton"
Does anyone have any thoughts on how to do this?
I have 1 group in the report which I've hidden and I've hidden the detail segments.
Here is my SQL statement:
SELECT DISTINCT "PcsPocWorkTdResults"."QueryID", "AdmVisits"."AccountNumber", "AdmVisits"."Name", "PcsPocWorkTdResults"."DateTime", "PcsPocWorkTdResults"."Response", "PcsPocWorkTdResults"."VisitID"
FROM "livedb"."dbo"."AdmVisits" "AdmVisits" INNER JOIN "livedb"."dbo"."PcsPocWorkTdResults" "PcsPocWorkTdResults" ON ("AdmVisits"."VisitID"="PcsPocWorkTdResults"."VisitID" AND ("AdmVisits"."SourceID"="PcsPocWorkTdResults"."SourceID"
WHERE "AdmVisits"."AccountNumber"='V00015867534' AND "PcsPocWorkTdResults"."Response"<>''
ORDER BY "PcsPocWorkTdResults"."QueryID"
The formula works fine if there is only one response. However most of the data I want on the form has multiple entries and I'm only interested in the last entry. I've made the following formula:
if {PcsPocWorkTdResults.QueryID} = "APS.ACTAB2"and
{PcsPocWorkTdResults.DateTime}=MAXIMUM({PcsPocWorkTdResults.DateTime},{PcsPocWorkTdResults.QueryID})
then {PcsPocWorkTdResults.Response}
Which works great if the formula is placed in the detail or even group sections.
I've tried moving my form pages to the report footer so that the formula is evaluated first with no luck.
My next thought is an evaluation statement but when I use them I get the following error:
"Too many arguments have been given to this funciton"
Does anyone have any thoughts on how to do this?