| RE: [birt-report-designer-dev] GeneratereportfromStoredProcedure/Function |
|
Hi, Yes that is correct. All these can be done
using script data set, in which we can use java object as data source. ArrayList/Hashmaps
would be simplest ones, and you can define your own complex java object and use
them in BIRT. For details, please consult to BIRT
newsgroup/docs/publications. Thanks. Lin From:
birt-report-designer-dev-bounces@xxxxxxxxxxx
[mailto:birt-report-designer-dev-bounces@xxxxxxxxxxx] On Behalf Of Kranti Parisa Hi, So that means BIRT can take Java Object may be an ArrayList of Hashmaps
or simple ArrayList and generate report? Regards Kranti On 4/10/07, Lin Zhu
<lzhu@xxxxxxxxxxx> wrote:
Hi, For your mentioned problem, we may seek for the help of SQL. Say, you have two tables, Trans: Date, Unit Price: Date1, Date2, Price Select Unit, Price from Trans,
Price where Trans.Date between Price.Date1 and Price.Date2 However, SQL cannot always consume all your business logic,
and these may bring you the report maintaining problem (to keep Sql consistent
with business logic). Using _javascript_ might be a solution in this case. As
BIRT support script data set, you can define a script data set that fetch rows
from a java object, and in that java object you fetch data from store procedure
using JDBC. If you can update to BIRT 2.2, then you will be saved from
writing all these stuff J Thanks. Lin From: birt-report-designer-dev-bounces@xxxxxxxxxxx
[mailto:birt-report-designer-dev-bounces@xxxxxxxxxxx ] On Behalf Of Kranti Parisa
Hi Lin, Thanks
for your quick reply. But the
issue is to calculate the Price there is a business logic involved. For
example in the result set from the transaction table we have Date and Unit. So
based on the Date and Unit we need to see in price table to get the price of
this date (which may falls in between from date and to date mentioned in the
price table). Please
suggest Regards Kranti On
4/10/07, Lin Zhu < lzhu@xxxxxxxxxxx> wrote:
Hi, The version of BIRT you mentioned doesn't support get Ref
Cursor from stored procedure. However from your problem description I see no need to use
stored procedure. You may simply use sql like "select * from transaction,
price where …". If the data source you used doesn't support sql, you may
use BIRT joint data set to acquire the necessary result. Thanks. Lin From: birt-report-designer-dev-bounces@xxxxxxxxxxx
[mailto:birt-report-designer-dev-bounces@xxxxxxxxxxx ] On Behalf Of Kranti Parisa Hi, Happy to
see someone replying to my post. I am
using birt-report-designer-all-in-one-2.1.2 version. Will it
work with stored procedures? Why i
need to use them is, say for example i have 2 tables one is transaction table
another is price master table. what i
need to do is, generate a report with that transaction details and an
additional column with the price. but the price should come from another table
which is based on the record i am going to get from transaction table. Hope it
gives some description of my problem. Please
suggest On
4/10/07, Lin Zhu < lzhu@xxxxxxxxxxx> wrote:
Hi, Which version of BIRT are you using? BIRT support store
procedure ref cursor only after 2.2M4. For output parameter, you can simply use them in report by
using _javascript_ object outputParams["paramName"]. For ref cursor,
you can use them as ordinary data set. Thanks. Lin From: birt-report-designer-dev-bounces@xxxxxxxxxxx
[mailto:birt-report-designer-dev-bounces@xxxxxxxxxxx ] On Behalf Of Kranti Parisa
|