function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SF MasterSF Master 

Salesteam and Products

Is there anyway can i run report between Opportunities, Saelsteam and Products. 

 

i am looking for all options. it is only giving options for Opportunites and and their salesteam . or products and Opportunities. but not with these three.

 

let us know if there is better solution.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

You can't do this. You are trying to create a report involving two children objects on the same parent, which isn't supported by the reporting engine. You may report "up" a relationship (i.e. a case, its contact, and the contact's account), and you can report "down" a relationship (i.e. an account, its contacts, and the contact's cases), but you can't go "up" and then "down" in the same report (i.e. cases, the case's account, and the account's contacts). You can go "down", and then "up", (i.e. contacts, their cases, and the case's account), but this type of use case requires a Custom Report Type.

 

If you think about it, your report would create a cartesian join, which is where each row in one table is repeated against the rows on another table.

 

Opportunity with three products and three sales people:

Opportunity A

  Sales Person A

  Sales Person B

  Sales Person C

  Product A

  Product B

  Product C

 

Results of report:

Sales Person A  Opportunity A  Product A

Sales Person B  Opportunity A  Product A

Sales Person C  Opportunity A  Product A

Sales Person A  Opportunity A  Product B

Sales Person B  Opportunity A  Product B

Sales Person C  Opportunity A  Product B

Sales Person A  Opportunity A  Product C

Sales Person B  Opportunity A  Product C

Sales Person C  Opportunity A  Product C

 

As you can see, it would create a nonsensical report; there are nine records when you were expecting only six. The more rows are in both tables, the larger the problem compounds itself; an opportunity with 10 sales people and 10 products would generate 100 rows of data.

 

If you really want this sort of data in one "table", you'll hae to consider more complicated setup, such as a Visualforce page or an external reporting tool.

All Answers

sfdcfoxsfdcfox

You can't do this. You are trying to create a report involving two children objects on the same parent, which isn't supported by the reporting engine. You may report "up" a relationship (i.e. a case, its contact, and the contact's account), and you can report "down" a relationship (i.e. an account, its contacts, and the contact's cases), but you can't go "up" and then "down" in the same report (i.e. cases, the case's account, and the account's contacts). You can go "down", and then "up", (i.e. contacts, their cases, and the case's account), but this type of use case requires a Custom Report Type.

 

If you think about it, your report would create a cartesian join, which is where each row in one table is repeated against the rows on another table.

 

Opportunity with three products and three sales people:

Opportunity A

  Sales Person A

  Sales Person B

  Sales Person C

  Product A

  Product B

  Product C

 

Results of report:

Sales Person A  Opportunity A  Product A

Sales Person B  Opportunity A  Product A

Sales Person C  Opportunity A  Product A

Sales Person A  Opportunity A  Product B

Sales Person B  Opportunity A  Product B

Sales Person C  Opportunity A  Product B

Sales Person A  Opportunity A  Product C

Sales Person B  Opportunity A  Product C

Sales Person C  Opportunity A  Product C

 

As you can see, it would create a nonsensical report; there are nine records when you were expecting only six. The more rows are in both tables, the larger the problem compounds itself; an opportunity with 10 sales people and 10 products would generate 100 rows of data.

 

If you really want this sort of data in one "table", you'll hae to consider more complicated setup, such as a Visualforce page or an external reporting tool.

This was selected as the best answer
SF MasterSF Master

Dear SFDC FOX..

 

THanks for your reply.. it makes sense for us.. we actuvally thinking of some reproting tool. but we are checking if there is any Quick fix meanwhile.

 

Thank you.

SF MasterSF Master

i am trying to create custom report type between these three. is there any way ? i really wonder.

 

 

sfdcfoxsfdcfox

You'll not be able to make a report of this type inside Salesforce. At best, you'll need two reports, which you'll have to export to Excel to get a side-by-side, or a custom integration. I really wish I had a better answer for you, but that is just a limitation of the platform.

SF MasterSF Master

Thank you.