Jump to content
Changes to the Jaspersoft community edition download ×

How to Create a Table of Empty data


vnug

Recommended Posts

Hi:

I have searched the forum ... but couldn't find anything appropriate.

I am trying to print a worksheet in PDF format. The idea behind the worksheet is, I would like to print out the worksheet with tables in them for the users to write into those tables. Yes, I could use other tools. But, we are trying to generate these tables dynamically depending on the variable "number of rows". Also, we would like to print "Row number" in the first column.

Typical scenario -

Row_Count = 6

The output should look like below:

Column1    Column2     Column3   Column4

     1 

     2

     3

     4

     5

     6

 

I would appreciate any pointers for this problem. Thanks.

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

$V{REPORT_COUNT} will give the line number but you still need something to drive the creation of each row.

If you are using a database engine you could implement logic in your SQL to drive the creation of each of your detail lines.

Ie Oracle

Select  1 from <some table> where rownum <= Row_Count

 

 

Link to comment
Share on other sites

Thanks for the responses. As Svenn pointed out $V{REPORT_COUNT} only gives line number. I was using postgresql 8.3 which does not have the feature of ROWNUM ... so created dummy table with data and used that as part of WHERE condition.

 

Now, onto dynamically creating column headers for the tables.....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...