Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Variable number of columns
Variable number of columns [message #691326] Fri, 01 July 2011 04:42 Go to next message
J D is currently offline J D
Messages: 9
Registered: June 2011
Junior Member
Hi,

I need to design a report that consists of one data set displayed as a table. The SQL query depends on report parameters and the number of output columns varies.

I see that I can use the describe event on scripted data sets to specify the data set output columns.

1 - Is there a way to do the same with regular data sets?

2 - If not, how do I perform a JDBC query with a scripted data set?

Thanks in advance.
Re: Variable number of columns [message #691547 is a reply to message #691326] Fri, 01 July 2011 13:29 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

JD,

Will the query be against the same table every time? Just a variable
number of columns? Look at the attached example that adds columns
dynamically using the de api. You also may want to look at this post:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1210-hideshow-table-columns-based-on-input-parameter-selection/

Jason

On 7/1/2011 4:42 AM, JD wrote:
> Hi,
>
> I need to design a report that consists of one data set displayed as a
> table. The SQL query depends on report parameters and the number of
> output columns varies.
>
> I see that I can use the describe event on scripted data sets to specify
> the data set output columns.
>
> 1 - Is there a way to do the same with regular data sets?
>
> 2 - If not, how do I perform a JDBC query with a scripted data set?
>
> Thanks in advance.


Jason Weathersby

BIRT Exchange
Re: Variable number of columns [message #691555 is a reply to message #691547] Fri, 01 July 2011 13:44 Go to previous message
J D is currently offline J D
Messages: 9
Registered: June 2011
Junior Member
Thanks Jason for your reply.

My use case is this: I have items (rows) that can belong to several groups (columns); I need to show an observation for each item/group combination. The number of groups depends on the customer. What's obvious now is that this fits perfectly in a cross tab, with simpler SQL that what I was going for.

I'm not sure what I was asking for would ever be useful.
Previous Topic:is there any row size limit on crossTab in Birt reports
Next Topic:how to remove Null Value.
Goto Forum:
  


Current Time: Wed Apr 16 16:05:11 EDT 2014

Powered by FUDForum. Page generated in 0.08340 seconds