BPC-Components

Home > Products > BPC PowerForms - Silverlight > Knowledge Base > Printing > Printing with custom XSLT file

Printing with custom XSLT file

Users can create their own custom print layout using XSLT file.

The xml file that we use to extract the data from the form is the one below:

 

The control c_Feedback is a DataEntryGrid control  and the extra elements 'Values' and 'Record' are used to describe its fields and values. 

An xslt file should be created that handles the xml data above and will give us the desired result as a printing template. One simple structure of the xslt can be shown below:

 

As you can see the controls are listed under ListItem/Control element. This simple xslt file will display a header with the Title field and 2 more fields ID and Customer.

When the xslt file is ready, it should be uploaded in a Sharepoint Document Library.

Then we navigate in the specific list and we associate this file with our form. We open the designer of the PowerForms and in Selection drop-down we choose Options.

At the bottom of this page we fill the Print Template textbox with the full path of the xslt file.

 

The final printing page with this simple xslt will be as below: