Friday, October 20, 2006

Aggregate Update

When I did the Aggregate example, I noticed that I could not import the DataTypeUtil from the org.eclipse.birt.data project. To work around this, I just created my own DataTypeUtil class. I hate this kind of code, so I submitted a bug to have those class(s) exposed.

It turns out that the issue is the way in which I was adding the dependency classes.

DataTypeUtil is in the org.eclipse.birt.data project, so this item needs to be added to your dependencies. In addition, DataTypeUtil throws a BirtException. So you need to add the org.eclipse.birt.core package.




But there is a catch. The org.eclipse.birt.core package has a filter that acts to block the inclusion of items from the org.eclipse.birt.data project. So it can not be the last item in the dependency list. I have asked the developers to look and see if they can resolve this issue.

Scott

20 comments:

Jason McIntosh said...

Hey guys, BIRT user here ;) Obviously anyways. Wanted to drop a post here, although I've sent an email into the support address at actuate (I DO have a support contract, but I also like to talk to developers directly). I hit an issue I had to ask you guys about.

To explain, briefly, we're using code to store the username/password in a session when someone tries to run a report, and then in future report accesses, passes the username/password as variables to the report system. The trick is, I'd like to pass those variables as POST vars, so I can secure the connection via SSL. However, the birt server is only taking GET variables for hidden fields.


Or more precisely, it seems to ignore POST variables except for filling out the floating parameter box. Thought I'd see if you guys hit this before, had any suggestions. Sorry if this is a bad post to toss this out on, but trying to find an easy solution, and you guys don't have a "contact me" page ;)

Scott Rosenbaum said...

jason,

Please send me an email:
scottr at innoventsolutions dot com

scott

Anonymous said...

Hi,

i have a problem when changing from Birt-2_0 to Birt-2_1_1.

I used Birt-2_0 to generate the reports and it works fine. But by using Birt-2_1_1 i get Message "invalid report xml file".

Jason Weathersby said...

Generally you get this message when opening a newer design with the older engine. Verify that you are not using any libs of 2.0 and that everything is using 2.1.1.

Jason

Anonymous said...

i have used the Bar-Subtype "Side by side Bar" successfuly generated a chart image in my birt report. But when i try another Bar-Subtype "Percent Stacked Bar" with the same report data, i could not get the data stacked one over the other, instead still 3 different bars just same as
those with "Side by side Bar"-Subtype.

what should i do to get it work?

Jason Weathersby said...

Can you send me the report?

Jason

Anonymous said...

Jason,

i have send you the report per mail (the blogger commentar doesnt let me to publish the report).

i have noticed when i change Chart Subtype to Percent Stacked Bar, the chartpreview in Edit Chart-Panel shows also 3 different parallel Bars instand of one over the other stacked view. The chartview doesn't change at all when changing from 1. Subtype(Side by side bar) to 2. suntype(stacked bar). I am not sure if these are bugs in runtime-2_1_1.

best regards

Anonymous said...

Jason,

i get the problem with percent stacked bar resolved. It is a error of my side. By using "Optional Y Series Grouping" and let "Category(X) Series" empty i get the hoped result.

regards

Peng

Anonymous said...

Jason,

thanks for your reply, yes, i have this working now.

yet another question, is there a relativ simple way to change chart at run time depending on the user request ? background: i have already the report with table, in addition i want also a chart description in the same report which be able changed to other chart-type by user request.

peng

Jason Weathersby said...

Peng,

Can you give an example of what you want? A totally different chart type may be possible but may require a good deal of script or code.

Jason

Anonymous said...

Jason,

i mean that when user wants to create a report with addtional chart image beside common text and tabel per web browser and there a list of possible chart types to chose from the web application, say pie chart and bar chart. Depending on what kind of chart type user choses, the generated report should contain the right chart in it.

Peng

Anonymous said...

Jason,

during the test phase of our reporting application, my coworker finds a anomaly: that is when we create the same report two times in series but with different formats (in that case the first one will be overwrited by the second generated report, because the report has no extention in it's name, we have to do that because of application's nature), say the first time as html and second time as pdf or vice versa, then some times we could not see the result report in it's right format, that means, for example, when first time it is a pdf report file, and second time it was overwrited by a html report file(i see it per creation time), when i open it in web browser, i see a file with pdf format(pdf code) in the web browser.

Have you any idea ?

Peng

Jason Weathersby said...

Peng,

Are you running the report through the Web Viewer? If so can you run your test again using the &__document=test1.rptdocument on the first and &__document=test2.rptdocument on the second?

Will all your chart choices be in the same report? If so you can turn visibillity on and off on the given charts based on a parameter. If you are using 2.1.1 you should be able to drop the non needed charts from the running report using something like this in the beforeFactory:

reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("Chart1").drop();

Jason

Anonymous said...

Jason,

we have found the problem with inconsistent report. it is a problem by using a PLM tool(we use web support from a PLM tool instead birt web viewer) during asynchronous check-in/check-out process into a reports-repository.

i will try your suggestion for dynamic chart choices. Thanks for the tips.

regards
Peng

Anonymous said...

Jason,

i guess that reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("Chart1").drop();
you writes means in fact follows:
reportContext.getReportRunnable().getDesignHandle().getModuleHandle().findElement("Chart1").drop();

because i haven't find any findElement(..)-method untet DesignHandle

Peng

Jason Weathersby said...

Peng,

You are correct. Name your elements with the Name property in the Property editor.

Jason

Anonymous said...

Jason,

it works with droping the non needed charts from the running report per user request :)

p.s. i taks a look at the birt projectplan, it writes that a xls-emitter and rtf-emitter will coming out with the next major release 2.2, is that true?(a xls-emiiter has a great importance for us, at moment i use the xls-emitter named Tribix, but i'd perfer to use birt own xls-emitter).

Jason Weathersby said...

2.2 Should have a word and excel emitter. I do not know what milestone they will be in yet.

Jason

Caio said...

Hello Jason

There is an way to make all my BIRT reports to access only one datasource ?
The user and password information can be filled on an configuration file to allow my Customer to change if he wants ?
Like the old solution for store connection string on file.xml or on the windows registry.

Thanks !
=]

Jason Weathersby said...

Look at using the connection profile. With 2.2 M6 this connection profile is linked not imported, meaning changes should be reflected to all reports that use it. A connection profile is created using the DTP Data Source Explorer view.

Jason