Is there a way to add computed or calculated items to results / output??
Is there a way to add computed or calculated items to results / output??
Is there a way to add computed or calculated items to results / output??
What about If then statements?? How would I add a column that did something like this??
if (Revenue <= 25000) {'1. <=025K' }
else {if (Revenue > 25000 && Revenue <= 50000 ) {'2. >025k <=050K' }
else {if (Revenue > 50000 && Revenue <= 100000 ) {'3. >050K <=100K' }
else {if (Revenue > 100000 && Revenue <=250000) {'4. >100K <=250K' }
else {if (Revenue > 250000 && Revenue <=500000) {'5. >250K <=500K' }
else {if (Revenue > 500000 && Revenue <=1000000) {'6. >500K <=1M' }
else {'7. >1M' }}}}}}
Yes, you can type any SQL expression into the Expression column of the Query Columns Grid below the Design Pane.
You can enter the whole IF statement to the Expression column cell. To ease this action, you can use the Expression Editor that's available for the Professional WinForms and WPF subscriptions. For Standard .NET subsctiptions and for other editions of Active Query Builder there's a possibility to create your own expression editor.
To open the editor, the user should click on the ellipsis button at the right of appropriate Expression cell and select the "Expression Editor..." item from popup menu.
If you use the Professional WinForms or WPF subscription, place the ExpressionEditor non-visual component on a form and assign it to the QueryBuilder.ExpressionEditor property. This editor utilizes the SQLTextEditor control with code completion and syntax highlighting to edit text and displays lists of functions and database objects at the left. Please review the Full-Featured MDI demo to see it in action.
For other versions and editions, you can define the (On)CustomExpressionEditor event handler to show custom dialog. A simple dialog with a text area, OK and Cancel buttons will be enough. The CustomExpressionEditor demo project is included in the installation package.