Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Trouble with vertical report
bwinter
I put together a report that takes an id and displays a block of values in a vertical layout. For example:
Project Name: My Project
Project Id: My Id
Project Action: This action
.
.
. (and so on)
and what I want to do is to have that block display over and over again if multiple parameters are passed to it so that the report does something like this:
Project Name: My Project
Project Id: My Id
Project Action: This action
.
.
. (and so on)
Project Name: My Other Project
Project Id: My Other Id
Project Action: That action
.
.
. (and so on)
I am looking for the best way to do this. I've looked at concatenating individual reports but this is the same report over and over again. It's just not layed out in columns like my first reports. I can't help but think that I'm not the first one to encounter something like this and am really hoping that someone can push me in the right direction. I'm pretty new to BIRT and am pretty convinced I'm missing something easy here. I can get the data to layout in horizontal layout but it doesn't transfer when I format it the way management wants it.
Find more posts tagged with
Comments
Yaytay
Either use a table and put all of the output you want in a single data cell, or use a list.
Remember that BIRT let's you nest tables/girds within cells of ther tables/grids.
Is that enough of a pointer or would you like an example?
bwinter
Thanks for responding! I understand what you're saying and have made this change. The problem now is that I can't figure out how to get it to take a list of parameters and iterate over that list to generate many of those table rows.
Any ideas?
Thanks in advance!
Yaytay
<blockquote class='ipsBlockquote' data-author="'bwinter'" data-cid="113237" data-time="1358190007" data-date="14 January 2013 - 12:00 PM"><p>
Thanks for responding! I understand what you're saying and have made this change. The problem now is that I can't figure out how to get it to take a list of parameters and iterate over that list to generate many of those table rows.<br />
<br />
Any ideas?<br />
<br />
Thanks in advance!<br /></p></blockquote>
If you want a data set where each row is dependent on report parameters you should look at using a scripted data set, which can return whatever you want.<br />
<br />
Jim
bwinter
Let me be more specific.
What I have is a list of projectIds. I'll need to run a row of the report for each projectId in the list and return all the rows in the report.
Is that the kind of thing a scripted data set can allow me to do?
If so - is there any good documentation on how to do scripted data sets?
Thanks again!
Yaytay
<blockquote class='ipsBlockquote' data-author="'bwinter'" data-cid="113242" data-time="1358193478" data-date="14 January 2013 - 12:57 PM"><p>
Let me be more specific.<br />
<br />
What I have is a list of projectIds. I'll need to run a row of the report for each projectId in the list and return all the rows in the report.<br />
<br />
Is that the kind of thing a scripted data set can allow me to do? <br />
<br />
If so - is there any good documentation on how to do scripted data sets?<br />
<br />
Thanks again!<br /></p></blockquote>
The question is: how are you going to maintain that list of project Ids? And how are you going to pass them in to your report?<br />
<br />
If the list is already stored in a database, or the maintenance of the list is complex enough to warrant putting it in a database then using the list from there will be quite a bit simpler than using a scripted data set.<br />
Scripted data sets aren't particularly difficult, but I always find using JavaScript in reports is a bit 'blind' - there is only limited intellisense or help.<br />
Plus you are going to have to pass in a set of IDs, presumably without knowing how man entries I will have up front.<br />
<br />
Actually, thinking about it, can you make your list of projects available within a multi-valued report parameter?<br />
That sounds like the simplest option to me, then you can use something like this: <a class='bbc_url' href='
http://code.google.com/a/eclipselabs.org/p/birt-functions-lib/wiki/BindParameters'>http://code.google.com/a/eclipselabs.org/p/birt-functions-lib/wiki/BindParameters</a>
; to build a query that returns all your data in one data set.<br />
Feasible?<br />
<br />
Jim
bwinter
In theory, at this point, the ids will come from an application that sends it via http as a request parameter. I haven't worked all that out yet. I'm just trying to get the report to do what I want it to do in the eclipse builder.
I am looking in to the multi value data set thing. I can't tell if it's going to work or not yet.
I really appreciate your help!!
bwinter
I did my best with the Bind Params. Downloaded and installed the extension, created the multi select list box, added the sql pieces to my query and when I preview the report, it looks like things are going to work - it's got the 2 project ids selected that I want and lists the rest of the project ids that are available.
I dummied everything down and am down to a single table with 1 row and 2 columns. I pass in 2 projectIds via the multi select parameter. No errors, but it still just shows the first result 2 times. It seems to know that it's got 2 (or 3 or however many I select in the multi-select) rows and I've tested the query outside of the report designer and it works great but inside the eclipse builder, it's still not working.
I'm not sure what I'm doing wrong at this point.
It looks like this might work with some data manipulation in java code or something. what I'm wondering at this point is if I should just make it one big query that returns too many rows (a single row for everything returned on the joins) and then manipulate that data in java code or something then creating the report with a for loop or something.
I checked with management and it is essential that we get multiple projects in a single report.
Thanks in advance for any assistance!!
Bryce
bwinter
In a last ditch effort to get this working - I started a project from scratch thinking "maybe there's something wrong with my xml" because I've been having to make changes to the xml manually.
It worked. I think I'm still faced with how to use the list that's being correctly passed in to execute queries on sub data-sets. So - how do I take the current ID and execute another query to get things like states belonging to that project and repeat for each row?
Thanks a ton for this! I think at this point, there must be at the very least a way to manipulate the data manually in java code, if not something better that I just don't know yet.
Cheers! Ended the day on a high note!
Bryce
Clement Wong
Bryce,<br />
<br />
Sorry for jumping on this thread late, but it's my understanding that you want to have a list of Project IDs (maybe a dynamic list?), have the user choose from a multi-select list, and generate a similar structured report for each of those Project IDs?<br />
<br />
Since you haven't attached your design, I'm not sure what you're aiming for, but I have created a sample based on the out of the box example (<em class='bbc'>Window > Show View > Other... > Report and Chart Design > Report Examples > Sub Report > OrdersAfter.rptdesign)</em>.<br />
<br />
The revised sample now has a dynamic list of Order IDs (in your case Project IDs) -- see OrderList_Parmas Data Set. It presents the user to multi-select the Order IDs. A "report" for each order will be generated.<br />
<br />
I've overwritten the <em class='bbc'>beforeOpen </em> method of the OrderList Data Set so that we can include the list of the user's selection of Order IDs. It's a simple string replace based on whether we want all values of the Orders or the user's selected values.