none
Connecting PerformancePoint Web parts in Page Layout or code behind RRS feed

  • Question

  • Hello,

    I added on one of my pages two PerformancePoint web parts - FilterWebPart and ReportViewWebPart. They show up on the page, there is no problem there, but now I want to connect these two PPS web parts in page layout or in code - NOT in Dashboard Designer. Does anyone know how I can do this? 

    I tried with this:

    <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

    <WebPartPages:SPProxyWebPartManager runat="server" id="spproxywebpartmanager">

        <SPWebPartConnections>

        <WebPartPages:SPWebPartConnection ConsumerConnectionPointID="BIDataProvider" ConsumerID="pps_3adccf2812ab46f58d78f8e3883a7bca" ID="conn_f23aa3f34a8f4f599afd4a5a0d6cb1dc" ProviderConnectionPointID="TransformableBIDataProvider" ProviderID="pps_0acccfbf423b44c1b2c9eea8ecfd1a15">

        <pps:TransformableBIDataProviderTransformer ID="transformerId"</pps:TransformableBIDataProviderTransformer>

    </WebPartPages:SPWebPartConnection>

    </SPWebPartConnections>   

    </WebPartPages:SPProxyWebPartManager>

    <WebPartPages:WebPartZone id="g_296CEE73E56543688F869262645DD1DC" runat="server" title="Zone 1" Width="100%"><ZoneTemplate>

    <pps:FilterWebPart runat="server" AllowEdit="False" Title="Autogenerated Mdx Filter Is Joint Material Cece" IsAllowResetView="Hide" IsOpenInNewWindow="False" AllowMinimize="False" DashboardLink="http://e-cabinet/_vti_bin/webpartpages.asmx" ID="pps_0acccfbf423b44c1b2c9eea8ecfd1a15" AllowClose="False" VisibilityParameterName="FilterValues" PercentageOfPageHeight="0" IsTitleLink="False" TransformableDataProviderConnectionPointName="PerformancePoint Values" PercentageOfPageWidth="0" ChromeType="None" LocationUrl="/Lists/PerformancePoint Content/56_.000" IsAllowOpenNewWindow="Hide" IsAllowExportToPowerPoint="Hide" SkipUIVersionRenderCheck="False" TransformableDataProviderTitle="Autogenerated Mdx Filter Is Joint Material Cece" IsAllowExportToExcel="Hide" __MarkupType="vsattributemarkup" __WebPartId="{7E351B03-F53F-4EB9-B63A-AFB9145E3B78}" WebPart="true" __designer:IsClosed="false" partorder="2"></pps:FilterWebPart>

    <pps:ReportViewWebPart runat="server" AllowEdit="False" Title="Autogenerated Web Page Report 1" IsAllowResetView="Enabled" IsOpenInNewWindow="False" AllowMinimize="False" DashboardLink="http://e-cabinet/_vti_bin/webpartpages.asmx" ID="pps_3adccf2812ab46f58d78f8e3883a7bca" AllowClose="False" VisibilityParameterName="" PercentageOfPageHeight="93" IsTitleLink="True" PercentageOfPageWidth="100" ChromeType="TitleOnly" LocationUrl="/Lists/PerformancePoint Content/49_.000" IsAllowOpenNewWindow="Enabled" IsAllowExportToPowerPoint="Enabled" SkipUIVersionRenderCheck="False" TransformableDataProviderTitle="" IsAllowExportToExcel="Enabled" __MarkupType="vsattributemarkup" __WebPartId="{1936176A-C74A-4170-B4A8-DC4DAC16032B}" WebPart="true" __designer:IsClosed="false" partorder="2"></pps:ReportViewWebPart>

    </ZoneTemplate></WebPartPages:WebPartZone>

    </asp:Content>

     

    This is not connecting them. Also if I add ConfigurationState property for the Transformer, and I set it ConfigurationState="Microsoft.PerformancePoint.Scorecards.TransformerConfigurationRecord" like it is when I open a connected dashboard in SharePoint Designer, for already created sites from that site definition it gives me this error Cannot create an object of type 'Microsoft.PerformancePoint.Scorecards.TransformerConfigurationRecord' from its string representation 'Microsoft.PerformancePoint.Scorecards.TransformerConfigurationRecord' for the 'ConfigurationState' property.

    and if I try to make another site from tat site definition it doesn't create the site properly - after it creates it when I open it, it gives me to choose a template. 

    Please help me if anyone knows how to connect PPS web parts in page layout or code.

    Tnx in advance.

    Friday, March 25, 2011 1:41 PM

