Faster App Development through Web Part Cloning

Working with web parts can be frustrating. In spite of the ease of adding web parts to a page to build an application there are still a number of key areas which need to be configured each time you add a web part to a page:

  • Configure the Web Part with its configuration/”Modify Web Part” properties:
    • Set up the authentication page URL, timeouts, etc.
  • Setting up the width and height of any web part is a combination of playing with the: Component Style Properties and Web Part Width and Height Adjustments.
    • In a nutshell, the Component Style Properties for height and width need to be less than the Web Part properties for height and width.

While setting up an optimal report viewer, portal page, etc. may take a few minutes, to do this for each Cognos based QueryVision Web Part in an application can be tedious. A quick and useful solution is to use SharePoint’s feature to export and import web parts – essentially a copy and paste of a fully configured web part. All QueryVision’s Web Parts support export/import, which is documented here:

How to Export and Import Web Parts in SharePoint

This technique can be used to clone a web part (e.g. a web part presenting a dashboard) to:

  • Act as a template – e.g. exporting a report viewer with width, height and authentication settings – which can speed deploying number of reports in a SharePoint Application by cloning all but the specific report to present.
  • Be Cloned –  a web part for use in multiple pages – for example a user’s “My Inbox”

Note: Don’t forget that you will have to connect web parts once they are imported onto a page (e.g. Navigation Tree to a Report Viewer).

In a future blog, we’ll cover cloning a web part page which includes multiple web parts.