Using same Dataset for multiple tables or list in a report problem #1366
-
Hello. Im new to BIRT
In the "beforeOpen" script of the dataset:
In the "fetch" script of the dataset:
This code seems to work fine. When I drag the dataSource into my design layout it creates a table that displays all of the results just fine. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You have to set count=0 in the |
Beta Was this translation helpful? Give feedback.
-
Scripted datasets are an advanced topic IMHO. Your report is a special case, beause you said that you want to reuse a dataset more than once in the same report. For those readers who wonder "Why?": There are typical use-cases for this scenario (see below). Each time you use the data set, you want to iterate over the records. If you don't reset your Use-cases:a) You want to show the same data twice in a different form. |
Beta Was this translation helpful? Give feedback.
You have to set count=0 in the
beforeOpen
event (withoutvar
).I recommend to use report variables for things like this, just to make it more visible to the next developer that the code needs global variables.