Answers

  • Hi!

    Yes, actually I found a way to connect PerformancePoint web parts in page layout and code behind. For example if I need to connect a FilterWebPart and a ReportViewWebPart here is how should be the page layout (something like this):

     

     

    <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

    <WebPartPages:SPProxyWebPartManager runat="server" id="spproxywebpartmanager">

        <SPWebPartConnections>

        <WebPartPages:SPWebPartConnection ConsumerConnectionPointID="BIDataProvider" ConsumerID="reportId" ID="connJointMaterialId" ProviderConnectionPointID="TransformableBIDataProvider" ProviderID="filterId">
    <pps:TransformableBIDataProviderTransformer ID="transformerId"></pps:TransformableBIDataProviderTransformer>
        </WebPartPages:SPWebPartConnection>

     

        </SPWebPartConnections>

    </WebPartPages:SPProxyWebPartManager>

    <WebPartPages:WebPartZone id="zone1" runat="server" title="Zone 1" Width="100%">
    <ZoneTemplate>

    <pps:FilterWebPart runat="server" AllowEdit="False" Title="Products Filter" IsAllowResetView="Hide" IsOpenInNewWindow="False" AllowMinimize="False" DashboardLink="http://e-cabinet/_vti_bin/webpartpages.asmx" ID="filterId" AllowClose="False" VisibilityParameterName="FilterValues" PercentageOfPageHeight="0" IsTitleLink="False" TransformableDataProviderConnectionPointName="PerformancePoint Values" PercentageOfPageWidth="0" ChromeType="None"LocationUrl="/Lists/PerformancePoint Content/56_.000" IsAllowOpenNewWindow="Hide" IsAllowExportToPowerPoint="Hide" SkipUIVersionRenderCheck="False" TransformableDataProviderTitle="Autogenerated Mdx Filter" IsAllowExportToExcel="Hide" __MarkupType="vsattributemarkup" __WebPartId="{7E351B03-F53F-4EB9-B63A-AFB9145E3B78}" WebPart="true" __designer:IsClosed="false" partorder="2">
    </pps:FilterWebPart>
    </ZoneTemplate>
    </WebPartPages:WebPartZone>  

     <WebPartPages:WebPartZone id="zone2" runat="server" title="Zone 2" Width="100%">
    <ZoneTemplate> 
    <pps:ReportViewWebPart runat="server" AllowEdit="False" Title="Autogenerated Web Page Report 1" IsAllowResetView="Enabled" IsOpenInNewWindow="False" AllowMinimize="False" DashboardLink="http://e-cabinet/_vti_bin/webpartpages.asmx" ID="reportId"AllowClose="False" VisibilityParameterName="" PercentageOfPageHeight="93" IsTitleLink="True" PercentageOfPageWidth="100" ChromeType="TitleOnly" LocationUrl="/Lists/PerformancePoint Content/49_.000" IsAllowOpenNewWindow="Enabled" IsAllowExportToPowerPoint="Enabled" SkipUIVersionRenderCheck="False" TransformableDataProviderTitle="" IsAllowExportToExcel="Enabled" __MarkupType="vsattributemarkup" __WebPartId="{1936176A-C74A-4170-B4A8-DC4DAC16032B}" WebPart="true" __designer:IsClosed="false" partorder="2">
    </pps:ReportViewWebPart>
    </ZoneTemplate>
    </WebPartPages:WebPartZone>

    </asp:Content>

     

     

    The important attributes here are the ones in bold: id, title and location url for the web parts and the consumerId, providerId and the id of the transformer for the web part connection. These attributes for the filter and the report web part can be set also programatically but here I put them directly in the page layout. In the connection the ConsumerId is the id of the report and the ProviderId is the id of the filter. The ConsumerConnectionPointID and the ProviderConnectionPointID should be the ones that are shown here because those are the appropriate ones for PerformancePoint web parts. Every connection has a transformer like it is shown here and in the page layout I only set the id of the transformer and in code behind I configure the object that is given to the ConfigurationState attribute of the transformer and that is what actually makes the connection between the web parts. Here is an example of that object configured in code behind:

     

    TransformProviderConsumerRecord transformProvConsRecord = new Microsoft.PerformancePoint.Scorecards.TransformProviderConsumerRecord();
                    <strong>transformProvConsRecord.ConsumerParameterName = "[DimProducts].[Id]";</strong>
                    transformProvConsRecord.ProviderParameterName = "FilterValues";
                    transformProvConsRecord.DisplayColumnName = "DisplayValue";
                    transformProvConsRecord.EncodeAsSet = false;
                    Guid mappingId = new Guid();
                    transformProvConsRecord.MappingId = mappingId.ToString();
                    transformProvConsRecord.ProviderFormula = null;
                    <strong>transformProvConsRecord.ProviderParameterDisplayName = "Products Filter";</strong>
                    transformProvConsRecord.TypeFullName = "System.String";
                    transformProvConsRecord.ValuesColumnName = "MemberUniqueName";
                    List<TransformProviderConsumerRecord> list = new List<TransformProviderConsumerRecord>();
                    list.Add(transformProvConsRecord);
                    ProviderConsumerTransformations provConsTransf = new ProviderConsumerTransformations(list);
    
                    TransformConditionalVisibilityRecord transfCondVisibilityRecord = new TransformConditionalVisibilityRecord();
                    transfCondVisibilityRecord.IsDefined = false;
                    transfCondVisibilityRecord.IsDefaultVisibility = false;
                    transfCondVisibilityRecord.ProviderParameterDisplayName = null;
                    transfCondVisibilityRecord.ProviderParameterName = null;
    
                    TransformerConfigurationRecord tcr = new TransformerConfigurationRecord(provConsTransf, transfCondVisibilityRecord);
    
    
                    <strong>transformerId.ConfigurationState = tcr;</strong>
    


    The lines in bold are the ones that should be changed according to your needs. The first property consumerParameterName 

    <strong>transformProvConsRecord.ConsumerParameterName</strong>
    

    should receive the dimension on which the filter is applied - in my case here the filter is for products so the dimension is [DimProducts] and I use the id attribute from that dimension so the consumerParameterName is [DimProducts].[Id].

    The second property that needs to be changed is the ProviderParameterDisplayName and that property should be the Title of the filter (the provider).

    And at the end the configured TransformerConfigurationRecord object (tcr in my case) should be assigned to the ConfigurationState attribute of the transformer for the object - in my case the transformer is transformerId.

    Hope this helps! Regards :)

    Friday, December 30, 2011 9:38 AM

