0
votes

Data-driven subscription

The "Include Link" option is set to "True".

The email the user receives includes the link. We are finding the link appears to have random 'space' values inserted in odd places, and the user receives an error when clicking the link. We have another subscription, virtually identical to this one except for one parameter set differently and the link in that email works fine.

Reporting Services Error -------------------------------------------------------------------------------- An attempt was made to set a report parameter 'Pro ductGroupCode' that is not defined in this report. (rsUnknownReportParameter)

In this case, The link that is included in the email to the user has a space in one of the parameter names. (Pro ductGroupCode=2001). ProductGroupCode is a multi-value parameter.

http://<ServerName>/ReportServer?%2FSales%20Activity%2FReturns%20Analysis&HidePeriodOverPeriod=False&HideWeekOverWeek=False&LicensedProductIndicator=False&SubSalesChannelCode=BRK&ReportingRegionName%3Aisnull=True&ProductActiveKey%3Aisnull=True&BusinessLineCode=APP&ReportingCountryName=United%20States&ProductGroupCode=2000&ProductGroupCode=3007&ProductGroupCode=3003&ProductGroupCode=2002&ProductGroupCode=1005&ProductGroupCode=6001&ProductGroupCode=6005&ProductGroupCode=1003&ProductGroupCode=7001&ProductGroupCode=6003&ProductGroupCode=1004&ProductGroupCode=3001&ProductGroupCode=3002&ProductGroupCode=3006&ProductGroupCode=3005&ProductGroupCode=6006&ProductGroupCode=2003&ProductGroupCode=6004&ProductGroupCode=6002&ProductGroupCode=1001&ProductGroupCode=3004&Pro ductGroupCode=2001&ProductGroupCode=2005&ProductGroupCode=Unk&ProductGroupCode=1002&ProductGroupCode=&IsSample=N&BusinessAreaCode=BRO&ReportingDivisionName=North%20America&Currency=USD&CustomerTypeCode=0&RankBy=ReturnQty&report_TopN=20&HideYearOverYear=True&RankType=ItemName&rs%3AParameterLanguage=en-US

EDIT: Here is another example. It is happening on a different parameter but it's the same issue. There is no space: Clearly the ReportingDivisionName has no space in the link

However if I right-click the hyperlink, "copy hyperlink", and paste to notepad, I get this. The underlying hyperlink has a space in it.

Where did the space come from?

Here is the text.

http://ebiprd-atl01/ReportServer?%2FSales%20Activity%2FReturns%20Analysis&HidePeriodOverPeriod=False&HideWeekOverWeek=False&LicensedProductIndicator=False&SubSalesChannelCode=BRK&ReportingRegionName%3Aisnull=True&ProductActiveKey%3Aisnull=True&BusinessLineCode=APP&ReportingCountryName=United%20States&ProductGroupCode=2000&ProductGroupCode=3007&ProductGroupCode=3003&ProductGroupCode=2002&ProductGroupCode=1005&ProductGroupCode=6001&ProductGroupCode=6005&ProductGroupCode=1003&ProductGroupCode=7001&ProductGroupCode=6003&ProductGroupCode=1004&ProductGroupCode=3001&ProductGroupCode=3002&ProductGroupCode=3006&ProductGroupCode=3005&ProductGroupCode=6006&ProductGroupCode=2003&ProductGroupCode=6004&ProductGroupCode=6002&ProductGroupCode=1001&ProductGroupCode=3004&ProductGroupCode=2001&ProductGroupCode=2005&ProductGroupCode=Unk&ProductGroupCode=1002&ProductGroupCode=&IsSample=N&BusinessAreaCode=BRO&ReportingDivisio nName=North%20America&Currency=USD&CustomerTypeCode=0&RankBy=ReturnQty&report_TopN=20&HideYearOverYear=True&RankType=ItemName&rs%3AParameterLanguage=en-US

1
You have no control over the built-in "Include Link" option. You could build the URL in your data-driven subscription query and then use that in the Comment field. This will go in the body of the email.StevenWhite
@Mike I'm sorry my question wasn't more obvious. Why is it putting a %20 inside one of the parameter names?Bostaevski
@StevenWhite - I tried that also and we had the same problem.Bostaevski
@Bostaevski the space appears at column 768 in the URL, can you try some different queries and see if the space appears in the same place?Mike
@Mike - I edited the question above with some screenshots. In that example, it occurs around 917.Bostaevski

1 Answers

0
votes

%20 isn't random - it is a a space.

Your link has been encoded to ensure it will work in a universal way.

URL encoding explained.

If you don't want to see %20 then remove the spaces from your report name.

You have a %2F at the beginning of your parameter list - this looks odd.

If the parameter is still invalid check you have the latest version deployed to your report server - ServerName (I assume) has been replace by you?