1
votes

I have created some reports to go into CRM, one of these reports uses the other as a sub-report and I have linked the two together so that it all works. But now I have a second report that will need the same sub-report on it. So is there any way that I can link a sub-report to multiple parents so that both can see it? Or will I need to have a copy of the sub-report for each report I want to use it in?

Thanks

2

2 Answers

2
votes

From my experience you can only link a sub report to one parent via the Dynamics interface.

I am looking at other options to get around this at the moment, but haven't found any as of yet.

I am currently creating two sub-reports in cases like this.

0
votes

Better late than never, and for future reference:

I solved this issue by using a IF/ELSE structure, this way I can use the parent to select which selection to make. When the sub-report is run directly it uses the CRM Automatic Filtering context. When the sub-report is provisioned with an account ID from a parent it uses this to determine the context.

IF(@AccountId IS NULL OR @AccountId = '')
BEGIN
SELECT TOP(3) ava_campaignparticipationid AS CampaignParticipationId
FROM Filteredava_campaignparticipation AS CRMAF_Filteredava_campaignparticipation
END
ELSE
BEGIN
SELECT ava_campaignparticipationid AS CampaignParticipationId
FROM Filteredava_CampaignParticipation
WHERE ava_accountid = @AccountId
AND ava_participation = 915240002
END

Hope this helps someone out there.

Regards.