All replies

  • Hi CeceMkd, did you ever find a solution to this? I'm having the same issue.

    Thursday, December 22, 2011 5:27 PM
  • Hi!

    Yes, actually I found a way to connect PerformancePoint web parts in page layout and code behind. For example if I need to connect a FilterWebPart and a ReportViewWebPart here is how should be the page layout (something like this):

     

     

    <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

    <WebPartPages:SPProxyWebPartManager runat="server" id="spproxywebpartmanager">

        <SPWebPartConnections>

        <WebPartPages:SPWebPartConnection ConsumerConnectionPointID="BIDataProvider" ConsumerID="reportId" ID="connJointMaterialId" ProviderConnectionPointID="TransformableBIDataProvider" ProviderID="filterId">
    <pps:TransformableBIDataProviderTransformer ID="transformerId"></pps:TransformableBIDataProviderTransformer>
        </WebPartPages:SPWebPartConnection>

     

        </SPWebPartConnections>

    </WebPartPages:SPProxyWebPartManager>

    <WebPartPages:WebPartZone id="zone1" runat="server" title="Zone 1" Width="100%">
    <ZoneTemplate>

    <pps:FilterWebPart runat="server" AllowEdit="False" Title="Products Filter" IsAllowResetView="Hide" IsOpenInNewWindow="False" AllowMinimize="False" DashboardLink="http://e-cabinet/_vti_bin/webpartpages.asmx" ID="filterId" AllowClose="False" VisibilityParameterName="FilterValues" PercentageOfPageHeight="0" IsTitleLink="False" TransformableDataProviderConnectionPointName="PerformancePoint Values" PercentageOfPageWidth="0" ChromeType="None"LocationUrl="/Lists/PerformancePoint Content/56_.000" IsAllowOpenNewWindow="Hide" IsAllowExportToPowerPoint="Hide" SkipUIVersionRenderCheck="False" TransformableDataProviderTitle="Autogenerated Mdx Filter" IsAllowExportToExcel="Hide" __MarkupType="vsattributemarkup" __WebPartId="{7E351B03-F53F-4EB9-B63A-AFB9145E3B78}" WebPart="true" __designer:IsClosed="false" partorder="2">
    </pps:FilterWebPart>
    </ZoneTemplate>
    </WebPartPages:WebPartZone>  

     <WebPartPages:WebPartZone id="zone2" runat="server" title="Zone 2" Width="100%">
    <ZoneTemplate> 
    <pps:ReportViewWebPart runat="server" AllowEdit="False" Title="Autogenerated Web Page Report 1" IsAllowResetView="Enabled" IsOpenInNewWindow="False" AllowMinimize="False" DashboardLink="http://e-cabinet/_vti_bin/webpartpages.asmx" ID="reportId"AllowClose="False" VisibilityParameterName="" PercentageOfPageHeight="93" IsTitleLink="True" PercentageOfPageWidth="100" ChromeType="TitleOnly" LocationUrl="/Lists/PerformancePoint Content/49_.000" IsAllowOpenNewWindow="Enabled" IsAllowExportToPowerPoint="Enabled" SkipUIVersionRenderCheck="False" TransformableDataProviderTitle="" IsAllowExportToExcel="Enabled" __MarkupType="vsattributemarkup" __WebPartId="{1936176A-C74A-4170-B4A8-DC4DAC16032B}" WebPart="true" __designer:IsClosed="false" partorder="2">
    </pps:ReportViewWebPart>
    </ZoneTemplate>
    </WebPartPages:WebPartZone>

    </asp:Content>

     

     

    The important attributes here are the ones in bold: id, title and location url for the web parts and the consumerId, providerId and the id of the transformer for the web part connection. These attributes for the filter and the report web part can be set also programatically but here I put them directly in the page layout. In the connection the ConsumerId is the id of the report and the ProviderId is the id of the filter. The ConsumerConnectionPointID and the ProviderConnectionPointID should be the ones that are shown here because those are the appropriate ones for PerformancePoint web parts. Every connection has a transformer like it is shown here and in the page layout I only set the id of the transformer and in code behind I configure the object that is given to the ConfigurationState attribute of the transformer and that is what actually makes the connection between the web parts. Here is an example of that object configured in code behind:

     

    TransformProviderConsumerRecord transformProvConsRecord = new Microsoft.PerformancePoint.Scorecards.TransformProviderConsumerRecord();
                    <strong>transformProvConsRecord.ConsumerParameterName = "[DimProducts].[Id]";</strong>
                    transformProvConsRecord.ProviderParameterName = "FilterValues";
                    transformProvConsRecord.DisplayColumnName = "DisplayValue";
                    transformProvConsRecord.EncodeAsSet = false;
                    Guid mappingId = new Guid();
                    transformProvConsRecord.MappingId = mappingId.ToString();
                    transformProvConsRecord.ProviderFormula = null;
                    <strong>transformProvConsRecord.ProviderParameterDisplayName = "Products Filter";</strong>
                    transformProvConsRecord.TypeFullName = "System.String";
                    transformProvConsRecord.ValuesColumnName = "MemberUniqueName";
                    List<TransformProviderConsumerRecord> list = new List<TransformProviderConsumerRecord>();
                    list.Add(transformProvConsRecord);
                    ProviderConsumerTransformations provConsTransf = new ProviderConsumerTransformations(list);
    
                    TransformConditionalVisibilityRecord transfCondVisibilityRecord = new TransformConditionalVisibilityRecord();
                    transfCondVisibilityRecord.IsDefined = false;
                    transfCondVisibilityRecord.IsDefaultVisibility = false;
                    transfCondVisibilityRecord.ProviderParameterDisplayName = null;
                    transfCondVisibilityRecord.ProviderParameterName = null;
    
                    TransformerConfigurationRecord tcr = new TransformerConfigurationRecord(provConsTransf, transfCondVisibilityRecord);
    
    
                    <strong>transformerId.ConfigurationState = tcr;</strong>
    


    The lines in bold are the ones that should be changed according to your needs. The first property consumerParameterName 

    <strong>transformProvConsRecord.ConsumerParameterName</strong>
    

    should receive the dimension on which the filter is applied - in my case here the filter is for products so the dimension is [DimProducts] and I use the id attribute from that dimension so the consumerParameterName is [DimProducts].[Id].

    The second property that needs to be changed is the ProviderParameterDisplayName and that property should be the Title of the filter (the provider).

    And at the end the configured TransformerConfigurationRecord object (tcr in my case) should be assigned to the ConfigurationState attribute of the transformer for the object - in my case the transformer is transformerId.

    Hope this helps! Regards :)

    Friday, December 30, 2011 9:38 AM
  • Hi There,

    I have got the 2 webparts connected but now when i do some changes in the designer to add the webparts in a table. i find the connection between the webpart is lost? Any one can help here?

    Thanks.

    Wednesday, March 7, 2012 9:37 AM
  • Hi CognitoCL

    Did you find a solution to this? I'm experiencing the same issue. 

    Thanks


    Friday, May 4, 2012 6:43 AM