Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have a SharePoint site that we created based on a blank site template. We add lists, pages, webparts (including some connected web parts) and then save this site as a template (.wsp file).

We create a new site collection, and apply this template to the root web site in the collection. This is working fine, except the web part connections are breaking and need to be manually re-established.

The web parts are a "producer" (our custom web part that reads a parameter from a SharePoint list and sends the output) and the consumer (SSRS Report Viewer web part) that takes the value from the producer part and uses it as a report parameter.

What we have noticed is that the custom (producer) web part ID value stays the same for each site we apply the template to, but the SSRS Web Part IDs change for every site.

The template page has the producerID and consumerIDs statically set in the template, so this is what is causing the connection to break and need to be re-established.

Any ideas on why just the SSRS web part is getting a new ID each time and not the other web parts?

This is what the code in the page looks like. The ID in the SQL Server Reporting Services Report Viewer web part is changing when the page is deployed as part of a site template:

<SPWebPartConnections>
<WebPartPages:SPWebPartConnection ConsumerConnectionPointID="ReportParameters" ConsumerID="g_172ac89a_1639_4c78_a0ce_594d5a6260a0" ID="c1588345187" ProviderConnectionPointID="ITransformableFilterValues" ProviderID="g_bc912b65_41ff_4a6e_b447_41ec7ca95eb6">
<WebPartPages:TransformableFilterValuesToFilterValuesTransformer MappedConsumerParameterName="projectID">
</WebPartPages:TransformableFilterValuesToFilterValuesTransformer>
</WebPartPages:SPWebPartConnection>
</SPWebPartConnections>

...

<WpNs1:ReportViewerWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{172AC89A-1639-4C78-A0CE-594D5A6260A0}" >
...
<ID>g_172ac89a_1639_4c78_a0ce_594d5a6260a0</ID>
<Title>SQL Server Reporting Services Report Viewer</Title>
...
share|improve this question
add comment

1 Answer 1

Technet possible solutions:

UpdateMode to Conditional

Preferred if it works

Conclusion: set the updatepanels UpdateMode to Conditional (in master page and current page)

Code behind to set the new WebPartId in the connection

Conclusion: Import the wsp into visual studio and use code behind during the onsiteprovisioning event

  • programmatically get the new web part id

  • set that property in the connection

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.