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

Crystal reports XI help

Status
Not open for further replies.

reacha

Programmer
Jun 9, 2010
83
US
I have in the database as


Id Name Team

12345 Reacha 16025
16025 Priya 45676
56732 John 16025
56432 Mike 16025
12678 Tom 45676
45676 Georger 98278
98278 Krystal 98278

In the report when i group by team it should search in the agentid for that team and should retieve the respective name

Can anyone help me with the formula!!


Please help me out

Thanks,
reacha
 
If you insert a group on team and place the names in the detail section, they will show up under the appropriate team.

-LB
 
but grouping on team gives me the group names as 16025,45676
but i want the respective agentname

For example team 16025 has agentname priya then when i group by team the group name should be priya instead of 16025


Please help me out!!


Thanks,
reacha
 
But you have more than one name associated with a team, so what would you expect to see then?

-LB
 
Id Name Team

12345 Reacha 16025
16025 Priya 16025
56732 John 16025
56432 Mike 16025
12678 Tom 16025
45676 Georger 98278
98278 Krystal 98278

Priya
-----
ID name hire_date
--- ---- ---------
12345 reacha 8-june-2010
56732 john 10-may-2010

Krystal
------- ID Name hire_date
-- ---- ----------
45676 Georger 10-Apr-2010


I am trying to write the formula as

if team = id then name

and then grouping by that formula

Thanks,
reacha
 
Hi,
But, in your example you have Priya as the group name when it could have been John, Mike or Reacha..how are you deciding that Priya is the name you want for team 16025?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
You could add the table a second time and link {table.ID} to {table_1.Team}. Then you can insert a group on a formula:

if {table.ID} = {table_1.Team} then
{table.Name}

Then you can insert a second troup on {table_1.team}.

Another alternative is to use hierarchical grouping (which I've never really had occasion to use).

-LB

 
I am taking the team 16025 and searching in the id for the team 16025 when it matches retrieve the respective agentname and then group by this formula







Thanks,
reacha
 
I have seen your post and tried that but it did not help me out
 
Hi,
Are we missing something if you do as you say:
reacha said:
id for the team 16025 when it matches retrieve the respective agentname and then group by this formula
you would get multiple names since 5 IDs are in that team - how do you decide which is the group name you want?

Also how do you search ID for a team , they are separate fields in your record?

Do you mean that , for a given ID, get the name for that ID and use that name as the group name and then try to get all the members of that ID's team into that group's details?


[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
reacha,

You need to explain in what way my suggestions didn't work, as they should, so we need to troubleshoot that.

turkbear, It appears that the Id field that matches the team ID, is the team leader, which is what reach wants to group on.

-LB
 
lbass i tried the way you told me but when i group by the formula i m getting null values as the name and your assumption is correct that Id field that matches the team ID, is the team leader, which is what reacha wants to group on.



Please help me out!!
I should solve it ASAP

Thanks,
reacha
 
Hi,
Thanks LB, I just noticed that relationship..

Maybe one could use a command object to select the team leader's name and the team ID and use that team ID to link to the table and group on the Team ID but display the team leader's name.

@Command
Select distinct name,team from table where ID = team

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Using the method where you add the same table twice, using an equal join from {table.ID} to {table_1.team}, try just grouping on {table.ID}. Add {table_1.Name} and {table_1} Team to the detail section and then report back with the results.

-LB
 
lbass ,

Thank you very much for your help


Thanks,
reacha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top