Reputation: 1442
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
Upvotes: 1
Views: 1412
Reputation: 108
Old though this question may be, I just wanted to back up Andrew's answer. Looking at the Report entity in the Solution, you can see that Report:Parent Report is defined as a N:1 relationship; one report can have multiple sub-reports, but a given sub-report can only have one parent.
Upvotes: 0
Reputation: 41
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.
Upvotes: 0
Reputation: 10033
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.
Upvotes: 2