Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenate 1

Status
Not open for further replies.

Chuku

Programmer
Jun 9, 2011
25
US

hi,
I need to concatenate the below data. For eg


This is how the original data looks like
Owner
A
B

Expert
C

Builder
D
E

and so on.

where Owner, Expert and Builder refer to ROLES and are placed in the GH and A,B,C,D and E are from a formula and are placed in the details section

I need to display like below
Owner Expert Builder
A C D
B E

How can this be done?
 
Format the detail section to multiple columns, and in the layout tab, choose the width and gap to force three columns. ALSO, check "format groups with multiple columns". Then format the group footer to "print at bottom of the page"--this will make the header of each group appear at the top of its column.

-LB
 
Hi again,

Sorry,I think I need to explain more.

Owner, Expert and Builder are from table called [Roles]. So i had done a grouping accoording to the roles

A, B , C, D, E are corresponding user names which come from a formulae

So this is how my report looks :
GroupHeader -> [Roles]
Details -> [@Usernames]

This is how my output looks like :
Owner
A
B

Expert
C

Builder
D
E


But i need to look like below:
Owner Expert Builder
A C D
B E

Hope I am clear this time..


 
Yes, that is what I understood. What happened when you tried my suggestion?

-LB
 
Hi lbass,

apologies for the late reply..

I tried what u had mentioned. but the each role appear in a separate page and they occupy the same cell in every page.

thanks...

 
Hi lbass,
Finally got it right.. thanks for ur help. A minor thing though. Since the option in the group footer to "print at bottom of the page " has been checked, more than half the page remains blank. Only in the next page the other section appears.

How can i solve this?
 
But what else should be on the page? Do you have some outer group that you didn't mention earlier? Or are you expecting the roles to wrap? About how many role groups are there? Should it look like this? How many roles fit across the page?

Owner Expert Builder
A C D
B E

Plumber Electrician Painter
F K M
G L N
I O
P

-LB
 
Owner , Expert and Builder are the three roles..

Owner Expert Builder
A C D
B E

This is followed by the other group in the next section which give various process details and are grouped according to their process names.

Ideally these processes need to follow right below the role details, but they do not. they seem to start from the next page. How can I make them to display below the roles in the same page itself??

Thanks in advance
 
Please explain your overall report structure. You originally said you had a group on roles, and for details you had usernames. My suggestion using formatting into multiple columns would have caused ALL details and groups to format with multiple columns, so I don't know how you are getting different formatting with process details. It sounds like you also added a group on process names? The print on bottom of page should have been applied to the role group footer--make sure you didn't format the wrong section with this.

-LB
 
GH1 - has the Subreport1. (grouped according to plan names)
This inturn has
1) SubreportGH1-> grouped to roles (Owner, Builder, Expert)
2) SubreportGH2-> grouped to user names.
details section of this subreport contains the user names and has been formatted with mulitple columns.
Both SGH1 and SGH2 are present inside the subreport
The SGF1 has been checked with 'print at the bottom of the page'

GH2 - (grouped according to process names)
details section contains the process details

GH2 must follow on the same page, but since the SubreportGF1 has been checked with 'print at the bottom of the page' , GH2 appears in the next page..

Hope i am clear this time..
Thanks for ur patience
 
In this case, if there always only three roles, it might be better to NOT use multiple column formatting and instead use variables like this:

whileprintingrecords;
stringvar owner;
stringvar bldr;
stringvar expt;
if {table.row} = "Owner" then
owner := owner + {table.name}+chr(13);
if {table.row} = "Builder" then
bldr := bldr + {table.name}+chr(13);
if {table.row} = "Expert" then
expt := expt + {table.name}+chr(13);

Then in the Subreport Footer, use a formula like this for each role:

//{@Owner}:
whileprintingrecords;
stringvar owner;
"Owner"+chr(13)+
(
if len(owner)>1 then
left(owner,len(owner)-1)
)

Repeat for other roles. Place formulas side by side in the sub footer and format each to "can grow". Then suppress the other subreport sections.

If there can be nulls, you should also add a reset formula to the subreport report header:

whileprintingrecords;
stringvar owner := "";
stringvar bldr := "";
stringvar expt := "";

-LB
 
I did like above.. This is how the data displays

Owner Builder Expert
Owner Builder Expert
Owner Builder Expert
A
B

Each Role name appears thrice.. For the Owner role, the user names gets pulled up, but for builder and expert it doesn't..

How can i solve this? thanks again!
 
Apologies.. I did not give the option can grow in expert and builder.. now its working.. but a minor problem though

Owner Builder Expert
MARK RICK
Owner Builder Expert
MARK RICK
Owner Builder Expert
MARK RICK

RUTH


This is how the data displays.. The names MARK and RICK seem to appear more than once..






 
The first formula should be in the username group section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top