From: tcollins on
Hi all,

I am attempting to create a report similar to the default Sales
Pipeline Report. When one of the bars in a bar chart is clicked, a
list of the records that made up that total is displayed in a sub
report. Any of the records in the list can be clicked open the
selected record in CRM.
I am using the Invoice entity. From what I have read online, it seems
like I need to create a report parameter called CRM_URL and add it in
the Action property of the appropriate table cell of my report:

=IIF(IsNothing(Parameters!CRM_URL.Value), Nothing, Parameters!
CRM_URL.Value & "?ID={" & Fields!invoiceid.Value.ToString() &
"}&OTC=1090")

This works if I call the report directly from within CRM but if the
report is a sub-report of another report it doesn't work. The CRM_URL
parameter remains blank and per the code above, doesn't do anything.

If I hardcode a particular invoice id then I get an error message
saying:An attempt was made to set a report parameter 'ID' that is not
defined in this report. (rsUnknownReportParameter)

The OTC code is correct for the database

Any suggestions as to where I might be going wrong or has anyone seen
this behaviour before?

Regards,
Tim

From: tcollins on
I have managed to solve this issue. For anyone that reads this in the
future, to drill-through from a parent report to a
child report (sub report) you have to do the following:
1. Create a parameter called CRM_URL in the parent report. It's data
type should be set to string. Tick the two boxes to allow nulls and
blanks. Available values should be set to non-queried. Default values
should be set to none.
2. Repeat the parameter creation, this time for the child report.
3. Wherever the child report is being called, the parent report must
pass the CRM_URL parameter to it. In my case it's being called through
the Action tab of a chart value. The parameter name should be
"CRM_URL" and the parameter value should be "=Parameters!
CRM_URL.Value".

The problem that I was having is when you preview this you will get an
error saying "The parameter CRM_URL is read-only and cannot be
modified". Based on my previous experience with the reports, I took
this to mean that the report was messed up and that I had to fix this
error before it would work. This was a mistake. As I have discovered,
even the out-of-the box CRM reports do this. If the report is deployed
as-is it will work as expected e.g. the drill-through to CRM will
work.

Hopefully this will help anyone else that runs into this issue.