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)
Scripting the report layout in BIRT 4.5
Istabrak
<p>Greetings to all,</p>
<p>I am using BIRT4.5 bundled with Eclipse.</p>
<p>In one of the data sets I am working on, I have is a csv file with about 100 columns of numerical data.</p>
<p>I have a requirement to group them and then aggregate them based on a certain condition.</p>
<p> </p>
<p>I tried dragging the Aggregate button from the Palette to the layout cell but with a large number of columns it does not seem to be an efficient approach.</p>
<p>Moreover, it is very difficult to work in the layout area when the number of columns is too large since the cells will be very small.</p>
<p>Is there a way to programmatically (or via a script) to define these aggregates and assign them to the respective cells?</p>
<p>Is there a way to cut and paste some of the layout elements or store the report layout design as a common resource?</p>
<p> </p>
<p>Thx and BR</p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>You say you "<span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"><em>have a requirement to group <strong>them </strong>and then aggregate <strong>them</strong></em>". What are "them"? Columns from your original data set? If so, aggregations will not help you since aggregations work on grouping by row, not column.</span></p>
<p> </p>
<p><span>In any case, you can define Aggregations directly in the Table's Bindings without dropping an Aggregation component to the table. Then, to use an aggregation in your table, you drop a Data component in the table, cancel the New Data Binding window, right-click on the Data component your just dropped, and choose Change Data Column to assign the Aggregation.</span></p>
<p> </p>
<p><span>Hope this helps,</span></p>
<p> </p>
<p><span>P.</span></p>
Istabrak
<p>Hi Pierre,</p>
<p>Thanks a lot for the info.</p>
<p>Yes, you are right about the aggregation and grouping, I meant by "them" the rows.</p>
<p>I tried your method and it works great on the table if the number of columns is about 20 to 30.</p>
<p>However, if the number of columns in the table gets larger, then it would be difficult to drop a "Data" component into the desired table cell.</p>
<p>Is there another way of doing this part without having to do the drag-and-drop way?</p>
<p>I tried increasing the zoom level to 400% but the cells are still too small and do not allow me to drop the "Data" components.</p>
<p> </p>
<p>Best regards</p>
pricher
<p>You can always use the report Outline to add an item to a cell, as shown here;</p>
<p> </p>
<p>
jfranken
<p>Another option is to go to the Master Page tab. In the properties for "type", select "custom". Enter something like 100in for the width. That will make manipulating the cells easier. When you're done editing, you can change the type back to US Letter. </p>
Istabrak
<p>Greetings to all,</p>
<p>Thank you all for all the input.</p>
<p> </p>
<p>One more question:</p>
<p>I will take me about 7 hrs to fill in the layout with the needed groups and aggregations.</p>
<p>I have 8 files with identical structures, is there a way to reuse this layout for all 8 input files or do I have to go thru the pain of</p>
<p>redoing the grouping and aggregations for each input file?</p>
<p> </p>
<p>Best regards</p>
pricher
<p>Hi,</p>
<p> </p>
<p>Your best strategy is probably to use a report library to store your table after you have created all the groups and aggregations. Then, you can use that "master" copy in other reports.</p>
<p> </p>
<p>Here's a <a data-ipb='nomediaparse' href='
https://www.youtube.com/watch?v=HnSjj2N8xFc'>video
tutorial</a> on using report libraries. I am sure you can also find other resources on the web to help you understand how to use report libraries.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>