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

Only Highlight Bars of a Certain Series in a Chart, Reordering a Table's Columns, and more...

Posted by mwilliams  Icon, 03 September 2012 - 05:16 PM

Last Week in the Forums - 9/3/12

The first post, for this week, is about highlighting bars in a single series of a chart, only. The poster was using script in the beforeDrawDataPoint to color their data point. The problem is that they were highlighting all series, not just the one they wanted. The solution to this is to check the series with dph.getSeriesDisplayValue() before setting the color.

The next post, for this week, is about reordering columns in a table. The poster has a table already in their design, but they'd like to reorder the columns based on a condition. An example is provided in the forum thread with beforeFactory code that switches the order of columns in a table based on a parameter.

Here are a few more :


Here are a few unanswered posts, from last week:


If you have a suggestion or solution for any of these, please post in the thread!

Thanks for reading this weeks blog! 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, forums, reporting, alternating highlight, chart, reorder table, Maximo

Last week in the Forums: Time Stamp as Parameter Through Command Line, Dynamically Setting Min/Max of DateTime X-Axis, and more...

Posted by mwilliams  Icon, 14 May 2012 - 06:01 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 continue to be busy. There's also lots of community support right now, which is great. As always, a big thanks goes out to those users who help answer questions! It is a great help to the community!

The unanswered post from last week is about passing a date parameter to the report through a batch file. The poster is having a problem passing a time stamp through from the command line to their report. They get an error when giving the time stamp as the parameter in the batch file. If they set the default value in the report, it works, but they need to pass it in dynamically. If anyone has experience with this or any suggestions, please post them in the thread.

The next post I'll cover is about setting the DateTime axis min/max dynamically. The poster was trying to set the dateTime scale in a gantt chart because the chart was showing one time unit earlier, so there was a blank area to begin the chart. They didn't want this. They wanted the chart to begin with the first data point. The following script can be used to set the chart axis min value to the actual minimum value in the chart, so there is no space.

importPackage( Packages.org.eclipse.birt.chart.model.type.impl );
importPackage( Packages.org.eclipse.birt.chart.util);
importPackage(Packages.org.eclipse.birt.chart.model.data.impl);

function afterDataSetFilled(series, dataSet, icsc)
{
ps = PluginSettings.instance( );

dsp = ps.getDataSetProcessor( series.getClass() );
//find min date
if (series.getSeriesIdentifier() == "Series 1"){
        mmin = dsp.getMinimum( dataSet );       
        mmax = dsp.getMaximum( dataSet );
}
}

function beforeGeneration( chart, icsc )
{
var yAxis = chart.getAxes().get(0).getAssociatedAxes().get(0);
var yScale = yAxis.getScale();
yScale.setMin(DateTimeDataElementImpl.create(mmin));
yScale.setMax(DateTimeDataElementImpl.create(mmax));
yAxis.setScale(yScale);
}



The last topic for this week is about alternating the color of the row dimension field in a crosstab. The poster wanted to be able to alternate the color in the row dimension column, in a crosstab. For example, they wanted to have the first row be blue, the second gray, the third blue, and so on. They were pointed to the following devShare post to help them achieve what they were wanting to do:

http://www.birt-exch...t-using-script/

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, forums, reporting, batch file, command line, gantt chart, dynamic min/max, crosstab, alternating highlight

Last Week in the Forums: BIRT and R Statistical Language, Specified Sort Order for a Table, and more...

Posted by mwilliams  Icon, 17 October 2011 - 05:17 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 maintained high traffic all year. If the rest of the year continues how it has been going, we'll have a record number of posts and a higher community contribution percentage, which are both very good things! Great work, community! 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 I'll cover for this week is an unanswered one. I did this last week as well, and I think I'll continue posting an unanswered post each week to see if we can't help find it an answer. :) The unanswered post for this week is about the R Statistical Language. The poster is wanting to know if anyone has had any success using the R project with BIRT. If anyone has used these two together and can supply an answer, that would be great!

The second topic for this week is sorting a table in a specified order. The poster wants to be able to specify an order for the rows by a parameter. The solution provided is to use your SQL query to create this order and then use that. A sample query can be found in the thread. Another alternative if not using SQL or even if you are would be to create a computed column that assigns a numerical value to the rows in the order that you want them to be. Say you have row values a, b, c, and d, but you want them to show up in the order, b, d, c, a. In your computed column, you'd assign 1 to b, 2 to d, etc. Then you could use this numerical sort column to order your data with standard BIRT sorting.

The last topic for this week is alternating row colors in crosstabs. Because of how a crosstab is created, simply adding a highlight rule to do alternating highlights doesn't work. The solution to alternate highlighting in rows in a crosstab is to use script. You'll have to keep variables and check dimension values to keep your alternating colors the correct color since a crosstab works by cell rather than row or column. An example showing how to highlight the crosstab, including grand totals can be found 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, forums, R Statistical Language, Sort Order, Crosstab, Alternating Highlight

Page 1 of 1

« May 2013 »

S M T W T F S
1234
567891011
12131415161718
1920 21 22232425
262728293031

My Picture

0 user(s) viewing

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

Categories

Search My Blog

Twitter