Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Report parameters(Tried following the tutorial!)
icon5.gif  Report parameters [message #634102] Wed, 20 October 2010 14:06 Go to next message
Tony  is currently offline Tony Friend
Messages: 4
Registered: October 2010
Junior Member
I am a new BIRT user and I am trying to create a report with a parameter to be provided by the user when the report is run.

I have got to the point in the tutorial which talks about using the following syntax:

where item = ?


The tutorial states that this should cause a Parameter to be created which can then be configured, but the parameter is not being created.

Am I missing something, or have I encountered a bug?

Is there a workaround? (I have tried configuring a parameter manually but can't figure out how to reference it in the where clause.)

I have looked on bugzilla but can't find anything directly related to this issue.

Running BIRT 2.6.1 on Helios SR1.

Thanks for any guidance Smile
Re: Report parameters [message #634103 is a reply to message #634102] Wed, 20 October 2010 14:18 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 199
Registered: July 2009
Location: Houston TX
Senior Member

Have you read any of the BIRT user manuals or training materials?

There's a decent description of creating a data set with a parameter and then creating the parameter itself at the following URL:

http://www.eclipsezone.com/articles/birt/

Re: Report parameters [message #634105 is a reply to message #634103] Wed, 20 October 2010 14:21 Go to previous messageGo to next message
Tony  is currently offline Tony Friend
Messages: 4
Registered: October 2010
Junior Member
Thanks for the reply, Richard.

The steps on the page you reference are, however, the same as the built-in tutorial in the BIRT help documentation, and state the same steps as I have already followed.
Re: Report parameters [message #634119 is a reply to message #634102] Wed, 20 October 2010 14:59 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 199
Registered: July 2009
Location: Houston TX
Senior Member

It does seem to skip that step, doesn't it.

Okay. Here's an example. Using the Classic Models sample database, I create a dataset as Select * from Customers where State = ?

Next I drag the dataset onto the report canvas (which creates a Table object). As you noticed, you can run the report like this and you won't get prompted for the parameter value. That's because the dataset parameter has been created but it hasn't been linked to any report-level parameter.

There are two ways to accomplish that step. You can either go under the Data Explorer to the Report Parameters section, define one there, then go back to the Data Set in the Parameters section and link the two together, or you cao do both through the Data Set in the Parameters section.

In the Data Set Parameters, edit the parameter that was created when you saved your original query. It probably has a creative name like "param_1". At the bottom of the edit dialog is a line tagged "Linked to Report Parameter" with a dropdown of "None". Click on the formula button at the right of the dropdown.

In the resulting box (which should default to string data type), accept all of the defaults with one change - make sure you check the box tagged "Is Required", then click OK. The dataset parameter dialog should now show as Linked to Report Parameter "NewParameter1". Click OK, then click OK on the Edit Data Set dialog.

Now when you run the report, you will be prompted for your parameter entry.

I'm pretty sure all of this is in both of the BIRT user guides:
BIRT - A Field Guide to Reporting (Addison-Wesley)
Practical Data Analysis and Reporting with BIRT (PACKT Publishing)
Re: Report parameters [message #634123 is a reply to message #634119] Wed, 20 October 2010 15:15 Go to previous messageGo to next message
Tony  is currently offline Tony Friend
Messages: 4
Registered: October 2010
Junior Member
Aha... Most interesting.

When I follow these steps (or indeed the tutorial steps) using the Classic Models database, the parameter is created as expected.

For my application, I am using the JDBC:ODBC bridge to query a live database.

I suspect that has something to do with it, but it is not at all obvious to me why it isn't working.

Thanks for the help Richard.
Re: Report parameters [message #634161 is a reply to message #634123] Wed, 20 October 2010 16:11 Go to previous message
Tony  is currently offline Tony Friend
Messages: 4
Registered: October 2010
Junior Member
OK, I have got a simple selection working with a single parameter, but I did have to manually create the report parameter.

Thanks for pointing me in the right direction.
Previous Topic:Accessing remote birt designs in BIRT Viewer
Next Topic:Join table performance + Instrumenting
Goto Forum:
  


Current Time: Fri Nov 28 18:13:40 GMT 2014

Powered by FUDForum. Page generated in 0.03362 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software