Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Need a solution for creating tables on pdf report at runtime
Need a solution for creating tables on pdf report at runtime [message #373030] Wed, 29 July 2009 12:30 Go to next message
Roopa  is currently offline Roopa Friend
Messages: 20
Registered: July 2009
Junior Member
Hi,

Am facing a problem in creating the tables at runtime in the script. If i
write my script for table creation in the the initialise() , i see that
its created at the the end of the report . But i need it in between on of
the rows of the table which is created in .rptdesign file.

My scenario is : I have an ArrayList in the Fetch(). I have if and else
conditions, where in each condition , my arraylist size changes and even
the fields to be poplulated also changes.
So, what i want to do is, iterate this list and create the table
dynamically here ,according to the size of the list and display it on the
pdf.
Can i write some script in the fetch() and create the table? Is this
possible.

Thanks in advance,
Roopa.
Re: Need a solution for creating tables on pdf report at runtime [message #373339 is a reply to message #373030] Wed, 29 July 2009 14:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Roopa,

The initialize method is called multiple times, once before generation
starts, once for each render operation when using the /frameset mapping.
Usually you want to put DE API code in the beforeFactory script. This
is where you should create your table and the dataset attached to it.
Do you have access to your ArrayList at that time?

Jason

Roopa wrote:
> Hi,
>
> Am facing a problem in creating the tables at runtime in the script. If
> i write my script for table creation in the the initialise() , i see
> that its created at the the end of the report . But i need it in between
> on of the rows of the table which is created in .rptdesign file.
>
> My scenario is : I have an ArrayList in the Fetch(). I have if and
> else conditions, where in each condition , my arraylist size changes and
> even the fields to be poplulated also changes.
> So, what i want to do is, iterate this list and create the table
> dynamically here ,according to the size of the list and display it on
> the pdf.
> Can i write some script in the fetch() and create the table? Is this
> possible.
>
> Thanks in advance,
> Roopa.
>
Re: Need a solution for creating tables on pdf report at runtime [message #441153 is a reply to message #373339] Fri, 31 July 2009 09:47 Go to previous messageGo to next message
Roopa  is currently offline Roopa Friend
Messages: 20
Registered: July 2009
Junior Member
Jason,

I wont be able to access the arraylist in the beforeFactory(), since
this
part of the script gets executed soon after the initialise().
Is there any workaround for my problem.

Thanks,
Roopa
Re: Need a solution for creating tables on pdf report at runtime [message #443990 is a reply to message #441153] Fri, 31 July 2009 16:11 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Roopa,

How are you getting the arraylist?

Jason

Roopa wrote:
> Jason,
>
> I wont be able to access the arraylist in the beforeFactory(), since
> this part of the script gets executed soon after the initialise().
> Is there any workaround for my problem.
>
> Thanks,
> Roopa
>
Re: Need a solution for creating tables on pdf report at runtime [message #467984 is a reply to message #443990] Mon, 03 August 2009 13:34 Go to previous messageGo to next message
Roopa  is currently offline Roopa Friend
Messages: 20
Registered: July 2009
Junior Member
Jason ,

I changed my logic of creating the tables dynamically.
Now, I am creating the tables from the template for each of my conditions
and setting the data accordingly. Am able to see the tables on the PDF.
But finding another issue. I see that blank rows are also inserted in my
table along with the valid data.. What might be the issues for this.

As discussed abt my requiremnt in the last post,(i have different
conditions and need different tables accordingly). Now am adding the all
the objects in the same arraylist with a flag for each conditon to
distinguish. But the problem is all the tables are setting to the size of
the arraylist and so blank rows are getting displyed in all the tables..
Dont know, why is this happening. Could you please help me.

Thanks.
Re: Need a solution for creating tables on pdf report at runtime [message #468308 is a reply to message #467984] Wed, 05 August 2009 01:07 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If you are using a scripted dataset and the array list has a size that
is probably the number of rows that are getting processed. Even if the
value is null. You could use a visibility expression on the row to not
show certain rows which should work.

Jason

Roopa wrote:
> Jason ,
>
> I changed my logic of creating the tables dynamically.
> Now, I am creating the tables from the template for each of my
> conditions and setting the data accordingly. Am able to see the tables
> on the PDF.
> But finding another issue. I see that blank rows are also inserted in my
> table along with the valid data.. What might be the issues for this.
>
> As discussed abt my requiremnt in the last post,(i have different
> conditions and need different tables accordingly). Now am adding the all
> the objects in the same arraylist with a flag for each conditon to
> distinguish. But the problem is all the tables are setting to the size
> of the arraylist and so blank rows are getting displyed in all the
> tables.. Dont know, why is this happening. Could you please help me.
>
> Thanks.
>
Previous Topic:Oracle - Using PL/SQL Packages.
Next Topic:new DataSetProcessor for Venn-Diagram ?
Goto Forum:
  


Current Time: Thu Apr 25 22:52:02 GMT 2024

Powered by FUDForum. Page generated in 0.24093 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top