Jump to content
We've recently updated our Privacy Statement, available here ×

data in Report, order


jesus_jfri

Recommended Posts

Hello people:

i have  this data:    {AAA , 18} ,{ BBB, 10} , {CCC ,20},{ DDD, 65}, ........ {SSS, 16}.
i want to show it in the report like that:

AAA    18     DDD  65    GGG 33    .......... SSS   16
BBB   10     EEE   13    ...
CCC  20     FFF    98    ...
 

 

Any idea? , i am using a normal table, but all the data is under , Example : 

AAA    18

BBB   10

CCC  20

....

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

We can use jasper's built-in multi-column layout function to produce the desired repot. To create the multi-column layout in a subreport or a band, we need to arrange the source data according to the layout. Suppose that the source data has 10 double-field records, and you want to arrange it into 3 columns(colN=3) . Then we need to generate a 6-field two-dimensional table.

We can use esProc to rearrange the data. The code is simple:

A1=$select name,value from tb

A2=ceil(A1.len()/colN)

A3=A1.group(ceil(#/A2))

A4=create(${colN.("name"/~/",value"/~).string()})

A5=A4.paste(${A3.len().("A3("/~/").(#1),A3.("/~/").(#2)").string()})

 

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