Function editor for SQL Calc fields
I was sure that I requested this years ago but I can't find any trace of
it, so I'm doing it now in case there is no change in v16.
The ability to write your own SQL in the Query Designers "Function"
column (Calcs tab) is very very useful But the single line editor is
very very unwieldy. Here is an example of a typical bit of code we have
in some reports (note the use of stored procedures that do the work RB
can't):
CASE WHEN SORT.RecType IN (1,2,3,4,5,6) THEN CASE WHEN Eqlists.PriceMode
= 0 THEN CASE WHEN SORT.ChargeQuantity > 0 THEN SORT.Price /
SORT.ChargeQuantity ELSE 0 END ELSE 0 END WHEN SORT.RecType IN (7,9)
THEN GetIncomeProportionForPricedAlliasPart(Sort.LineRef, Sort.xGUID, 0)
WHEN SORT.RecType IN (11) THEN
GetIncomeProportionForComponent(Sort.LineRef, SORT.LineCODE, 0) ELSE 0 END
Putting that on one line is horrible. To edit I have to copy to an SQL
beautifier so that I can read it easily and get all the CASE "ends" in
the right place; then I have to remove all the line breaks and paste it
back. End users have no chance
Would be great if as well as the drop down button there was another one
besides that allowed you to popup a memo editor; moreover, have the code
saved as it was laid out.
Thanks.
it, so I'm doing it now in case there is no change in v16.
The ability to write your own SQL in the Query Designers "Function"
column (Calcs tab) is very very useful But the single line editor is
very very unwieldy. Here is an example of a typical bit of code we have
in some reports (note the use of stored procedures that do the work RB
can't):
CASE WHEN SORT.RecType IN (1,2,3,4,5,6) THEN CASE WHEN Eqlists.PriceMode
= 0 THEN CASE WHEN SORT.ChargeQuantity > 0 THEN SORT.Price /
SORT.ChargeQuantity ELSE 0 END ELSE 0 END WHEN SORT.RecType IN (7,9)
THEN GetIncomeProportionForPricedAlliasPart(Sort.LineRef, Sort.xGUID, 0)
WHEN SORT.RecType IN (11) THEN
GetIncomeProportionForComponent(Sort.LineRef, SORT.LineCODE, 0) ELSE 0 END
Putting that on one line is horrible. To edit I have to copy to an SQL
beautifier so that I can read it easily and get all the CASE "ends" in
the right place; then I have to remove all the line breaks and paste it
back. End users have no chance
Would be great if as well as the drop down button there was another one
besides that allowed you to popup a memo editor; moreover, have the code
saved as it was laid out.
Thanks.
This discussion has been closed.
Comments
Thanks for the suggestion. I did not see it so I added it to our list
of possible enhancements for a future release.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com