For some reason this {REPORT SQL DETAILS:<handler>:<fields>:<delimiter>}
syntax doesnt work in v5.5.4.
[Export:0]
Date,Food,SoftDrink,Beer,Wine,Cocktails,Spirits,Cigarette,Other,Total
{REPORT SQL DETAILS:@@OrdersByTagNameV2:F.Date,F.TicketNumber,F.Food,F.SoftDrink,F.Beer,F.Wine,F.Cocktails,F.Spirits,F.Cigarettes,F.Misc::"{0}","{1}","{2}","{3}","{4}","{5}","{6}","{7}","{8}","{9}"}
Though for the exact same script handler it works in visual explorer (without the delimiter)
@VehbiEmiroglu
I ran a trace on whats happening on SQL Server. So this is from visual report explorer. It executes correctly and {Start} / {End} are replaced with dates of my selection.
This is for Data Export. When query is executed, it still hasnt replaced {Start} / {End} with dates of my selection.
Jesse
October 7, 2022, 1:17am
3
I don’t understand why you are using a handler in that tag. That tag is designed so you can run pure sql inside the tag and not use a script.
Because thats how its documented.
It is possible without SQL script. See the Topic that I link next regarding Data Exports.
Any Report can be modified to become a Data Export using whatever type of column delimiter you choose.
You are immediately going to have an issue with CSV in particular because your decimal separator is a comma, and your column/field delimiter is also a comma. So you will need to craft your Export to quote the columns/fields.
Even though we can do this without SQL, we can still use it if you are mo…
When you run pure SQL directly from the report tag it gets escaped by the ;
symbol.
As you can see, there is only a first line of code getting executed. Either way, its not working properly.
@Jesse
So after it failed, I was like - screw it - and removed all the ;
from the SQL script and run it through the {REPORT SQL DETAILS:}
tag and it worked.
Nonetheless, maybe these details should be mentioned somewhere about the export how to use it and how not to use it.
1 Like