I'm trying to drill down through a pie chart and pass the id of the data entity the slice represents rather than the displayed description. Hence I have a sql query like this:

select pd.description as pddescription, pd.id as pdid, count(pd.description) as counter
from my_table_1 as p, my_table_2 as pd
where p.id = pd.id
group by pd.description, pd.id
order by counter

... and then try to use pddescription as the <data-name> and counter as the <data-value> while passing pdid as the parameter to the drill-down (to use as key to the next query), as follows:

from the xxx.widget.xml:

<!-- Specify the path to the action sequence that provides the data -->

<!-- Specify the output of the action sequence that contains the data -->

<!-- Specify whether to get the pie series from the rows or columns -->

from the testdashboard.jsp:

SimpleParameterProvider parameters = new SimpleParameterProvider();
// define the click url template
parameters.setParameter( "drill-url", "ChrisDashboard.jsp?processid={pdid}" );
// define the slices of the pie chart
parameters.setParameter( "inner-param", "pdid"); //$NON-NLS-1$ //$NON-NLS-2$
// set the width and the height
parameters.setParameter( "image-width", "450"); //$NON-NLS-1$ //$NON-NLS-2$
parameters.setParameter( "image-height", "300"); //$NON-NLS-1$ //$NON-NLS-2$
StringBuffer content = new StringBuffer();
ArrayList messages = new ArrayList();
// call the chart helper to generate the pie chart image and to get the HTML content
// use the chart definition in 'samples/dashboard/regions.widget.xml'
ChartHelper.doPieChart( "samples", "dashboard", "xxx.widget.xml", parameters, content, userSession, messages, null );

However the resulting chart has the correct labels but uses the pdid as the data instead of the counter, and clicking on a segment passes the pdescription as the parameter.

Is it actually possible to use queries with more than two columns?

Many thanks for any help you can give me.