Jump to content
JasperReports Library 7.0 is now available ×

Spanning across bands


krispyjala

Recommended Posts

Hi all,

I was wondering if it's possible to span across bands. See, what I need is to create a two-column table, with the lefthand cell spanning multiple rows of the right...something like this

 

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

| col1hdr | col2hdr |

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

| text text |subhdr1 |

| text text | -item1 |

| text text |subhdr2 |

| text text | -item2 |

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

 

So as you can see, the right hand column needs group bands to print out repeated values while the left column stays constant. Right now, I can't find a good way of doing it. The only way I can see is if somehow the left cell can span across the group bands of the right. Both columns are text from fields (not static text). Any suggestions?

 

Thanks!

KJ.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

if i understand correctly, you want

"the first column to span multiple rows of the second column".

 

in that case, the first thing that comes to mind is the use of groups. you may have to do a combination or all of the following to get the result you want:

1) modify your report query by inserting a group by clause

2) make use of group bands

3) set the print when group changes attribute found in the commons tab of the element's property window.

 

may i ask you to attach your .jrxml file and tell us more (in some detail) your requirements. no promise of a solution but we'll see if we can figure this out together.

 

 

edwin

Post edited by: redwine, at: 2007/06/19 14:44

Link to comment
Share on other sites

Thanks for your reply redwine.

 

Unfortunately, I cannot post the jrxml as it contains some proprietary information for the company. However, regarding your suggestions, they are already being employed in the report. The problem is, say when I have group bands, it spans across the entire report horizontally. Thus, instead of displaying as I wanted, what is happening is this:

 

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

| col1hdr | col2hdr |

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

| text text |________| Section band

| text text |________|

| text text |________|

| text text |________|

| _________ |subhdr1 | Subhdr band

| _________ | -item1 | Detail band

| _________ |subhdr2 |

| _________ | -item2 |

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

 

_ is blank

 

since the text is in a parent "section" group broader than "subhdr" group (-items belong to detail band).

If there is some way to limit the bands to only one column, or have bands of different group side by side like this:

 

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

| col1hdr | col2hdr |

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

| Section band |Subhdr band|

| _____________|Detail band|

| _____________|___________|

| _____________|___________|

| _____________|___________|

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

 

 

then there might be a solution for me. Or am I going about it all wrong?

 

Thanks,

KJ.

Post edited by: krispyjala, at: 2007/06/19 18:56

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