Home
Analytics
Dynamic number of tables in birt
chris.thompson
<p>Hi everyone,</p><p> </p><p>I'm fairly new to BIRT, and have been using the software for about a month now.</p><p> </p><p> </p><p> </p><p>I have requirements for a report that is something like the following.</p><p> </p><p>Imagine you're recording bowling information, and you need to record a table that is players on the Y axis, and frames on the X axis. Each table can display the results of a single game.</p><p> </p><p> </p><p>What I need is something like this, for a user-specified number of games (occurring over a date range)</p><p> </p><p>So the report will display one after another the games that were played.</p><p> </p><p> </p><p>My inexperience is preventing me from constructing a strategy to produce this report, so any advice is appreciated.</p><p> </p><p> </p><p>Edit: We have many reports displaying various statistics. However, this report was specifically asked for and the business explicitly requested that the data not be aggregated, just displayed as-is.</p>
Find more posts tagged with
Comments
mwilliams
<p>What does the data look like in the dataset and what do you want to see in the report. Let me know that and your BIRT version and I can make you a quick sample ( if I can
)</p>
chris.thompson
<p>The easiest way to query the data is something like the following:</p><pre class="_prettyXprint">gameid frame p1 p2 p3 p41 1 5 4 7 101 2 5 7 9 91 3 3 3 3 3...2 1 6 10 9 42 2 9 4 7 9</pre><p>In my case, displaying the totals is not important. When the gameid changes, a new table starts.</p><p> </p><p>I'm using birt 4.3 for eclipse</p><p> </p><p>Edit: Also, there is a variable number of frames, so constructing a table with 10 columns (for instance) won't be able to hold the data if there are more than 10 frames (in reality they can be up to 50 or so)</p>
chris.thompson
<p>Unfortunately the business needed these reports by the end of the day today, so I implemented them using an HTML front-end.
I'm still interested to know if this can be done with BIRT though</p>
mwilliams
<p>This looks like something you could use crosstabs for.</p>
chris.thompson
<blockquote class="ipsBlockquote" data-author="mwilliams" data-cid="128529" data-time="1402505446"><div><p>This looks like something you could use crosstabs for.</p></div></blockquote><p>Yes, for a single table cross tabs would be easy. How can I make n cross tabs, where n is the number of hours between date1 and date2 (and then remove hours with no data)?</p>
mwilliams
<p>Sorry for the delay.</p><p> </p><p>To make N crosstabs, you can embed the crosstab in a grouped table. Then, you'd just need to filter your crosstab based on the outer value.</p><p> </p><p>In your case, you could use a scripted dataset to create rows for all values needed between your two parameter values, then use that as the outer dataSet.</p><p> </p><p>Let me know if you have questions on this.</p>