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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help to get right data from Subreport

Status
Not open for further replies.

42894

Technical User
Mar 16, 2008
11
0
0
US
Hi,

I am using CRXI. I have 2 tables Item1 and Item2.
In Item1 i have column A_Owner and in Item2 i have B_Owner. Both field have multiple values per ID.

In my report i need all coumns where A_Owner and B_Owner are same. I add A_Owener = B_Owner in record selection formula. But now i need to add one separate column where it will show all B_Owner for that ID it doesn't matter if it is eqal or not. I added B_Owner in subreport and add the subreport as column in detail section. But it is showing all the B_Owner which are in column not for that ID no. in each row.

For eaxmple:
ID Address State Country A_Owner B_Owner

now i need to add "ALL B_OWNER" for that ID as a separate column.

I would really appreciate your help.

Thanks in advance
Aatman
 
You should be able to do it without a subreport. Go to Database Expert->link and
[ol]
[li]Reverse the link from A to B and make it a Left Outer Join[/li]
[li]or Simply do make it a right outer join[/li]
[/ol]

This will give you everything from Table B that is not in Table A as well as everything that matches betwenn table A and B

-lw


 
Hi,

Thanks for your reply. But i need "All B_Owner" as a separate column. How do i get that? Please reply

Thanks
Aatman
 
Assuming everything except B-Owner is in TableA, then click and drag {TableB.Owner} onto the report canvas.

Your report will list every B_Owner regardless of whether there is an A_Owner or not.

It would help a little if you provided some examples of the input data and expected output to include your groupings and sorts.



-lw
 
Hi,

For example,
ID Address State Country A_Owner B_Owner
101 45, salem CA USA ABC-123 DEF-345
DEF-345 XYZ-123

102 65, jam PA UK XYZ-000 LMN-222
XYZ-000

Now i need the records where A_Owner = B_Owner. So it will show both the (101,102) records but now i need to add one column. My output will look like below.

Please reply. Thanks in advance
Aatman

ID Address State Country A_Owner B_Owner All B_Owner
101 45, CA USA DEF-345 DEF-345 DEF-345
XYZ-123

102 65, PA UK XYZ-000 XYZ-000 LMN-222
XYZ-000

I hvae done grouping on ID.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top