I am trying to connect a custom webpart (provider) to a ReportViewerWebPart (consumer) programmatically, using a Powershell script.
I get the error message below when I execute the following line:
$wpConnection = $webpartmanager.SPConnectWebParts($wpProvider, $providerConnectionPoint, $wpConsumer, $consumerConnectionPoint, $transformer)
Error message:
Microsoft.SharePoint.WebPartPages.WebPartPageUserException: The transformer type "Microsoft.SharePoint.WebPartPages.TransformableFilterValuesToFilterValuesTransformer" is not allowed to be used on this page.
Does anyone know what may be causing the error and how to fix it? Similar code works when I run it as a Visual Studio application.