Jump to content

Need table of fixed size in detail block


Santoshi.E

Recommended Posts

In detail block, will have a table of fixed size and according to the records dynamically generated will be displayed in the table.

 

In my case the table height is depending on the number of records. If records are 2 table height is ending there itself, the table should not end there itself it has to maintain fixed size regardless the number of records.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

The simplest way to force the detail section to be a fixed size is to bind your query to a table of fixed size.

 

 

1) Create a table with the numbers 1 to n, where n is the total number of rows you require.

 

 

2) Alter your existing report query so that it is LEFT JOINed to the table, like this:

 

 

Oracle example:

---------------------

SELECT a.DUMMY_NUMBER

, b.*

FROM FIXED_TABLE a

, ("select ROWNUM, field1, field2

from yourtable1, yourtable2

where yourtable1.key=yourtable2.key") b

WHERE a.DUMMY_NUMBER=b.ROWNUM(+);

 

 

 

MySQl example:

---------------------

SELECT a.DUMMY_NUMBER

, b.*

FROM FIXED_TABLE a

LEFT JOIN (SELECT @rownum:=@rownum+1 rownum

, t.*

FROM (SELECT @rownum:=0) r

, ("the original query") t

) b

ON a.DUMMY_NUMBER=b.rownum;

 

 

 

3) Add a field in the detail section to hold the new DUMMY_NUMBER field that forces all the required rows. Set its width to zero (0) so that it doesn't display.

 

 

4) Make sure all the other fields have the "Remove line when blank" setting unchecked, and the "Blank when null" setting checked. Add borders as required.

 

 

 

That should get you out of trouble.

Post edited by: jmurray, at: 2007/01/19 10:14

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...