Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Trouble linking report parameters to data set parameters.(Using a ? in the query and creating my own Data Set parameters and linking returns blank result set, 0 errors.)
Trouble linking report parameters to data set parameters. [message #1020873] Tue, 19 March 2013 04:44 Go to next message
Andrew Trout is currently offline Andrew TroutFriend
Messages: 3
Registered: March 2013
Junior Member
I recently started doing BIRT reporting and am having a bear of a time with this. I have two tables connected with a left outer join, and am trying to set parameters. The customer needs to be able to input a Location and a Count Group to run the report for, or a % to run for all locations and count groups. In addition, they need to be able to enter a Start Date (tied to a field in the first table), and an End Date (tied to a field in the second table) and get results between those two dates.

Here is my problem: I have created the Report Parameters, and the SQL query. In all the documentation I could find on both IBM and Eclipse BIRT's websites it says enter a ? in the query where you want the parameter to enter, and when you go to the Parameters section of the Data Set editor you will have the Parameters already there (automatically created when you edit the query) and all you have to do is link them to the Report Parameters. IE:

SELECT *
FROM tbl_one
LEFT OUTER JOIN tbl_two
ON tbl_one.itemnum = tbl_two.itemnum
...
WHERE tbl_one.location LIKE ?
AND tbl_one.countgroup LIKE ?


Problem is when I add that to the query and go to the Parameters section, there is no auto created parameters. When I add my own Parameters and link them to the Report Parameters it just returns a blank result set, no errors or anything. I am holding off on figuring out how I am going to do the Date parameters until I get it working.

Any help would be greatly appreciated. If you need any more info just let me know and I will do my best to get it to you.
Re: Trouble linking report parameters to data set parameters. [message #1021238 is a reply to message #1020873] Tue, 19 March 2013 17:59 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

What is your BIRT version? I don't see the same issue with the latest version, 4.2.2.

Michael

Developer Evangelist, Silanis
Re: Trouble linking report parameters to data set parameters. [message #1021361 is a reply to message #1021238] Tue, 19 March 2013 23:32 Go to previous messageGo to next message
Andrew Trout is currently offline Andrew TroutFriend
Messages: 3
Registered: March 2013
Junior Member
I'm using Eclipse 3.4.2 with BIRT 2.3.2. Is that fairly ancient? I am using the Software Update feature as we speak, and I'll see if that fixes anything.
Re: Trouble linking report parameters to data set parameters. [message #1021384 is a reply to message #1021361] Wed, 20 March 2013 00:57 Go to previous messageGo to next message
Andrew Trout is currently offline Andrew TroutFriend
Messages: 3
Registered: March 2013
Junior Member
The version of BIRT required to run reports in a set of software that I need to run them in is 2.3.2 unfortunately. I'm thinking the answer is to add the WHERE clause in a beforeOpen statement that connects the Parameters, but I'm not sure how to do this. Could someone write up a brief example of how to do this?
Re: Trouble linking report pa rameters to data set paramet ers. [message #1022145 is a reply to message #1020873] Thu, 21 March 2013 10:52 Go to previous message
Colin Sutton is currently offline Colin SuttonFriend
Messages: 121
Registered: July 2009
Senior Member
Andrew Trout <forums-noreply@xxxxxxxx> wrote:
[...]
> Problem is when I add that to the query and go to the Parameters section,
> there is no auto created parameters. When I add my own Parameters and
> link them to the Report Parameters it just returns a blank result set, no
> errors or anything. I am holding off on figuring out how I am going to
> do the Date parameters until I get it working.
>
> Any help would be greatly appreciated. If you need any more info just
> let me know and I will do my best to get it to you.

if you give each parameter a default value in the parameter dialogue you
should see a result when you run the query.
--
Colin Sutton
Previous Topic:Override event handler from external javascript file
Next Topic:How to check parameters
Goto Forum:
  


Current Time: Thu Apr 18 01:16:01 GMT 2024

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

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

Back to the top