Create the Template
Now we will create a simple template using XML / BI Publisher design helper for MS Word.
Load XML Data
Before we start using the design helper, we need to have our sample xml data loaded into the tool. To do this, open Word and load the xml data file from the previous step as shown below.
Inport the XML/XSD File
Upon successfully loading the data, a message, like the one below, is shown.
Table Wizard
Now we will use the table wizard to insert a simple table into the template. The data that gets pulled from the query would finally be shown in this table.
Select Table and click Next.
Since we have only one repeating element (query/row), no selection needs to be done here. Click Next and continue.
Here we select the fields we want to display in our table. Use the button (>) to select the required ones and then click Finish.
In fact, if you keep pressing the Next button, you would be shown screens on which you can perform grouping of data and then sorting the data. We are not covering them here.
Now we will add some text to the template. How about a headline that says US001 Vouchers? You can insert logos or do any formatting supported by Word.
This is how our final template looks.
Preview the Template
Before we can preview the template, it should be saved as an RTF file. If you don’t do this, the system would prompt you to save once you click the preview menu.
So let’s save the file as Ha_us001
Now go to the Preview menu and click on PDF.
.rtf
Now go to the Preview menu and click on PDF.
A pop-up window with the PDF file containing sample data opens.
If you are not happy with the preview, keep making changes.
Once done, save the template file and we are ready for the next step.
Once done, save the template file and we are ready for the next step.
No comments:
Post a Comment