Call Previewer Code Template |
This is used to generate code to call the Icetips Previewer from any place in any kind of procedure. This works much the same way as the Call Previewer extension template, but it does not have the condition but has an additional prompt for the report label.
Previewer Procedure
Here you can select the previewer procedure that you want to use. You can have multiple Preveier procedures in the same application with different look or different functionality.
Report Label
This is the label of the report structure. If the procedure has a report structure, i.e. created inside the [Report] button, then the label of that report structure will be used and it will override the contents of the entry. This makes it easy to add the Icetips Previewer to a report that is declared inside a window procedure for example. On Source only procedures, the window and report buttons on the procedure properties window are disabled by the Clarion IDE. The label is set to REPORT by default.
Zoom type
This dropdown has 4 options: "Page Height", "Page Width", "Full (100%)" and "Value". This is used to specify the initial zoom for the report when the previewer displays it. If Value is selected, then the "Zoom percent" is enabled and you can type in what zoom percent value you want to use as initial zoom. This is set to "Page Height" by default.
Zoom percent
This is enabled when a zoom type of "Value" is selected above. Here you can set what zoom percent you want as default. This is set to 100 by default. Note that if this is not set, i.e. the entry is empty, then the zoom is set to 0. Special values for the zoom are:
-2 = Page Height
-1 = Page Width
0 = 100%
Any other value, zoom percent
Start Maximized
This indicates if the Previewer window should start maximized. Note that if the Previewer procedure saves/restores window position then this setting is overridden by whatever the saved state of the window was. I.e. if this is set to true and the Previewer was last closed non-maximized, then the window will start non maximized. This is set to True by default.
Start Pagelist
This indicates if the pagelist on the left of the Previewer window should be opened when the Previewer window is opened. This is set to True by default.
Previewer Caption
This is the caption of the previewer window when it opens. This is set to "Report Preview" by default.
Do NOT call previewer
If this option is used, all code to call the previewer is generated but is commented out. This can be useful if you want to construct the code by hand in the embed editor and use the generated code as a guide. This is set to false by default.
Allow additional parameters
This option enables the "Additional parameters" field, see below. Then you can add parameters to the parameterlist that is being passed to the Previewer. The list can start with a comma, but it is not required - the template will add it if it's missing. For example if you wanted to add a parameter you could do it like this:
,Loc:MyVariable
Note that some additional extensions and options may add parameters to the built-in list so you have to be careful to make sure that the parameters being passed from the report match the prototype/parameterlist of the previewer procedure.
Additional parameters
See above.
Generate SetTarget(Report) before calling Previewer
This is required if you want to have a reference to the report when you enter the Previewer procedure. This makes it possible for the previewer to retrieve information from the reports, such as landscape, job name, etc. which are vital if you are going to use the Printer Selection extension in the Previewer. If this is not checked, your reports may not print correctly when printed from the Previewer. Make sure that you understand the implication of unchecking this option if you are using the Printer Selection template! This is set to True by default.
Generate No code
This allows you to stop generation of all the code that this template generates into the report procedure. See also Apply to application for more information about how to disable code generation. This is set to False by default.
In an ABC application the above settings would generate something like:
SetTarget(REPORT)
If ITPreviewer(SELF.PreviewQueue, -2, 1, 'Report Preview', 1)
REPORT{PROP:FlushPreview} = True
End
SetTarget()
In a Legacy application it would look like:
SetTarget(REPORT)
If ITPreviewer(PrintPreviewQueue, -2, 1, 'Report Preview', 1)
REPORT{PROP:FlushPreview} = True
End
SetTarget()
If the procedure has a REPORT structure, then the label of the actual report structure will be used.