Sunday, February 27, 2011

APEX 4 (bug) - Chart Attributes > Add Series > Build Query button

Let's pretend you still have that 3D Column chart of my previous post or create a new chart.
Now edit the chart and go to Chart Attributes and look for the Chart Series section.

Click the Add Series button, you'll get a screen like

Hit the Build Query button to open the wizard to generate the SQL statement and follow the wizard. Define the owner

Define the table or view

Define the Label and Value...

Hmm... the value option is not here... yes, that is a bug... if you go further with the wizard you will end up with "select * from emp" instead of a real query for the chart.

The strange thing though is that during the creation of the chart it works just fine. Also when you edit an existing series and hit the Build Query button it works ok as you can see on the next screenshot.

My guess is there's something wrong with session state.

The workaround is to edit an existing series, follow the wizard there, copy the sql statement, cancel the edit, and then add a new series and paste the sql statement. Or if you are more experienced and know the syntax of the chart you can just manually enter the sql statement.

(Found in APEX

1 comment:

Hilary Farrell said...

Hi Dimitri,

A fix for this issue will be contained in our next release. In the meantime, users can use your suggested workaround, or alternatively just refer to the syntax used for their existing chart series query in order to identify the required syntax. For those familiar with the required SQL syntax, then can just enter the SQL query directly into the 'SQL' text area.