Release 2.1 of BIRT continues to move forward. The development team has been hard at work re-factoring the project to adopt the new packaging aspects that are a part of the Callisto release. The next release of BIRT will be the RC1 release.
As stated before, the primary function that the 2.1 build addresses is to achieve compatibility with the Callisto Synchronization release.
That said there are some new features and fixes that are fairly exciting in the 2.1 release are. For those of you that do not want to have a look at the full document, here is a list of my favorites:
- Reportlet HTML Output: partial DHTML pages
- Improved Page Breaks: particularly for the html reports
- Total Page count
- Enhanced ODA support: BIRT is moving to the DTP ODA 3.0 Framework
- Join Two Data Sets: BIRT report developers can now join data sets
- Simplify Java Event Handler creation: As easy as doing File New -> Other -> BIRT ...
- Multiple Master Pages: Your report can now have portrait and landscape orientation in the same report
This is just a small set of the new functions, please have a look at the full project plan if you are interested. In addition to these fixes, the BIRT team has identified a number of fixes and other enhancements that are targeted for the 2.1 release. Please go to the project planning page if you want to check on the status of the fixes targeted for each release of the product
Monday, April 03, 2006
BIRT 2.1 Release Plan Update
Posted by Anonymous at 9:55 AM
Subscribe to:
Post Comments (Atom)
49 comments:
Hello :)
I hope BIRT 2.1 will be easy to use about DataSource by Data Access Object in Java.
Because, i don't understand how do this :(
I saw this example :
http://download.eclipse.org/birt/downloads/examples/scripting/scripteddatasource/scripteddatasource.html
Where a Java class simulate a data read. But, this example doesn't work on my work station :(
Can you give some specifics on the error?
Hello :)
I have a Web Application (J2EE).
I want to display a report with a link.
In my JSP, I write a link with href :
request.getContextPath( ) + "/frameset?__report=/test.rptdesign&sample=my+parameter"
When I click on the link, I have a blank page without error (or info) in Eclipse console :(
However, if I click “preview” on my test.rptdesign report, it is work properly :) (Good news).
In my web.xml, I paste that :
servlet
servlet-name ViewerServlet /servlet-name
servlet-class org.eclipse.birt.report.viewer.servlet.ViewerServlet servlet-class
/servlet
servlet-mapping
servlet-name ViewerServlet /servlet-name
url-pattern /frameset /url-pattern
/servlet-mapping
I add viewservlets.jar (and all birt-runtime-2_0_1\Report Engine\*.jar) to my build path and in the WEB-INF/lib directory.
What is the solution? :(
I have another question please.
If I want to my report uses a scripted data set. I put my .class in
eclipse\plugins\org.eclipse.birt.report.viewer_2.0.1\birt\WEB-INF\classes
And my report work properly :)
But, can I put my .class in my WEB-INF/lib directory to my own project? What manipulations must I do?
Thank you very much
To the first question. Dont worry about the Report Engine API. Look at the report engine download there is a directory named Web Viewer Example. Just copy this to your application. It has all the needed files (with the exception of iText and prototype.js which is explained in the install section on the web site). Make sure to look at all the web.xml setting because theses are needed for the /frameset mapping to work.
For the report to access your class it must be in the classpath.
So if you have copied it to WEB-INF/lib or classes it should work fine.
Jason
Thanks :)
But if I want put BIRT in a "/birt" directory in my application ?
I exmplain :
.profectName
..src
..WebContent
...jsp
...WEB-INF
....classes
....lib
....web.xml
..birt
...Web Viewer Example contents (ajax, ...)
Where can I update the source code to do that ?
Thx :)
Hello :)
I have another question :
I use a scripted data set. My java class return a list of 6 000 items.
So, in RhinoScript, in function "fetch", it is very very long :( (1 minute 44 seconds).
How can I reduce this duration ? I would like to do this work in Java instead of RhinoScrit (or JavaScript).
Have you a solution please ?
Thanks :)
You can code a scripted data set in Java. Look at the example below.
If you implement this class and then add a scripted data set to your report, bring up the properties view, not the property editor, for the data set. You will see a property called Event handler class. Put the name of th e class you created in the property. If you built the class in the same workspace it should find you class and run it. When you deploy it you can put your class in scriptlib directory, under the viewer. BTW you can change this directory in the Web.xml using the BIRT_VIEWER_SCRIPTLIB_DIR property.
import java.util.logging.Logger;
import org.eclipse.birt.report.engine.api.script.IDataSetRow;
import org.eclipse.birt.report.engine.api.script.IReportContext;
import org.eclipse.birt.report.engine.api.script.IScriptedDataSetMetaData;
import org.eclipse.birt.report.engine.api.script.IUpdatableDataSetRow;
import org.eclipse.birt.report.engine.api.script.ScriptException;
import org.eclipse.birt.report.engine.api.script.eventadapter.ScriptedDataSetEventAdapter;
import org.eclipse.birt.report.engine.api.script.instance.IDataSetInstance;
/*
* Created on Feb 2, 2006
*
*/
public class ScriptedDataSetEH extends ScriptedDataSetEventAdapter
{
private int count;
private static Logger logger = Logger.getLogger("ScriptedDataSetEH.class");
public void open(IDataSetInstance arg0) {
count = 0;
logger.info("");
}
public boolean fetch(IDataSetInstance set, IUpdatableDataSetRow row) {
logger.info("");
if (count < 5)
{
try
{
row.setColumnValue(1, "test " + count);
row.setColumnValue(2, "group" + ((count / 10) + 1));
} catch (ScriptException e)
{
e.printStackTrace();
}
count++;
return true;
}
return false;
}
public void close(IDataSetInstance arg0) {
logger.info("");
}
public boolean describe(IDataSetInstance arg0, IScriptedDataSetMetaData arg1) {
logger.info("");
return false;
}
public void beforeOpen(IDataSetInstance arg0, IReportContext arg1) {
logger.info("");
}
public void afterOpen(IDataSetInstance arg0, IReportContext arg1) {
logger.info("");
}
public void onFetch(IDataSetInstance arg0, IDataSetRow arg1, IReportContext arg2) {
logger.info("");
}
public void beforeClose(IDataSetInstance arg0, IReportContext arg1) {
logger.info("");
}
public void afterClose(IReportContext arg0) {
logger.info("");
}
}
Thanks you very much. It works fine :)
I have a report with :
- Data Source = Java class (Data Access Object)
- Several param like idClient
When i call the report, i want to give it the idClient. I think that it is in the URL ? (/framset?__report=yop.rptdesign&xxxParamClient=XXX
?
More complicated : i want to give this param to the Data Source.
The DataSet have a class Event Handler. This is THIS class which call my DAO Class (access to the DataBase). I need to the idClient to build my request.
Can i do that ? How ? :(
1. J2EE -> give idClient -> Report
2. Report -> give idClient -> EventHandler
3. EventHandler call the DAO class with the idClient.
4. EventHandler give data to the Report :)
How can i do the steps 1. and 2. ?
Thanks :$
BIRT currently doesnt support passing parameters to the
ScriptedDataSetEventAdapter
Class. It may be simpler to just write the event in JavaScript and call your class passing the param like params["parmname"].
Jason
Any chance of having an up-to-date set of instructions for how to build/debug BIRT from CVS?
I've tried the existing instructions (both from the book and from the website (they are slightly different) and there's something broken.
I'm a ClassCastException when trying to open an editor on a .rptdesign.
Also, the ant scripts fail with sun.io Exceptions.
Ideally I would see instructions for the very latest code, but at this point, anything would do, as long as it works.
thanks
Julio,
I have been updating the instructions for building usually on a major release, but I realize enough has changed that this is an issue. I will try to update them next week. Until then you can try downloading the allinone and use it to check out the BIRT projects.
Remove the test projects and add iText to the lowagie plugin and it should build.
Jason
Jason, I'm in much better shape now. I finally managed to compile and run the code from CVS. My problem was really twofold:
1) I was trying to map the instructions on your book (and also the online instructions) to the new reality. That was a mistake, as they changed in subtle but significant ways
2) I was not getting the right subset of datatools. I stopped getting dtp plugins as soon as my subset would compile, and then proceed to checking out birt. I finally got the a better dtp set, and that did the trick.
Thanks for your response and for helping the community! And thanks in advance for the upcoming instructions ;)
--------------------------------------
I saw this example :
http://download.eclipse.org/birt/downloads/examples/scripting/scripteddatasource/scripteddatasource.html
Where a Java class simulate a data read. But, this example doesn't work on my work station :(
--------------------------------------
This example doesn't work because it is not correct.
The fetch script doesn't execute well because there should be an else after the if statement :
if( currentrow >= totalrows ) {
return( false );
} ELSE {
/* row assignments */
}
Hello,
I have questions about BIRT 2.1. Will it be easy to use of people that do not know SQL?
Will the templates be easy to use and will the templates be easy to adjust after what the person who wants to make a report wants?
Or is the current version good enough for all of this and will it not make a difference which of the editions one use.
Hello :)
i have tried the example ScriptedDataSetEH and also put the class in the scriptlib, but birt saies there is a report error.
what is wrong with my code?
another question: is thar possible to create dataset
's column definition at run time with java instead of birt designer ?
hello :)
i have tries the example ScriptedDataSetEH and also put it in the scriptlib, but the birt gives a report error. what is wrong with my work?
another question: is it possible to make dataset's column definition at run time with java instead of using desinger at design time ?
You can create the whole report using the DE API.
Jason
This thread mentions a 'book' on Birt. I looked on amazon, and it says that there are a couple of books that have yet to be released... Is there really a book to help me get going with Birt? The seeming lack of documentation and non-trivial examples is my biggest impediment to using the system. Any help is appreciated.
Greetings!
Regarding the Scripted Data Source, what if my data source class references another class? Say for example, it uses Log4J classes. Where should I place the Log4J jar? I tried placing it in %REPORT_VIEWER%/birt/WEB-INF/lib, but I'm still getting a NoClassDefFoundError whenever I try to preview the results in the data set editor.
Thanks a bunch! :)
Hi,
I have a question about data sources. I am developing a application in j2ee and it uses all sql queries using dao class ( this is our own data base acces class).
Now, we are planning to use Birt as a reporting engine within our application. So we want birt to use our dao class ( i.e all sql should go thru it and there wan't be connection for birt as dao class will handle it).
I know I can extend ODA to use it. But as we want designer as well as runtime ( i.e viewer customized in j2ee app) to use it.
Can u suggest what I sould do for it?.
I can add few methods to my dao class to give sql results in the format birt requires but as it needs to be generic to use with all reports we design and work as a normal sql source ( jdbc like) for birt.
Hello Jason, I am a newbie to BIRT and I was trying to implement BIRT into my RCP application. I have succeeded to Design a fresh report and open already designed rptdesign files using DE and RE APIs. But Now I am actually trying to embed the BIRT RCP report designer in my application to allow customization of reports that are already designed. I am unable to do that. Could you please help me with it?
Hi!
I want to set the Page Break Interval property through scripting.As I want to dynamically change the number of rows displayed in a page. But I am not able set that programatically in javascript. I can even get the value by using getUserProperty(). But could not set.
Is there any other way to do that through scripting?
please help! I am strugling for this :-(
My email : rasid2006@gmail.com
2.2 will most likely have a better way of doing this in the end, but you should be able to add script to report in the beforeFactory or the onPrepare of the table with the following value.
th = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("myTable");
th.setPageBreakInterval(5);
Make sure you name your table.
Jason
But I can not find the method
th.setPageBreakInterval(5);
Finding out the setPageBreakInterval(5) method thats what the real challenge for me. Its not available to the BIRT version(2.1.2) I am having.
setPageBreakInterval should be available in 2.1.2. I tested the code I posted with version
2.1.2.v20070205.
Jason
Can you please post the code you have tried once again?. its not visible completely in the earlier post.
Thanks in advance!
Hi Jason!
Thanks a lot for all of your replies!
I have some other couple of questions like
(1)How can I add Calender widgets in the Report? so that in a Report Parameter the user can select the date from the Calender Widget?
And one more
(2) How can I enable a Auto-Complete feature in a Report Parameter? like when a end user type some part of a LastName , All the Matching Last Name should appear in the drop down of the Report parameter.
Waiting for your replies! Any hints on these would be of great help to me.
Thanks!
Abdul,
1 - BIRT does not have a calendar widget, but you should be able to modify the viewer jsp pages to add this behavior.
Take a look in the Viewer/Webcontent/birt/pages/parmaeter directory.
2 - BIRT supports simple autocomplete. In other words if I have 5 s value cities in a combo box, hitting s on the keyboard once will take me to the first, hitting s twice will take you to the second etc. To modify this behavior you will need to modify the pages mentioned in 1.
Jason
Hi Jason! Thanks a lot for your replies.
I have a one more question.
Can I hide/unhide specific columns at runtime? So that a user can select a particular column and hide/unhide that column? if possible then and how?
thanks once again for your replies.
--Abdul
This can be done by using the visibility properties on rows and columns(2.2). You can use an expression that links to a report parameter. Take a look at this post. It is not exactly what you want but should give you some ideas.
http://birtworld.blogspot.com/2007/03/birt-milestone-5-new-and-notable.html
Jason
Hi,
I have a requirement wherein the number of columns vary depending upon the type of data, for example, the customer will have fields like name, description, birthdate etc, while a store will have different fields like number of customers, store name, store debt etc. I want to display both the reports that is for customer as well as store in a single report. This means that the columns will vary at runtime.
what i want is that i have a report template in which i can give a good look and feel for the columns do all the necessary decorations and then at runtime decide how many columns to fill.
I have a ObjectFactory which depending upon the type gives me list for stores or customer as required. Please let me know if i can design a standard template to use in both the cases.
Thanks
Himanshu
Himanshu,
If you are using BIRT 2.2 take a look at the crosstab element. If this does not meet your needs you will need to use the DE API either by developing your own Servlet or adding script to the report that calls the DE API.
Jason
Hi :
I want to display the total number of pages in my report
eg: 1 of 10
I tried page n of m option available in the master page.But the total number of pages remains 0 alwayscould anyone suggest a solution for this problem?
regards
praveen
Hi :
I want to display the total number of pages in my report
eg: 1 of 10
I tried page n of m option available in the master page.But the total number of pages remains 0 alwayscould anyone suggest a solution for this problem?
regards
praveen
Can you try the lastest release of BIRT?
I am using log4j in the scripting Database source. I place my log4j-1.2.15.jar file in the folder C:\eclipse\plugins\org.eclipse.birt.
report.viewer_2.2.1.r22x_v20070920\
birt\WEB-INF\lib
However when I try to preview I get an error Http Status 500. When I check the log files I see the following exceptions
java.lang.NoClassDefFoundError: org/apache/log4j/Category
Can you log a bugzilla entry for this? Also verify that the log4j jar is nowhere else in the classpath.
Hi,
We are using BIRT plugin 2.1.2. We wanted to know if multiple report files can re-use common styles through a CSS file or through the Report library feature.
Thanks.
Yes. Create a library and under themes import the css you want to use. In the report design select the ouline view and right click on libraries and select use library (pick the lib you just created). Then from the library explorer drag the them you modified to the outline view of the report. Drop it on the top level item in the outline ( this will be the name of your report.rptdesign). You can then apply the style using the right click option on any element in your report and select apply style.
Jason
Hi Jason,
I have been desperately trying my best to get my scripted datasource example working, but in vein :(
I keep getting the following exception in my tomcat logs
Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage SimpleClass] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (DataSet[Favorite].__bm_OPEN#1)
Script source: DataSet[Favorite].__bm_OPEN, line: 1, text:
__bm_OPEN()
I tried placing the class under the following folders
1. %BIRT_WEBAPP%/WEB-INF/classes
2. %BIRT_WEBAPP%/WEB-INF/lib
3. %BIRT_WEBAPP%/scriptlib
My environment
1. Tomcat v5.5.25
2. BIRT v2.2.2
Please help.
but the example works just fine when I try to preview it from the Eclispe IDE. Placed the class under
org.eclipse.birt.report.viewer_2.2.2.r22x_v20071213\birt\WEB-INF\classes
and the thing worked like a charm...
but keeps consistently failing under the tomcat j2ee container :(
vsrikarunyan,
Can you try to put your class in a package and jar it. Then try the scriptlib directory again?
Jason
hi
I am having problem to DISPLAY CHART IMAGE.
WHEN I AM TRYING TO LOAD PIECHART REPORT IN HTML FORMAT ITS CHART IS NOT LOADING BUT CHART IMAGE IS CREATED ON PARTICULAR PATH.
HOW CAN I DISPLAY CHART IN HTML FORMAT.
HTMLRenderOption options = new HTMLRenderOption();
//set the image handler to a HTMLServerImageHandler if you plan on using the base image url.
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);
options.setOutputStream(resp.getOutputStream());
task.setRenderOption(options);
I AM ABLE TO LOAD PDF REPORT WITH CHART.
Can you try setting the base url and image directories specifically?
options.setImageHandler(new HTMLServerImageHandler());
options.setImageDirectory(sc.getRealPath("/images"));
options.setBaseImageURL(req.getContextPath()+"/images");
I need to show two different type of styles for one field. I have two different types of telephone numbers that I want to set. Phone number style 1: @@@-@@@@ and phone number style 2: (@@@)@@@-@@@@@. I tried scripting this with onCreate using the following code:
if (phoneNbr.length = 7){
elem =reportContext.getDesignHandle().findElement("PhoneNbr")
elem.setProperty("style", "Phone1")}
else{elem = reportContext.getDesignHandle().findElement("PhoneNbr")
elem.setProperty("style", "Phone2")}
That doesn't work. I'm new to BIRT and don't know if this is the right way to go. Any help would be great.
For the phone number question. I would create two styles. In the styles I would have my different formats.
Then I would create a highlight rule for the control based on the length you choose one style, with the other being a default.
You can find the the highlight on the property editor in the tabs. Just click on the component and then look at the tabs.
Scott,
Thank you for your post. That worked.
I have read some posts in Birt-exchange about implementing a calendar widget with date parameters, but I can't make out the best way to go about it. Are there any good directions out there that could help me implement one.
Post a Comment