springsoft
November 21st, 2004, 10:21 PM
Hi all,
running CR 8.5 on Win2K.
Connecting to AS400 via ODBC.
In Crystal's SQL designer, you can create summed values which then get aggregated on server side and passed to report as single data lines, which means you can do calculations on them in data section - which means they evaluate at time of reading records and the formulae are therefore available to charts etc.
here's what I can do in SQL designer:
SELECT
MCHUT1."PDATE",
SUM (MCHUT1."RUNTIME")
FROM
"B45NET"."AMRLIB"."MCHUT1"
GROUP BY
MCHUT1."PDATE"
ORDER BY
MCHUT1."PDATE" ASC
This sums RUNTIME data for every row for a given date.
Works fine when I create the query in SQL Designer and then use that query as the data source in a new report.
How can I do this without using Crystal's SQL Designer?
I have tried adding the tables and establishing the joins etc, and creating an "SQL Expression" formula field, and naming it SumRunTime and entering this formula:
SUM(MCHUT2WK."RUNTIME")
but my ODBC connection complains that this invalidates the SELECT clause.
How, in Crystal, can you get it to sum like SQL Designer can, without using Summary fields at the group level???
Thanks
Dave
running CR 8.5 on Win2K.
Connecting to AS400 via ODBC.
In Crystal's SQL designer, you can create summed values which then get aggregated on server side and passed to report as single data lines, which means you can do calculations on them in data section - which means they evaluate at time of reading records and the formulae are therefore available to charts etc.
here's what I can do in SQL designer:
SELECT
MCHUT1."PDATE",
SUM (MCHUT1."RUNTIME")
FROM
"B45NET"."AMRLIB"."MCHUT1"
GROUP BY
MCHUT1."PDATE"
ORDER BY
MCHUT1."PDATE" ASC
This sums RUNTIME data for every row for a given date.
Works fine when I create the query in SQL Designer and then use that query as the data source in a new report.
How can I do this without using Crystal's SQL Designer?
I have tried adding the tables and establishing the joins etc, and creating an "SQL Expression" formula field, and naming it SumRunTime and entering this formula:
SUM(MCHUT2WK."RUNTIME")
but my ODBC connection complains that this invalidates the SELECT clause.
How, in Crystal, can you get it to sum like SQL Designer can, without using Summary fields at the group level???
Thanks
Dave