Create a New Template
IMPORTANT: You must be a member of the Publish To Web security group or have Administrator rights to the Administrator security group before you can use the Publish-to-Web Wizard. For more information on configuring security, see Configuring Security
You can not test your Web report on the same computer where the Plant Applications Report Engine services or Plant Applications Scheduler service are running. You must test on a client computer that is connected to the Proficy Server and Web Server.
-
Create and save your workbook.
-
Click Plant Applications>Publish-To-Web Wizard>Create a New Template on the Excel menu bar. If you have not saved your workbook the Publish-To-Web Wizard will prompt you to save it.
-
In the Publish-To-Web Wizard -- New dialog box, enter a name and description for your new template and click the OK button. A Publish-to-Web Wizard dialog box opens.
Your template name must be unique. You cannot use the name of a template. If you select a duplicate template name the Wizard will alert you with a warning message.
-
Select the Select Dialogs tab and do the following.
-
Select the dialog boxes you want to use for your Web report and click the > button. The Web Report Engine will use the dialog boxes that you select to "walk" the user though picking input parameters before scheduling a report.
-
optional. Select a dialog box name and click the Up or Down button to move the selected dialog box and change its position in the dialog box order.
-
Select the Select Parameters tab and do the following:
-
Highlight each parameter that requires a cell reference and click the Get Reference button. The Parameter Reference dialog box opens. The parameters with a check mark have default values assigned to them. Scroll to the right to view the default values. Parameters that do not have a check mark will require you to select a cell reference on your open workbook. If none of the selected parameters have a reference, the Wizard displays a warning message once when you display the Select parameter tab and once when you select another tab.
-
Enter the cell(s) on your worksheet in the Parameter Reference dialog box's field and click the OK button.
-
Select the Select Web Page Format tab.
-
Do one of the following.
-
To output the Web report as a PDF, select the PDF Format option.
-
To output the Web report as HTML, select the HTML Format option.
-
Do one of the following to continue.
-
To save the template without creating custom code to run the report, go to step 7.
-
To create custom code to run the report and save the template, go to step 8.
-
Save the template without creating custom code to run the report.
-
Select the Actions tab.
-
Save and/or replace the template as follows.
-
Click the Save button to save the template.
When the new template is saved, the Replace XLT button is enabled.
-
optional. Click the Replace XLT button to replace the saved template.
-
Go to step 9.
-
Create custom code to run the report and save the template.
-
Select the Actions tab.
-
Check Generate "CreateReport" macro for current template.
The Wizard displays a Create Report Macro message box with the following message.
You have elected to write your own custom code to run this template. The Wizard will insert the "CreateReport" macro into a hidden sheet "CreateReportHiddenWorksheet." You are expected to complete this macro later. Typically, the code you write involved the extraction of the required inputs from "Parameter Object" and the generation of report when the template is run.
You should remove all cell references assigned to the required parameters. However, if you choose to retain cell references, make sure they do not interfere with your custom code. The WebEngine will first look for these references to deliver the required inputs.
-
Click Yes to create the new template.
The following message displays.
The Wizard generated "CreateReport" macro successfully for this workbook "Workbook name."
Your next step is to run "Create New Template" to publish a new template from this workbook. If you decided to delay your next step, be sure to save the file for future use.
-
Click OK.
Continue based on whether or not the workbook contains a macro.
-
If the workbook does not already contain the CreateReport macro:
The message box and Publish-To-Web Wizard -- New dialog box close.
The Wizard only generates the macro for the workbook, but does not save the workbook and its configurations to the database.
i. Re-open the Publish-To-Web Wizard -- New dialog box.
ii. Repeat Steps 3 - 8b.
iii. Select the Action tab and click Save Config to save the new workbook.
iv. Go to step 9.
-
If the workbook already contains the macro:
The Publish-To-Web Wizard -- New dialog box does not close after clicking OK.
i. Click the Save Config button to save the workbook and its configurations (dialog items, parameters, and cell references).
ii. Go to step 9.
-
Click the Local button (enabled when the template is saved) to test the newly created template on your computer.
-
If the local test was successful, and you are ready to test the template remotely, click the Yes button; otherwise, if you need to do additional work on the template, or if you want to perform another local test, click the No button.
-
If you clicked the Yes button in step 10, the Test Remote button will be available. Click this button to test your template on the selected server.
-
If the remote test was successful and you are ready to use the report on the Web server, click the Yes button; otherwise, if you want to perform another remote test, click the No button.
-
Click the OK button.