{REPORT SQL DETAILS:x}
supports @@SQL
handlers and $parameters
, so theoretically, you could use the {formattedOutput}
I need to dig up the proper syntax and delimiters, but this:
[Sales Per Hour: 15, 25, 15, 20, 20]
>Hour|Sales|Tx|AvgTx|%Sales
@@SalesPerHour:6,22
And the Fields coming out of the SQL are:
SELECT CASE
WHEN isnumeric([Hour])=1
THEN (CASE WHEN [Hour]<10 THEN '0'+[Hour]+':00' ELSE [Hour]+':00' END)
ELSE [Hour]
END as [Hour]
, [Amount], [Tickets], [AvgTx], [Percent]
FROM @tbl_Sales
Then the Report should look something like this:
[Sales Per Hour: 15, 25, 15, 20, 20]
>Hour|Sales|Tx|AvgTx|%Sales
{REPORT SQL DETAILS:@@SalesPerHour;9,23:F.Hour,F.Amount,F.Tickets,F.AvgTx,F.Percent::{0}|{1}|{2}|${3}|${4}}
^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
@@handler $parameters Fields........
That might not be exactly correct, but should be close. The semi-colon (;
) is important.
EDIT: I just tried that, and it dos not work. Get this CommandText not initialized
error. Not sure why. Something small is missing. @emre?
EDIT2: the following does not work either. In fact, whenever I use ;parm1,parm2
I get that CommandText
error, even if the SQL has no @parms
within it…
[Sales Per Hour: 15, 25, 15, 20, 20]
>Hour|Sales|Tx|AvgTx|%Sales
@9,23
{REPORT SQL DETAILS:@@SalesPerHour;$1,$2:F.Hour,F.Amount,F.Tickets,F.AvgTx,F.Percent::{0}|{1}|{2}|{3}|{4}}