BIRT Exchange Forum: BIRT Exchange Forum -> Michael's BIRT Blog

Jump to content


 

BIRT Poll: To best make a table fill a pdf page before breaking (PL=page layout, PBI=page break interval) set:

PL: auto, PBI: 0PL: fixed, PBI: 0PL: auto, PBI: 1000000PL: fixed, PBI: 1000000
Page 1 of 1

Last Week in the Forums: Changing Data Causing Coloring Issue in Area Chart, Coloring Categories the Same Across Multiple Charts, and more...

Posted by mwilliams  Icon, 27 December 2011 - 05:50 AM

This blog series takes a look back at the past week in the forums, recalling how active they were and highlights some of the questions asked that seem to frequent the forums or other interesting topics. We're in the last week of the year! The BIRT Exchange forums have been quiet in the past week because of the holidays. I don't expect that they'll pick back up again until the beginning of next year! Many great questions and answers are being posted every day. As always, thanks to those users who help answer questions! It is a great help to the community!

The unanswered post from last week is about a coloring issue in an area chart. There isn't much explanation to go on for this issue. Two charts are shown in an attached image with different coloring. One showing the correct color and one showing different colors. The complaint is that the colors change depending on data order. If you've had an issue like this before, feel free to comment in the thread.

The second topic from last week that I'll cover is making all charts in a report have the same colors for shared categories. The series palette determines the color of the data points in your chart. The data points are colored in order based on the palette. If you have multiple charts with the same categories, but the charts are sorted in a way in which the categories aren't in the same order, the data points for each category will have different colors. An example in this thread will show how to use a simple script to provide custom coloring for each data point and legend item to match across all charts.

The last topic for this week is merging data in a joint dataSet. When you join two dataSets together, many times you'll end up with incomplete columns or two fields that you'd like to merge. To handle this issue, all you need to do is create a computed column in your new joint dataSet. In this computed column, you can fill in a default value for null values or if you want to merge two columns, you can check which column has data of the two columns you want to merge, and use that value as the output for the column.

Again, this is just a small sample of what went through the forums this past week. For more questions and answers that have been posted, check out the forums. As always, if you have a question, feel free to ask it, and if you see a question you know the answer to or have a similar experience to, feel free to post an answer or comment. I hope everyone has a safe New Year! See you in 2012!

Filed in BIRT, BIRT Exchange, forums, reporting, charts, color, area chart, joint data set, computed column, merge data

Last Week in the Forums: Getting Today's String Day in a Chart's Title, Passing Data Between Queries in a Report, and more...

Posted by mwilliams  Icon, 26 September 2011 - 06:45 AM

This blog series takes a look back at the past week in the forums, recalling how active they were and highlights some of the questions asked that seem to frequent the forums or other interesting topics. The forums have been busy all year. Quite a bit busier than last year, it seems, though I don't have the numbers on this in front of me. :) Luckily, many members are contributing answers to help with the extra traffic. Many great questions and answers are being posted every day. As always, thanks to those users who help answer questions! It is a great help to the community!

The first topic for this week is how to get today's string day (Monday, Tuesday, etc.) into your chart title. The poster wanted to grab the day of week from today's date and create their chart title with this value. This can be done by creating a date format that only shows the string day of week and then using the value in your chart script to set the title of the chart. An example is shown in the forum thread that shows how to do this. If you're not interested in setting the day of week in the title, but just want to dynamically set your chart title, this example will also be helpful.

The second topic for this week is about passing data between queries in a report. Sometimes you need to use data from one dataSet to get the appropriate data from another for your report. One way to do this is to create a joint dataSet to join all of the data, but if you have large amounts of data, this can cause processing to be very slow. The ideal way to do this is to take the data from the first dataSet and pass it as a parameter in the second query. There are at least a couple ways to do this in BIRT. One is to use a dataSet parameter in the second dataSet, embed a table for this dataSet into a table for the first dataSet, and use the dataSet parameter binding feature to pass the value from the outer table to the inner table's query to grab only the appropriate data. Another way, that is described in the forum thread is to embed the second dataSet's table into the first dataSet's table and in the onCreate script of the outer table, you'd set a global variable to have the value you want to limit your inner query by, and then in the beforeOpen of the inner dataSet, you can use this variable to set your where clause in your queryText.

The last topic for this week is how to create a rolling sum in your dataSet. There are standard aggregations to create a sum for an entire column or to keep the running sum, but a rolling sum for a specified period is not a standard aggregation. The poster wanted to be able to keep a sum of their data fro the last 12 months. When they reached the 13th month, they wanted to disclude the first month from the total. To do this, you can create a computed column in your dataSet that uses an array to keep track of the previous values so you can create your rolling sum. An example is included in the forum thread.

Again, this is just a small sample of what went through the forums this past week. For more questions and answers that have been posted, check out the forums. As always, if you have a question, feel free to ask it, and if you see a question you know the answer to or have a similar experience to, feel free to post an answer or comment.

Filed in BIRT, BIRT-Exchange, Charts, Parameters, Computed Column, Rolling Sum

Page 1 of 1

« May 2013 »

S M T W T F S
1234
567891011
121314151617 18
19202122232425
262728293031

My Picture

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)

Categories

Search My Blog

Twitter