Introduction
     Please Note: Premiere
        requires StringTheory
      
      From time to time a discussion will arise in the newsgroups about the
      "look" of a program. What can Clarion programs look like if you move
      beyond the plain default settings. In response I'll usually post a link to
      one of our commercial apps (
https://www.veculim.com/Screenshots.htm) to act as a
      visual aid to some of the topics I discuss in reply. Lots of interesting
      discussion will then take place, but sooner or later someone asks;
      
      "What Print Preview are you using?"
      
      (You can see the print preview screen-shot here 
 https://www.veculim.com/Screenshots.htm#preview).
      The answer is that it's a modified version of the previewer that's built
      into our RightReports product. Which of course is not terribly helpful if
      you are not using Right Reports in your own program. (And RightReports is
      a bit expensive to purchase just for the previewer.)
      
      Then I needed a print previewer for a program that doesn't use
      RightReports. So I took the time to extract the previewer into a separate
      accessory, and along the way added some features to it, and tidied it up a
      bit. One thing lead to another, more features were added, and so Premiere
      was born.
      
      
Premiere is a PrintPreview procedure that replaces the
        default preview procedure in your application.
       
      It exists as a procedure in your app tree, so the look of the procedure
      can be completely consistent with your application. Plus it allows your
      user more control over the output - they can select a subset of pages and
      then save that to a PDF,
      Excel or Word send
      to someone else via email,
      upload to a cloud drive,
      print multiple copies and so on.
      
       Saving to a PDF
      requires a PDF engine. The SoftVelocity engine, Tracker's PDF-Tools
      version 4.1, and Klarisoft's wPDF are all supported.
      
       Saving to an Excel
      or Word document requires an Office Engine. Currently only CapeSoft's 
Office
        Inside is supported. If you are using an alternate engine that has
      the ability to create office documents from a Report then ask that
      supplier to contact us with a view to adding support for it in Premiere.
      
       Sending via Email
      requires 
NetTalk
        8 (any level) or later, or an 
alternative
        SendEmail procedure.
      
       Uploading to a Cloud
      drive requires 
NetTalk
        10 (any level) or later and  
File Explorer, or an 
alternative
        UploadFileToCloud procedure.
    
 
    Webinar
     A ClarionLive webinar, #386, was made of the Premiere
      release. It is available 
here. 
 
    Requirements
     CapeSoft (and others) have been making accessories for
      a long time, and the accessory toolbox includes all sorts of useful
      functionality. A product like Premiere is a natural candidate to make use
      of these additions. It has however been carefully constructed so you can
      use as many, or as few, of these optional extras as you desire. 
      
      Specifically supported engines are listed below as optional requirements.
      However the system is constructed so that support for more engines can be
      easily added if there is demand for it. So if you don't see your favorite
      engine listed feel free to contact us for more information.
      
        -   StringTheory is an absolute requirement. It
          reduces hand-code by so much that like almost all our other products
          it is not a requirement. The rest of the items in this list are
          optional.
 
        - Saving to a PDF requires a PDF engine. The SoftVelocity engine,
          Tracker's PDF-Tools version 4.1, and Klarisoft's wPDF are all
          supported.
 
        - Saving to an Excel or Word document requires Office Inside.
 
        - Sending an email requires  NetTalk (8 or later).
 
        - Uploading to a Cloud Drive requires  NetTalk (10.19 or later) AND File Explorer AND  jFiles.
 
        - If you have  Hyperactive in the application users will be
          able to open files once they are created, just by clicking on the
          name.
 
      
     
    JumpStart
    
      Premiere
      
        
          - Add the StringTheory Global Extension to the application.
 
          - (Optional) Add the HyperActive Global Extension to the
            application. 
 
          - Add the Premiere Global Extension to the application.
 
          - On the General tab, Import the Premiere, PremiereGetData,
              PremiereCreateExcelFromQueue, PremiereCreateWordFromQueue
            and PremiereCreatePDFFromQueue procedures. 
 
          - Add the Global Extension Call_Premiere_Previewer - Call
              Premiere from all reports to the application.
            (This adds the Previewer call to all reports. If you want to do this
            manually then see Manual Previewer Calls below.) 
          - (Optional) On any report go to the extensions and set extra
            settings there for the Premiere previewer.
 
        
       
      PDF Engine (optional)
      
        
          - Add the global extension of your PDF Engine to the application. It
            should be one of
             
            
              - The SoftVelocity ReportToPDFGlobal extension
 
              - Tracker's PDFXToolsGlobal41 extension, or
 
              - Klarisoft's wPDF Global extension. Fill in
                the License details as normal here.
 
            
           
          - 
            
Some PDF Engine specific
                features can be found in the PremiereCreatePDFFromQueue
              procedure. You can use these settings to tune the creation of the
              PDF, depending on your engine.
           
        
        The PremiereCreatePDFFromQueue procedure will
          detect whichever of these extensions you have added, and generate code
          appropriate to that engine.
        If you do not have any PDF engine in the application then the 
            Save As PDF functionality will be disabled.
       
      Office Engine (optional)
      
        
          - Add the global extension of your Office Engine to the application.
            It should be one of
             
            
           
        
        The PremiereCreateExcelFromQueue and PremiereCreateWordFromQueue 
          procedures will detect whichever of these extensions you have added,
          and generate code appropriate to that engine.
        If you do not have any Office Engine in the application then the   Save As  Excel AND Save
            As Word functionality will be disabled.
       
      Add NetTalk Email (optional)
                (If you don't already have a NetTalk SendEmail procedure in your
        app)
      
        
          - Using the \Examples\NetTalk\Email\Demo
            app as a reference;
 
          - Copy (Copy and Paste) the EmailLog and 
              EmailSettings tables from the NetTalk demo dictionary to
            your dictionary.
 
          - Open your application. Import the SendEmail and
            UpdateEmailSettings procedures from the NetTalk
            demo app. (You may also want to import the BrowseEmailLog
            procedure)
 
        
       
      No Email
       If you are not using NetTalk (or any email
        procedure) in this application, go to the Premiere Procedure, Extension
        Templates, and on the Premiere Extension, Options tab, turn off the
        CheckBox 
Allow Send Email from Previewer.. 
        
        If you are using an alternate Email procedure (not NetTalk) then you can
        leave this option on, and create the SendEmail procedure appropriately.
        See 
below for instructions.
 
      Add NetTalk File Upload to Cloud (optional)
                (If you don't already have a NetTalk UploadFileToCloud procedure
        in your app)
       This feature allows the previewer to upload any
        report (in any of the export formats, PDF, Excel etc) to the user's
        cloud drive. Supported clouds are Dropbox, GoogleDrive, and Microsoft
        OneDrive. Since these services use OAuth authentication it is necessary
        to include 
FileExplorer in the application (as it is used by
        the OAuthLogin procedure). This feature also requires NetTalk 10 (any
        level), build 10.19 or later and 
 jFiles.
        
          - Using the \Examples\NetTalk\NetDrive\Demo
            app as a reference;
 
          - Add the File Explorer Global Extension
            to your application, if it is not already there.
 
          - Open your application. Import the UploadFileToCloud
              and OAuthLogin procedures from
            the NetTalk demo app.
 
        
       
      No Cloud
       If you are not using NetTalk (or any
        UploadFileToCloud procedure) in this application, go to the Premiere
        Procedure, Extension Templates, and on the Premiere Extension, Options
        tab, turn off the CheckBox 
Allow File Upload from Previewer..
        
        
        If you are using an alternate UploadFileToCloud procedure (not NetTalk)
        then you can leave this option on, and create the UploadFileToCloud
        procedure appropriately. See 
below for
        instructions.
 
      Hyperactive (optional)
      
        
          -  Add the CapeSoft HyperActive Global Extension
            to the application. (If Multi-DLL this only needs to be in the Data
            DLL.)
 
          - Go to the PremiereCreatePDFFromQueue procedure,
            to the Local Extensions, and add the HyperActive Local
              Extension
 
          - Go to the Properties of the Hyperactive Local Extension, to the
            Controls tab, and Insert a control there. Select ?Answer
            from the list of controls. You can leave the other settings at their
            default values.
 
        
       
      Multi-DLL
       The above instructions are for a single Exe
        application. If you have a multiple-application suite then there are a
        few additional instructions that need to be noted.
        
          - You will need to add the Premiere Global Extension to the data
            DLL, and any other DLL  (or EXE) that contains a Report.
 
          - In the Data DLL (the DLL which exports the dictionary) go to
            Premiere Global Extension, To the Multi-DLL tab, and tick on the
            option to Export Premiere Classes from this DLL.
            (You will do the same for the StringTheory global extension, and the
            Hyperactive Global Extension, if you have them.)
            
            In all the other apps with the Premiere Global Extension (including
            any EXE apps with the global extension) make sure the option This
              is part of a Multi-DLL program is ON and the Export
              Premiere Classes from this DLL option is OFF.  
          - In the Data DLL Make sure the Premiere Procedure has the EXPORT
            option ticked on.
 
          - You Do NOT need to import the Premiere Procedures into other DLL's
            or the Exe. Only the Data DLL needs these procedures.
 
        
       
      Notes
       
        Adding a Second Global Extension
         When adding the second Premiere global extension (which adds the Local
        Extension to all the reports) you need to first select the main 
Activate
          CapeSoft Premiere extension and then click the 
Insert
          button. If you have some other extension selected then the 
Call_Premiere_Previewer extension will not be
        available in the template list.
        
        
 Importing
          Premiere Procedures 
        The easiest way to import the procedures is to click the 
Import
          Procedures button on the Global Extension.
        This imports a TXA file, with 5 procedures into your application.  Some
        builds of Clarion can struggle with TXA files, so if you have any
        problems, import the procedures directly from one of the example
        applications. The procedures you want are 
Premiere,
        
PremiereCreateExcelFromQueue,
          PremiereCreateWordFromQueue, PremiereCreatePDFFromQueue and 
PremiereGetData.
        
        
Clarion 9/10 Important Note:
        When importing into some builds of Clarion 9 and Clarion 10, the
        Parameters setting is not set. If this is the case you get compile
        errors when compiling for the first time. Simply "visiting" the
        properties of the three procedures in question (see list in paragraph
        above) solves the problem.
        
        
 Possible
          Import Errors
        The example applications, and Premiere TXA's include a Hyperactive
        extension in the 
PremiereCreateExcelFromQueue,
        
PremiereCreateWordFromQueue and 
PremiereCreatePDFFromQueue
          procedures. If you do not have Hyperactive then this will
        trigger an error on import;
        
GEN: Unknown Template type
          HyperActive(HyperActive)
        This error can be ignored.
        
        If you get the error 
          Unknown Variable %HaDefaultBright 
        (and several like it) when importing the procedures you have
        Hyperactive, but the global Hyperactive Extension is not in this
        application. Add the global extension to get this feature.
        
        
 Possible
          Compile Errors
        If you do not import or create a 
SendEmail procedure,
        and you do not tell Premiere that Send Email is not available, then you
        will get an error when compiling
        
No Matching Prototype Available
        The error will be on a line of code reading;
        
Return SendEmail(pEmail)
        If you get this error then either follow the steps above to 
add
          Email support, or tick on the option to 
turn
          off email support..
        
        
Export
          Engine Overrides
        By default Premiere will detect your PDF and Office engines by
        inspecting the Global Extensions. If you wish to override this detection
        the see the 
Global Extension
          template, Options tab.
        
        
 Possible
          Compile Errors
        If you do not import or create a 
          UploadFileToCloud procedure, and
        you do not tell Premiere that Upload to Cloud is not available, then you
        will get an error when compiling
        
No Matching Prototype Available
        The error will be on a line of code reading;
        
Return UploadFileToCloud(pCloud)
        If you get this error then either follow the steps above to 
add
          Cloud support, or tick on the option to 
turn
          off cloud support..
        
      
 
     
    Upgrading from an earlier Premiere version
    
      Repopulating Premiere Window (3.20 or later)
       The Premiere window has a number of new control on
        it in build 3.20. For this reason it is
        recommended (although not required) for the control template on the
        window to be repopulated, or for the Premiere procedure to be
        re-imported from one of the examples. 
        
        If you are using the Clarion built-in resizing template, and you have
        not added other custom functionality to the window, then re-importing
        the procedure from an example app is probably the easiest approach.
        
        If you are using an alternate resizer, or other custom functionality on
        the window, then simply deleting the control template, and repopulating
        it on the window is probably the better approach. You may then need to
        add the new controls (Pages entry field, and upload buttons) to the
        resizer etc. The window will also likely need to be made slightly wider
        to accommodate the new fields.
      Adding Cloud Support (3.20 or later)
      
        
          - Add File Explorer Global Extension template (if it's not already
            there.)
 
          - Import OAuthLogin procedure from ABCNetTalkFE or LegacyNetTalkFE
              examples.
 
          - Import UploadFileToCloud procedure
            from ABCNetTalkFE or LegacyNetTalkFE
              examples.
            
            VERY IMPORTANT  : After
            importing Right-click on the UploadFileToCloud procedure and choose
            source. Find the line that starts with 
              pParms.pClientId and change the pClientId
              and pClientSecret parameters
            to your own values. To get more information on these values see the
            
              NetTalk documentation.
           
          - Re-import Premiere procedure from one of the examples.
 
        
       
      Turning Off Cloud Support (3.20
        or later)
       Cloud support is turned on by default. If you do not
        have File Explorer, or do not want cloud support in the previewer, then
        go to the Premiere procedure, to the Premiere Print Preview extension,
        to the Options tab. Turn off the option there Allow
          File Upload From Previewer. Failure to do this step will likely
        incur the error;
        
        No matching prototype available on
        Return UploadFileToCloud(pCloud)
         
      Extending PremiereGetData (3.40 or
        later)
       As from build 3.40 the PremiereGetData procedure has
        been updated to get 2 items of data from the user, instead of just one.
        This is primarily to support the entry of a file password when entering
        a filename. 
        
        Note that this update is REQUIRED whether you plan to use the password
        feature or not.
        
        To upgrade this procedure;
        
          - Open the app that contains the PremiereGetData Procedure
 
          - Go to the Premiere Global Extension, click on the Import
              PremiereGetData Procedure button
 
          - When prompted by the IDE select Replace All
 
        
       
     
    Clarion Changes (very optional)
     These suggested changes affect both ABC and Legacy
      programs.
      
      If you are using the SoftVelocity PDF engine, and saving as a PDF, you can
      optionally choose to display a progress window as the report is converted
      to PDF. 
      
      This window is declared in the Clarion file \clarion\libsrc\win\abwmfpar.clw
      in the WMFDocumentParser.GenerateReport
      method. By default this window is pretty ugly, and probably does not match
      the look of your program. You can edit the window there (use Ctrl-D
      to open the window designer) to make it look better.
      
      Example;
      
      ProgressWindow WINDOW('Export
        Progress...'),AT(,,331,53),CENTER,FONT('Segoe UI',10),TIMER(1),DOUBLE
                         IMAGE,AT(6,7),USE(?ImageGenerator)
                         STRING('Exporting
        to'),AT(61,6,247,10),USE(?Progress:UserString),LEFT
                        
        PROGRESS,AT(61,27,247,10),USE(Progress:Thermometer),RANGE(0,100),SMOOTH
                         STRING('Page 0 of
        '),AT(61,15,114,10),USE(?Progress:PctText),TRN,LEFT
                       END
      
      You may also want to copy
      \clarion\accessory\images\pvPDF.Ico to \clarion\images\EXP_PDF.ICO
      so that the PDF icon on the progress window looks better.
      
      Of course these changes will be overwritten by future Clarion installs, so
      will need to be repeated after updating Clarion. If the changes are not
      repeated then there is no functional penalty to your program, other than
      the progress window looking a bit ugly.
    
    Third Party Support
     The 
Call Premiere Print
        Preview template supports the Clarion Report Template for both ABC
      and Clarion (Legacy) applications. In addition to this it also supports
      the following other Reporting templates;
      
CPCS / Creative Reporting Tools
       There are a large number of Creative Reporting Tools
        (nee CPCS) features, but the Premiere template should support CRT
        reports. If it does not support a CPCS report that you have
        automatically then please notify 
support@capesoft.com
       
      RightReports
       RightReports has built-in support for a number of
        different previewers. 
        To use Premiere with RightReports make sure you are using build 1.97 or
        later. 
        On the Right Reports Global Extension, Options Tab, select Premiere from
        the drop-list of previewer's available. 
      Fomin Report Builder
       Premiere supports the FRB "RuntimeReport" procedure.
        If the user chooses the Printer as the output, and Preview is on, then
        the Premiere Previewer is displayed.
      Translation Tools
       Premiere supports 
 AnyText directly. If you are using another
        translation tool then Premiere provides a method for translating any
        text used by the class. See 
Translations
        for more information. 
 
      PDF Engines
       If a PDF engine is available, then a Save-As PDF
        option is available to the user on the preview screen. Currently
        supported engines are;
        
          - SoftVelocities PDF engine inside the clarion enterprise Edition
 
          - wPDF
            from Klarisoft
 
          - PDF-Tools from Tracker Software
 
        
       
      Office Engines
       If an Office engine is available then a Save-As
        Excel and Save-As Word option is available to the user on the preview
        screen. Currently the only supported engine is 
          CapeSoft's Office Inside. Suppliers of other engines (that support
        Report to Office functionality) can contact us to collaborate on support
        for other engines. 
 
      Email Engines
       If an Email engine is available then an option to
        send the report as an email is available to the user on the preview
        screen. This requires a PDF or Office engine as well. Currently the only
        supported email engine is 
 CapeSoft's NetTalk.   Suppliers of other engines
        can contact us to collaborate on support for another engine. 
 
      Cloud Engines
       If a Cloud engine is available then an option to
        upload the report as a file is available to the user on the preview
        screen. This requires a PDF or Office engine as well. Currently the only
        supported cloud engine is 
 CapeSoft's NetTalk.   Suppliers of other engines
        can contact us to collaborate on support for another engine. 
 
     
    Manual Previewer Calls
     In most cases you will use the second Premiere Global
      Extension (Call Premiere Previewer) to add the necessary local extension
      to all report procedures. However use of this global extension is optional
      and you may prefer to add the Local extension to selected reports by hand.
      
      To add the local extension simply go to the report and add the 
Call
        Premiere PrintPreviewer extension to the report. This extension
      supports most common report procedures.
      
      If your report is a hand-coded procedure, then you will need to add the
      call to the Previewer manually from there. The syntax for the call is as
      follows;
      
      
Premiere (PrintPreviewFileQueue, pReport, pOptions)
      
      The 
PrintPreviewFileQueue is the queue of
      WMF files as created by your report.
      The 
pReport is the name of your report
      structure.
      The 
pOptions is a group of type 
PremierePreviewerOptions.
      This parameter can be omitted.
      
      You will need to declare the 
pOptions parameter
      in your procedure.
      
pOptions   Group(PremierePreviewerOptions).
       
      The declaration of 
PremierePreviewerOptions is
      in 
Premiere.Inc. 
      
      For more information on the fields you can set in the group, see the
      section 
PremierPreviewOptions Group
      below.
      
      The default Clarion previewer does not have the ability to print the
      report. The printing was done on the return from the previewer depending
      on the value (
true or 
false)
      returned by the previewer. Since the Premiere previewer does the printing
      directly itself this additional code in the calling procedure can be
      removed.
      
    
 
    PremierePreviewerOptions Group
     The declaration of 
PremierePreviewerOptions
        is in 
Premiere.Inc. 
      The contents of the group are as follows;
      
        
          
            | Property | 
            Type | 
            Description | 
          
          
            | AllowCommas | 
            Byte | 
            If set to true then commas are allowed in filenames when
              creating PDF files. Note that NetTalk 10 does not allow commas in
              filenames, so the default value is false. If you are using NetTalk
              11 or later then you can set this property to true. (See Previewer
                Control Template). | 
          
          
            | AllowPageSelections  | 
            Long | 
            not currently used | 
          
          
            | AttachmentList  | 
            String | 
            A semi-colon separated list of files that will be added to
              outgoing emails, in addition to the generated PDF or Office file. | 
          
          
            | Automatic  | 
            Long | 
            If Automatic is set to true then
              the PremiereCreateFromQueue window is
              closed immediately after the file is created. If it is false
                then the PremiereCreateFromQueue will
              remain open when the file is created, allowing the user to note
              the name and location of the created file (and if Hyperactive is
              used, to click on the file name to open it.) 
               
              Note that Automatic is independent of 
                HideWindow. It is possible to have 
                HideWindow set to true (so
              the preview window is hidden), Destination 
              set to 'F', and 
                Automatic set to false. In
              this scenario the user will not see the preview window, but will
              see the PremiereCreateFromQueue window
              as the file is created. | 
          
          
            | Copies  | 
            Long | 
            The number of copies to print. Only applies when Destination is
              'P', or if the user clicks on the
              Print button. The user can override this setting by clicking on
              the Advanced Print Button. | 
          
          
            | Destination  | 
            String | 
            Sets the destination of the report, if HideWindow
                has been set to true. Valid
              options are; 
              'P' -- Send the report to a printer. 
              'E' -- Send the report to email as a
              PDF Attachment. 
              'L' -- Send the report to email as a
              Excel Attachment. 
              'R' -- Send the report to email as a
              Word Attachment. 
              'F' -- Send the report to a PDF File. 
              'X' -- Send the report to a Excel
              File. 
              'W' -- Send the report to a Word File.
              (also 'D') 
              'G' -- Upload the report to Google
              Drive 
              'O' -- Upload the report  to Microsoft
              OneDrive 
              'B' -- Upload the report  to DropBox 
               
              If 'F' or 'E'
              (PDF File)  then a PDF engine in the application is required.  
              If 'X' or 'L'
              or 'D' or  'W'
              (Excel or Word) then an office engine in the application is
              required. 
              If 'E' or 'L'
              or 'D' then an email engine in the
              application is required. 
              If there is no PDF engine and no office engine then destination
              will be treated as 'P'.  
              If the field is set to another (invalid) value then it will be
              treated as 'P'. 
               
              The Destination string can contain multiple of the above
              characters. For example if it contains 'PEW'
              then it will be sent to the printer, emailed as a PDF, and create
              a Word file. | 
          
          
            | Disable | 
            String | 
            Disables some functionality in the previewer. This can be used
              on a report-by-report basis to control which features are
              available per report. Valid options are; 
              'P' -- Prevent Printing. 
              'E' -- Prevent Emailing. 
              'S' -- Prevent Saving (or Emailing). 
              'F' -- Prevent Saving As (or Emailing)
              a PDF. 
              'X' -- Prevent Saving As (or Emailing)
              an Excel File. 
              'W' -- Prevent Saving As (or Emailing)
              a Word File.  
              'C' -- Prevent Uploading to any Drive 
              'G' -- Prevent Uploading to Google
              Drive 
              'O' -- Prevent Uploading to Microsoft
              OneDrive 
              'B' -- Prevent Uploading to DropBox | 
          
          
            | DropboxFolder | 
            String | 
            The default folder to store this report, if the report is
              uploaded to Dropbox. | 
          
          
            | EmailSignature | 
            String | 
            Used by the Email Templates. | 
          
          
            | EmailSubject | 
            String | 
            The subject line of the email when sending by email. If blank
              the the  ReportName field is used as
              the subject. | 
          
          
            | EmailSynopsis | 
            String | 
            Used by the Email Templates. | 
          
          
            | EmailTemplate  | 
            String | 
            The file name of the Email Template
              to use for the text portion of the email for this report. | 
          
          
            | EmailTemplateHTML | 
            String | 
            The file name of the Email Template
              to use for the html portion of the email for this report. | 
          
          
            | EmailText | 
            StringTheory | 
            The content to use for the text part of the email. If this
              property is set (even to a blank StringTheory object) then this
              will override the EmailTemplate field. The same tags as used in
              the email template can be used in this string. | 
          
          
            | EmailTextHTML | 
            StringTheory | 
            The content to use for the HTML part of the email. If this
              property is set (even to a blank StringTheory object) then this
              will override the EmailTemplateHTML field. The same tags as used
              in the email template can be used in this string. | 
          
          
            | EmailTo  | 
            String | 
            A semi-colon separated list of email addresses. When the user
              clicks on the Email button this will provide the default email
              address for the report and the user can change or replace it. 
              If HideWindow is 
                true, or PreventEmailChange is
              true then the user will not be able
              to override this setting. | 
          
          
            | ExcelFileName | 
            String | 
            The name of the Excel file to create when sending an email, or
              when saving as Excel. If Hidewindow is
              false then this is the default name used when the user clicks on
              the Save-As-Excel button. | 
          
          
            | ExcelOpenPassword | 
            String | 
            A password to apply to the created Excel file. Users will need
              to enter this password in order to open the spreadsheet in Excel. | 
          
          
            | ExcelEditPassword | 
            String | 
            A password to apply to the created Excel file. Users will need
              to enter this password in order to edit the spreadsheet in Excel. | 
          
          
            | GoogleDriveFolder | 
            String | 
            The default folder to store this report, if the report is
              uploaded to GoogleDrive. | 
          
          
            | HideWindow  | 
            Long | 
            If this property is true then the
              preview window, will not be displayed to the user. If this is true
              then the Automatic field is also
              treaded as on. The other properties in the group (Destination etc)
              will instruct the Preview window what to do, and then the window
              will close automatically. | 
          
          
            | OneDriveFolder | 
            String | 
            The default folder to store this report, if the report is
              uploaded to Microsoft OneDrive. | 
          
          
            | OpenDocument | 
            Long | 
            If this property is true, and the user creates a Word, Excel or
              PDF document, then the document will automatically be opened after
              it has been created.  | 
          
          
            | PDFFileName  | 
            String | 
            The name of the PDF file to create when sending an email, or
              when saving as a PDF. If Hidewindow is
              false then this is the default name used when the user clicks on
              the Save-As-PDF button. | 
          
          
            | PDFOwnerPassword | 
            String | 
            Sets the owner password for the created PDF.  (Extended to all
              engines) | 
          
          
            | PDFPermissions | 
            Long | 
            Sets the user permissions for the PDF. (Extended to all engines) 
              The permissions should be some combination of  
              pv:AllowPrint, pv:AllowChange,
              pv:AllowCopy, pv:AllowForms
              (permissions can be added together.) 
              since each engine uses different equates for these values, the pv:
              values should be used - these are translated into the appropriate
              values for the engine being used. | 
          
          
            | PDFUserPassword | 
            String | 
            Sets the user password for the created PDF. (Extended to all
              engines). The user password will need to be entered by the user
              before the PDF file can be opened in a viewer. This password
              causes the file to be encrypted. | 
          
          
            | PreventEmailChange | 
            Long | 
            If  true then the user cannot
              change the  EmailTo when clicking on
              the Send Email button. If this is true,
              and the  EmailTo field is not set
              then the user will not be able to send emails. | 
          
          
            | PreventFilenameChange | 
            Long | 
            If true then the user cannot change the Filename when clicking
              on the SaveAs button. If this is true, and the filename is not
              set, then the user will not be able to save files. | 
          
          
            | RecipientName  | 
            String | 
            Used by the Email Templates. | 
          
          
            | Report | 
            &Report | 
            A pointer to the original report structure. This is used by some
              of the Export tools when exporting the report to other formats. | 
          
          
            | ReportName  | 
            String | 
            The name of the report.  
              Used in the email text when the report is being sent via email. 
              Used as the Subject line of the email if EmailSubject is not set. | 
          
          
            | ReportDescription  | 
            String | 
            Used in the email text when the report is being sent via email. | 
          
          
            | ReturnIfEmailWasSent  | 
            Long | 
            not currently used | 
          
          
            | UserData | 
            StringTheory | 
            Data which can be set in the report procedure, which will be
              passed to the Premiere procedure, and from there to the
              SendEmail[1] and UploadFileToCloud[1] procedures. For more
              information see The UserData Field. 
               
              [1] The parameter will only be sent to these procedures if you are
              using NetTalk 12 (or no NetTalk at all). | 
          
          
            | WordFileName | 
            String | 
            The name of the Word file to create when sending an email, or
              when saving as Word. If Hidewindow is
              false then this is the default name used when the user clicks on
              the Save-As-Word button. | 
          
          
            | WordOpenPassword | 
            String | 
            A password to apply to the created Word file. Users will need to
              enter this password in order to open the spreadsheet in Word. | 
          
          
            | WordEditPassword | 
            String | 
            A password to apply to the created Word file. Users will need to
              enter this password in order to open the spreadsheet in Word. | 
          
        
      
      Setting a Parameter
      The template supports setting some of the parameters, but not all of them.
      If you wish to set a parameter which is not offered by the template, then
      you can do it in the embed code for the report. 
      The code will go into the 
Previewer.Display
      method, before the call to 
Premiere().
      
      For example;
      
      
Previewer.Display PROCEDURE(...
         ReturnValue BYTE,AUTO
          CODE
          ! CapeSoft Premiere
          Clear(PreviewParms)
          PreviewParms.ReportName = 'Customer List Report'
          PreviewParms.EmailTemplate = 'CustomerReportEmailTemplate.Txt'
          PreviewParms.EmailTemplateHTML = 'CustomerReportEmailTemplate.Htm'
          PreviewParms.PDFFileName = 'Customer List.PDF'
          ! Start of "Set Premiere Options"
        PreviewParms.EmailSubject = 'Premiere Example
        Report via Email'
        ! End of "Set Premiere Options"
          ReturnValue = Premiere(self.ImageQueue,Report,PreviewParms)
      
      
     
    The UserData Field
     The UserData field in the Options Group allows the
      programmer to pass custom information from the report procedure, to the
      Premiere procedure, and from there into the SendEmail
[1]
      and UploadFileToCloud
[1] procedures. 
      
      The field is declared as a reference to a StringTheory object. In other
      words, it can be assigned to an existing StringTheory object. In the
      destination procedures it can be accessed as a StringTheory object, and
      any changes to the object will change the original object in the Report
      procedure. In this way results can all be passed back to the report
      procedure.
      
      To use this property instantiate (create) a StringTheory object in the
      report procedure. This could be declared in the data pad, or in embed
      code. For example; 
      
      
 UserData StringTheory
      
      It can then be assigned to the group using the reference assignment.
      (There is also a template setting you can use for this.)
      
      
 PreviewParms.UserData &= UserData
      
      The contents of the object are up to you, and can be anything you like. If
      you have a single item to pass you might just put it in there. If you have
      multiple items you could add them as a comma delimited list (or something
      like that.) As long as the "other end" knows what is in the field you can
      use it.
      
      If you plan to make extensive use of this field then you could (and
      probably should) use a more structured approach, populating the field with
      JSON, or XML, or some other structured text format. 
      
      
Note 1 : The parameter will only be sent to
      the SendEmail and UploadFileToCloud procedures if you are using NetTalk 12
      (or no NetTalk at all).
 
    Constructing a SendEmail procedure without
      NetTalk
     The SendEmail() procedure
      is deliberately architected as a separate procedure in your application.
      This allows you to substitute an alternate method for sending emails - ie
      not using NetTalk.
      
      The requirements for the procedure are as follows;
      
      The Prototype for the procedure needs to be;
      (EmailParametersGroup pEmail),Long,Proc
      The parameters for the procedure needs to be
      (EmailParametersGroup pEmail)
      
      This group is declared for you in Premiere.Inc,
      and you can inspect the components for it there.
      The following items in the group are populated by the Premiere window;
      pEmailFileList 
        pEmailSubject
        pEmailMessageText
        pEmailMessageHtml
        pEmailTo
      
      Additional properties may also be set (in embed code) in the Premiere
        procedure,  SendEmail method.
    Constructing an UploadFileToCloud procedure
      without NetTalk
     The UploadFileToCloud()
      procedure is deliberately architected as a separate procedure in your
      application. This allows you to substitute an alternate method for
      uploading - ie not using NetTalk or FileExplorer.
      
      The requirements for the procedure are as follows;
      
      The Prototype for the procedure needs to be;
      (CloudParametersGroup pParms),Long,Proc
      The parameters for the procedure needs to be
      (CloudParametersGroup pParms)
      
      This group is declared for you in Premiere.Inc,
      and you can inspect the components for it there.
      The following items in the group are populated by the Premiere window;
      pServiceName
        pLocalFileName
        pAutoStartUpload
      
    Using NetTalk 7 / 8 / 9 / 10 / 11 / 12.29 (or
      earlier)
    
      Email
       The SendEmail procedure
        in the examples makes use of fields added with NetTalk 12.30. If you are
        using an older NetTalk (any level) then edit Netall.Inc
        to update the EmailParametersGroup so it
        appears as follows; 
        
        EmailParametersGroup Group,Type
          pEmailFrom             String(255)
          pEmailTo               String(255)
          pEmailSubject          String(255)
          pEmailCC               String(255)
          pEmailBcc              String(255)
          pEmailFileList         String(NET:StdEmailListSize)
          pEmailEmbedList        String(NET:StdEmailListSize)
          pEmailMessageText      String(100000)
          pEmailMessageHtml      String(100000)
          pEmailSettingsPath     String(255)
          pEmailTest             Long
          pHelo                  String(255)  
          pSSL                   Long          
          pStartTLS              LONG          
          pSign                  Long          
          pHide                  Long          
          pServer                string(255)  
          pPort                  Long          
          pEmailReplyTo          string(255)   
          pSmtpUser              String(255)   
          pPassword              String(255)  
        pSSLMethod             Long          
        pEmailFileNameList String(NET:StdEmailListSize) 
        
        pEmailImagePath String(255)                     
        
        pUserData &StringTheory                        
         
                              End
        
        This update will not affect NetTalk 7,8,9,10 or 11 in any way.
      
      Cloud Drive
       The UploadFileToCloud procedure
        in the examples makes use of fields added with NetTalk 12.30. If you are
        using an older NetTalk (any level) then edit Netall.Inc
        to update the CloudParametersGroup so it
        appears as below. If you are using a version of NetTalk older than
        NetTalk 10 then the Cloud Upload feature is not available to you.
        
        CloudParametersGroup    Group,type
          pServiceName              string(20)
          pLocalFileName            string(256)
          pCloudFileName            string(256)
          pClientId                 String(256)
          pClientSecret             String(256)
          pAutoStartUpload          Long
          pUserData                 &StringTheory   ! 12.30
                                  End
        
      
     
    Email Templates
     When sending reports via email it is often useful to
      have the email text formatted a specific way to make the email attractive
      to the recipient. It is also occasionally desirable to use different email
      text for different reports. 
      
      In order to allow for this, Premiere supports the concept of Email
      Templates. These are text files which can be created by the developer,
      and, if necessary, customized by the end user. 
      
Email Tags
       Special "tags" inside email text and HTML allow text
        replaced when the email is created. These tags work regardless of the
        email source (ie the EmailTemplate, or the EmailText properties)
        
        Supported tags are
        
       
      HTML in Emails
      
      Template Settings
       Each report can make use of different email
        templates. The 
Report Extension Template
        has settings which allow you to set templates for both the HTML and Text
        part of the emails.
 
      Some Online Tools for creating HTML Templates
       Goggling for online tools to help with creating
        email templates quickly leads you to many possible options. Some
        suggested sites are;
        
       
      NetTalk Version
       If you are using NetTalk version 9.20 or later then
        (local) image references in the template will automatically be embedded
        into the email. For example if your email template contains something
        like; 
        
        <img src="capesoft200.png">
        
        Then this image will be embedded in the email. 
     
    Automation
     The 
PremierPreviewOptions
        Group contains a number of options that let you completely, or
      partially, automate the preview window.
      
        - HideWindow: If set to true then the
          whole process is automatic. The preview window does not appear
          (although various progress windows may appear.) note that the template
          setting is Show Preview Window which is the
          opposite of what the parameter is set to.
 
        - Automatic: If set to true then the
          previewer will automatically perform the action specified in the Destination field. Depending on the
          destination other fields (like the email address, or filename) will
          come into play.
 
        - OpenDocument: If this is set to true,
          and a PDF, Excel or Word document is created then the document will
          automatically open after it is created. This does not apply if the
          document is being emailed.
 
      
     
    Default File Names and Locations
     You can control, or suggest, the name for PDF, Excel
      or Word files in different places. This section discusses those places in
      order of most specific to least specific.
      
      Bear in mind that any file name consists of two parts, the name of the
      file and the location (full path) to the file. With some thought it's
      possible to set these separately in different places, as discussed below.
      
Report Procedure
       The most specific place is in the report procedure
        itself. In the Premiere extension to the report you can set
        individualized names, and possibly paths for the PDF, Excel and Word
        files. This could be a fixed value or an expression. 
        This value defaults to the procedure name with the appropriate
        extension.
        
        There is also a setting here (Prevent File Name Change) which, if set
        on, prevents the user from changing the name (or location) of the file.
        
        In addition you can set the default cloud directories here for the
        supported cloud drives. 
      
      Premiere Procedure
       If the PATH is not set in the report procedure, then
        the Premiere (preview) procedure can default the location of the file to
        a specific folder. this is set via the Default File Folder setting, on
        the Premiere Extension, on the 
Defaults
          Tab. You can choose from a number of common windows folders
        (Desktop, My Documents etc), use the Current Folder, or specify some
        other specific folder there.
        
        On the Defaults Tab you can also set the default directories to use for
        the various supported Cloud drives.
 
      At Runtime
       If the Cloud path is not set by the report, or the
        Premiere procedure, then the last-used folder will be suggested to the
        user.
        the user is able to override the suggestion with another path if they
        choose to do so.
     
    Translations
     As the Premiere window is just a procedure in your
      application you are free to translate the text on the window (and
      generally change the window layout and design) as you please. 
      
      There are however some interface elements in the class - default text for
      emails, popup options on the Pages button, AdvancedPrint button and so on
      which you may wish to translate. A mechanism for this is provide by the
      .Translate method in the class.
      
      All English text in the class is passed to the Translate method when it is
      used. You can then use your favorite translation tool to translate the
      text there. (Naturally, if you are using 
AnyText as your favorite tool, then  you don't need
      to do anything as Premiere supports AnyText automatically.)
      
      To add your translation code, you can embed directly into the Translate
      method in the Premiere procedure. There is only one input, the text to be
      translated, and only one return value - the translated text.
      
      Example;
      
      
ThisPremiere.Translate PROCEDURE (String pText)
        ReturnValue any
          CODE
          ReturnValue = MyFavoriteTranslationTool(pText)
          Return ReturnValue
      
      
     
    Fast Report Closing
     Acknowledgement: This issue, and
      solution, was first proposed by Carl Barnes, and documented on 
ClarionHub and 
ClarionLive.
      
      When a report is closed, then all the temporary files used by the report
      are deleted from the temp folder.This is done automatically by the 
CLOSE(Report) function.
      
      Unfortunately this function (internally) makes use of the 
REMOVE
        command, which in turn has some option parameters, and hence it's
      designed for flexibility, not speed. The Windows API call (
DeleteFileA) is less powerful, but at the same time
      much faster. For reports with a number of pages this speed difference is
      noticeable for reports of about 40 pages, and is significant for reports
      of around 100 pages or more. For very large reports (several hundred
      pages) the time taken to close the report is painful.
      
      Premiere includes a function (
PremiereDeleteFilesInPrintPreviewQueue),
      which can be added to report procedures, which deletes the files using
      DeleteFileA. This greatly improves the performance of the closing of the
      report (ie after the previewer closes). It is a simple function call, and
      does not require an object to be declared in the procedure. It takes the
      print preview queue as a single parameter.
      
      
ABC and Legacy App Report Procedures
       By default if the report calls the Premiere
        previewer then the template will add a call to the PremiereDeleteFilesInPrintPreviewQueue
          function before the call to Close(Report).
        There is nothing to do, it is simply on.
        
        This can be overridden at the global level, or the local level. You
        might wish to override the call if it would interfere with your own
        queue manipulation. 
      Hand-Code / Other Report Procedures
       If you have a hand-coded report, and you wish to
        make use of this function then simply call
        
        
          PremiereDeleteFilesInPrintPreviewQueue(PrintPreviewQueue) 
        
        Before the call to CLOSE(Report) 
        
      
     
     Password Protected PDF, Excel and Word
      Files
     Premiere can create PDF, Excel and Word files from the
      report. It can also Email or Upload these files after creation. It is
      sometimes desirable to password-protect these files because they may
      contain sensitive or private information. Premiere allows the user to
      optionally enter a password when setting the file name, which will in turn
      cause the file to be protected with the password. 
      
      This feature is new in build 3.37. If you have used a version prior to
      this version in your application then you will need to tweak your
      PremiereGetData procedure. See Upgrading Premiere for more information.
      
      This feature makes use of Office Inside build 4.68 (for creating the Excel
      and Word files). So to support these files you will need to be on Office
      Inside 4.68 or later.
    FAQ
    
      
        - Why are PDF files created with the SV PDF
            Engine very large?
 
      
      Why are PDF files created with the SV PDF
        Engine very large?
       The SV PDF Engine can generate files using one of
        two modes. Scan Copy Mode makes bigger files, but supports more
        non-ASCII character sets. You can set the engine to use Scan Copy mode,
        or not, in the  Premiere 
Extension
          template in the 
PremiereCreatePDFFromQueue procedure
        which is in your app tree. 
        
        Note that PDF's in Scan Copy mode do not support password protection.
 
      
      
     
    Template Reference 
    
      
      Global Extension Template Extension
      
        Options Tab
        
          Preview Procedure
          Select the name of the Preview Procedure here. The default is 
Premiere,
          and if this setting is left blank then this name will be used.
          
Generate External Premiere Procedure into Map
          If this is a Multi-DLL system, and this is NOT the Data DLL, then the
          Premiere function will be added to the MAP for you and you do not need
          to have it declared in your application tree. If you do want it
          declared in the tree (as an external) then tick this option off to
          avoid Duplicate Identifier errors.
          
Use PDF Engine
          If set to "default" then the PDF engine included in your app will be
          detected and used. If you wish to override the auto-detection then you
          can do so here. You can also choose to suppress PDF support (even if
          an engine exists) here.
          
Use Office Engine
          If set to "default" then the Office engine included in your app will
          be detected and used. If you wish to override the auto-detection then
          you can do so here. You can also choose to suppress Office support
          (even if an engine exists) here.
          
Use Email Engine
          If set to "default" then the Email engine included in your app will be
          detected and used. If you wish to override the auto-detection then you
          can do so here. You can also choose to suppress Email support (even if
          an engine exists) here.
          
Use Cloud Engine
          If set to "default" then the Cloud engine included in your app will be
          detected and used. If you wish to override the auto-detection then you
          can do so here. You can also choose to suppress Email support (even if
          an engine exists) here. 
 
        Defaults Tab
         The settings on this tab are defaults for local
          report options. These options can be overridden at the local procedure
          level.
          
Show Preview Window
          If this expression resolves to true, then the preview window will be
          visible after the user generates the report.
          
Default Destination
          If the preview window is not visible, then the output will go directly
          to this destination. Some destinations require specific tools. See the
          
PremierePreviewOptionsGroup for more
          details.
          
Expression
          If the above setting is set to Expression, then this option will be
          available. You can then enter an expression which contains the desired
          destination value.
          
Auto Open Document
          If this is set to true, and the user saves the report to a PDF, Excel
          or Word document, then the document will automatically open in the
          respective program once it has been generated. This option does not
          require Hyperactive.
          
Email Signature
          A default email signature can be set here. This will be added to the
          bottom of the default email text, and will also be injected into
          template, or StringTheory, email text replacing the 
            [emailsignature] tag. 
 
        Multi DLL Tab
        
          This is part of a Multi-DLL program
          If this app is part of a suite of apps, where you are making your own
          DLL's, then tick this option on in all the apps, including the DLL
          apps and the EXE apps in the suite.
          
Export Premiere Class from this DLL
          Check this box if this app is the root DLL of the app suite. 
 
       
      Report Extension Template
      
        General Tab
        
          Disable This Extension
          If this switch is on the no code will be generated into this procedure
          by the Premiere template.
          
Preview Procedure
          Leave this blank to use the global preview procedure. Or enter a
          specific procedure for this report here.
          
Show Preview Window
          If this option is blank then the global default will be used. If the
          global default is also blank then this option defaults to true (ie the
          preview window will be displayed.) If this option (or the global
          option) is set, and evaluates to false, then the preview window is not
          visible to the user after the report runs. In this situation the Auto
          Open Document, Default Destination and various file name settings will
          be important, and will determine the behavior.
          
Auto Open Document
          If this option is blank then the global default will be used. If the
          global default is also blank then this option defaults to false (ie
          the document will be created, but not automatically opened. If
          Hyperactive is in the app then the user will have the option to open
          the file manually.)
          
Automatic
          If this option is blank then it defaults to false. If this option
          evaluates to true then the previewer will automatically perform the
          task, as determined by the Destination field (Print, make a File,
          Email etc.)
          
Report Name
          Used as the Subject when emailing the report. Also used in the message
          body of the email.
          
Report Description
          Used in the message text when sending an email to a user.
          
Default Destination
          If set to Default (or nothing) then the global template option will be
          used. If the preview window is not visible, then the output will go
          directly to this destination. Some destinations require specific
          tools. See the 
PremierePreviewOptionsGroup
          for more details. 
          
PDF File Name
          The default name to use when a PDF file is created by the previewer.
          The user will still be asked for the name, but the default name will
          be presented to them. This field is an expression, meaning that
          current date and time (or anything else) can be included in the name. 
          For example;
          
'Customer Report as at ' & format(today,@d1)
          Excel File Name
          As for the PDF Filename above, but used when exporting to Excel.
          
Word File Name
          As for the PDF Filename above, but used when exporting to Word.
          
Prevent File Name Change
          If this is on then the user will not be able to change the generated
          file names. The names set above will be used.
          
Fast Delete WMF Files
          If this is set to Yes (or Default, with the global setting set to
          Yes), then Premiere will delete the WMF files itself before returning
          control to the Report procedure. Premiere bypasses an issue in Clarion
          where deleting files can be slow for large numbers of files. Unless
          you are doing further manipulation of the WMF files in the report
          procedure, After the previewer, this option can be set to Yes.
          
User Data (st Object)
          The label of a StringTheory object can be entered here. This field
          should JUST be the label of the object. You can select from the data
          pad, or simply type the name of the object in here.
 
        Disable Tab
         This tab lets you disable features in the
          previewer on a report-by-report basis. For example some reports may
          not be suitable for savig to Excel, and so this can be turned off for
          that report. 
        Email Tab
        
          Email To
          The default address to send the report to, if the user selects the
          Email button. The user will still be able to change the email address.
          Note that this field is an expression, so a user-related value might
          be appropriate.
          
Prevent Email Address Change
          If this is on the the user will not be able to override the email
          destination of this report. In other words the report can only be
          emailed to the specified address above.
          
Email Subject
          A subject line to use when emailing. If this is left blank then the
          report name is used in the subject line of the email.
          
Email Text Content (st)
          The label of a StringTheory object, containing the content of the
          email text part to send with this report. If this is set then the
          Email Template (Text) setting is ignored. 
Email
            tags can be used.
          
Email HTML Content (st)
          The label of a StringTheory object, containing the content of the
          email HTML part to send with this report. If this is set then the
          Email Template (HTML) setting is ignored. 
Email
            tags can be used.
          
Email Template (Text)
          The name of the
 email template to use
          for the text potion of the email body.
          
Email Template (HTML)
          The name of the 
email template to use
          for the html potion of the email body.
          
Email Signature
          A signature to replace the 
[emailsignature]
          tag. This signature will also be appended to
          the standard email text if no text, or template, is set.
          
Email Synopsis
          Text to replace the 
[emailsynopsis] tag.
          This synopsis will also start the standard email text if no text, or
          template, is set. 
 
       
      Previewer Control Template
      
        Options Tab
        
          Selected Page Color
          Not currently Used.
          
Unselected Page Color
          Not currently Used.
          
Allow Send Email from Previewer
          If this option is off then the Email button on the previewer will be
          disabled. If this option is on then you will need a 
SendEmail
            procedure in the application.
          
SendEmail procedure
          This is the procedure that will send the email. If this option is
          blank, and the option above is ticked, then the default name 
SendEmail
            will be used.
          
Allow Save To Word
            from Previewer
          If an Office Engine is set, then you can use this option to prevent
          exporting to Word. If there is no Office engine set then this setting
          has no effect.
          
Allow Save To Excel from Previewer
          If an Office Engine is set, then you can use this option to prevent
          exporting to Excel. If there is no Office engine set then this setting
          has no effect.
          
Allow File Upload from Previewer
          If this option is off then the Upload button on the previewer will be
          disabled. If this option is on then you will need a 
UploadFileToCloud
            procedure in the application.
          
Upload procedure
          This is the procedure that will upload the file to the cloud. If this
          option is blank, and the option above is ticked, then the default name
          
UploadFileToCloud will be used.
          
Allow Commas in FileNames.
          By default Premiere does not allow commas in export to (PDF, Excel
          etc) file names. This is because NetTalk 10 (and earlier) did not
          allow commas in the attachment list when sending emails. In NetTalk 11
          and later commas are allowed. If you are using NetTalk 10 or earlier,
          leave this option set to false. If you are using NetTalk 11 or later
          (or some other email engine that does support commas) then you can
          turn this option on. 
 
        Defaults Tab
        
          Default File Folder
          Use this to set the default location for created PDF, Excel and Word
          files.
          
Folder
          If the Default File Folder is set to Specific folder then you can
          enter an expression for the specific folder here.
          
Default Folder For
          This lets you set the default folder for the listed cloud services. If
          the user saves a report to the cloud then this will be the folder
          suggested to them. 
 
       
     
    CreatePDFFromQueueControl
      Template
    
      General Tab
      
        Disable This Extension
        If this switch is on the no code will be generated into this procedure
        by the Premiere template. 
 
      SV PDF Tab
      
        Show Progress
        If on then a progress window is displayed when converting the report to
        a PDF.
        
Use Scan Copy Mode
        Turns on the ScanCopyMode feature for the SV PDF engine. This is most
        useful when using non-ASCII character sets. If this is on then the PDF
        files will be much larger than when it is off.
 
      wPDF Tab
      
        Compression
        Set the compression level for the wPDF engine.
        
JPEG Compression
        Set the JPEG compression level for the wPDF engine.
        
Font Mode
        Set the Font mode for the wPDF engine. 
 
     
    CreateOfficeFromQueueControl
      Template
     This template is used in the 
PremiereCreateExcelFromQueue
        and 
PremiereCreateWordFromQueue procedures.
      
General Tab
      
        Format
        Select from Excel or Word.
        
Disable This Extension
        If this switch is on the no code will be generated into this procedure
        by the Premiere template. 
 
     
    GetData Control Template
    
      General Tab
      
        Disable This Extension
        If this switch is on the no code will be generated into this procedure
        by the Premiere template.
        
Lookup Dialog Header
        Allows you to change the wording used by the 
FileDialog
          command when the user does a file lookup. 
 
     
    Examples 
     There are 8 examples that ship with Premiere. 
      
      ABC All
       This is the full-featured example and includes
        Premiere, NetTalk (for emailing and cloud), FileExplorer for cloud
        upload, Office Inside for Excel and Word support, Hyperactive and the SV
        PDF Engine. The PDF engine can be replaced with whichever PDF engine you
        prefer. If you have File Explorer, Office and NetTalk then this is the
        recommended example to use.
        
        If you use this example as a source for your own application then note
        the two tables in the dictionary (EmailLog and
        EmailSettings) which you will likely want to
        import into your dictionary as well.
      Legacy All
       A Clarion (Legacy) version of the ABC All example. 
        
        The resize template on the Premiere procedure is the built-in Clarion
        Legacy Resize template. It is recommended that this be replaced with a
        more capable resizing template, such as 
 ResizeAndSplit.
 
      ABC Office
       This example includes Premiere, Office Inside
        Hyperactive and the SV PDF Engine. The PDF engine can be replaced with
        whichever PDF engine you prefer. Use this example if you have Office
        Inside, but not NetTalk.
      Legacy Office
       A Clarion (Legacy) version of the ABC Office
        example. 
        
        The resize template on the Premiere procedure is the built-in Clarion
        Legacy Resize template. It is recommended that this be replaced with a
        more capable resizing template, such as 
 ResizeAndSplit.
 
      ABC NetTalk
       This example includes Premiere, NetTalk (for
        emailing), Hyperactive and the SV PDF Engine. The PDF engine can be
        replaced with whichever PDF engine you prefer. If you have NetTalk, but
        not Office  then this is the recommended example to use.
        
        If you use this example as a source for your own application then note
        the two tables in the dictionary (EmailLog and
        EmailSettings) which you will likely want to
        import into your dictionary as well.
      Legacy NetTalk
       A Clarion (Legacy) version of the ABC NetTalk
        example. 
        
        The resize template on the Premiere procedure is the built-in Clarion
        Legacy Resize template. It is recommended that this be replaced with a
        more capable resizing template, such as 
 ResizeAndSplit.
 
      ABC
       A minimal ABC app with the Premiere report preview,
        but no PDF engine, no Office engine and no Email engine. You can add
        your favorite PDF engine to this app to enable the Save As PDF button.
      
      Legacy
       A minimal Clarion (Legacy) app with the Premiere
        report preview, but no PDF engine, no Office engine and no Email engine.
        You can add your favorite PDF engine to this app to enable the Save As
        PDF button. 
        
        The resize template on the Premiere procedure is the built-in Clarion
        Legacy Resize template. It is recommended that this be replaced with a
        more capable resizing template, such as 
 ResizeAndSplit.
      
 
      Multi-DLL ABC
       A Multi-DLL ABC app with the Premiere report
        preview, and SoftVelocity PDF engine (in the Data DLL) a report (no PDF
        engine) in the Functions app, and nothing in the Demo app. 
        
        You can remove the SV PDF extension and replace it with the global
        extension for PDF-Tools or wPDF templates if you like.
      Multi-DLL Legacy
       A Multi-DLL Clarion (Legacy) app with the Premiere
        report preview, and SoftVelocity PDF engine (in the Data DLL) a 
        report (no PDF engine) in the Functions app, and nothing in the Demo
        app.
        
        You can remove the SV PDF extension and replace it with the global
        extension for PDF-Tools or wPDF templates if you like.
        
        The resize template on the Premiere procedure is the built-in Clarion
        Legacy Resize template. It is recommended that this be replaced with a
        more capable resizing template, such as 
 ResizeAndSplit..
      
 
     
    Errors
    
      
        -  GEN: Unknown Template type
            HyperActive(HyperActive)
            Unknown Variable %HaDefaultBright 
          Errors when Importing from a TXA. See Note . 
        - Prototype is:
            PREMIEREGETDATA(STRING,*STRING,STRING) - C:\ABS 
            Unknown identifier: PWHAT 
          
          Likely occurs just after the TXA import of the procedures. See  for more information. Just going to the
          Properties of each Premiere Procedure  solves the problem. 
        -  No Matching Prototype Available
          When you are not using Email. See Note . 
        -  No matching prototype available on
          Return UploadFileToCloud(pCloud)
          When you are not using Cloud support. See upgrading. 
      
     
    Support
     Your questions, comments and suggestions are welcome.
      Check our web page (
www.capesoft.com)
      for new versions. You can also contact us in one of the following ways:
      
      
        
          
            | CapeSoft Support | 
          
          
            | Support Page | 
            Find support page with various options here | 
          
          
            | Email | 
              | 
          
          
            | Telephone (landline) | 
            +27 87 828 0123 (outside South Africa) 
              087 828 0123 (inside South Africa) | 
          
        
      
     
     Distribution
     No additional files are required for shipping.
    
     License & Copyright
     This template is copyright 2025 by CapeSoft Software.
      None of the included files may be distributed. Your programs which use
      Premiere can be distributed without any royalties. 
      
      This product is provided as-is. CapeSoft Software and CapeSoft Electronics
      (collectively trading as CapeSoft), their employees and dealers explicitly
      accept no liability for any loss or damages which may occur from using
      this package. Use of this package constitutes agreement with this license.
      This package is used entirely at your own risk. 
      
      Use of this product implies your acceptance of this, along with the
      recognition of the copyright stated above. In no way will CapeSoft , their
      employees or affiliates be liable in any way for any damages or business
      losses you may incur as a direct or indirect result of using this product.
      
      For the full EULA see 
https://capesoft.com/eula.html 
    Version History
     Version 3.49 -
          27 May 2025
         
      
      Version 3.48 - 14 April 2023
      
      
      Version 3.47 - 18 July 2022
      
      
        - Change: In PremiereGetData Procedure, variables Ans and Ans2 are
          extended from 256 bytes to 4096 bytes long.
 
      
      Version 3.46 - 7 February 2022
      
      
        - Fix: PDF's opened in Adobe Reader could have the Print icon
          disabled. (Opening in other readers seems to be unaffected.)
 
      
      Version 3.45 - 2 February
        2022
      
      
        - Add: Support for I2PDF report engine (Alternate SoftVelocity engine)
          - for real this time....
 
      
      Version 3.44 - 31 January 2022
      
      
        - Add: Embed points to SetupPremiere routine
 
        - Add: Support for I2PDF report engine (Alternate SoftVelocity engine)
 
        - Change: Size of EmailTo field made bigger
 
      
      Version 3.43 - 6 December 2021
      
      
        - Add: EmailText, EmailTextHTML
          properties, as StringTheory object references to the PremierPreviewOptions
            Group. 
 
        - Add: EmailSignature, EmailSynopsis
            properties, as strings to the PremierPreviewOptions
            Group. 
 
        - Add: UserData property as StringTheory
          object reference to the  PremierPreviewOptions
            Group. Use of this field is discussed at The
            UserData Field.
 
        - Add: AllowCommas property to PremierPreviewOptions
            Group. See also Previewer Control
            Template.
 
        - Add: "Other" as options in Global
            template for PDF, Office, Email and Cloud engines.
 
        - Add: Global Extension,
            Defaults tab, Email Signature option.
 
        - Refactor: GetEmailText method so it can take a template name, or a
          prefilled StringTheory object.
 
        - Update: Default text in email updated to include RecipientName,
          EmailSynopsis and EmailSignature
 
        - Update: EmailParametersGroup updated to match the one in NetTalk
          12.30 (only generated if you are not using NetTalk). If you are using
          an older NetTalk (ie < 12.30) then see Using
            (old) NetTalk 7 / 8 / 9 / 10 / 11 / 12.29 (or earlier)
 
      
       Version
        3.42 - 10 November 2021
      
        - Fix: Regression in 3.35 with disabling
          the ZoomOut button (and never enabling it.)
 
      
      Version 3.41 - 28 October 2021
      
      
        - Fix: Duplicate embed point when
          generating alternate windows.
 
      
      Version 3.40 - 17 October 2021
      
      
      Version 3.36 - 23 September 2021
      
      
        - Add: Fast Report Closing (courtesy
          of Carl Barnes)
 
        - Updated: ABCAll example app updated to use ChromeExplorer not
          FileExplorer
 
      
      Version 3.35 - 17 August 2021
      
      
        - Fix: Handle new Clarion 11.1 behavior for Disable(0)
 
        - Fix: In Premiere procedure ThumbQueue is now generated even when
          extension is disabled (because it is used on the window.)
 
      
      Version 3.34 - 24 May 2021
      
      
      Version 3.33 - 22 September 2020  
      
        -  Change: If the parms.Automatic and parms.Hidewindow property is
          set, then the EmailParms.pHide property is set before the call to
          SendWindow. (The SendEmail procedure would still need to use this
          property.)
 
      
      Version 3.32 - 4 September 2020  
      
        -  Change: The Select Printer button had the Standard Action set to
          STD:PrintSetup. This is equivalent to PrinterDialog('',1).
          This standard action has been removed from the template, and code
          generated for PrinterDialog('SelectPrinter',0) instead. For existing
          apps remove the STD:PrintSetup from the button. 
      
      Version 3.31 - 7 August 2020  
      
        -  Add: Recognizes Chrome Explorer as a valid HTML engine for OAuth
          uploads.
 
      
      Version 3.30 - 28 June 2020  
      
        -  Add: Limit to "number of copies" to 1000. This prevents problems
          where the "copies" parameter is set high by mistake.
 
        -  Updated: Email Parameters Group for programs not using NetTalk.
 
        -  Updated Cape templates to 4.21
 
      
      Version 3.29 - 21 October 2019  
      
        -  Add: Ability to override Preview procedure at the local report
          level. (Courtesy of Jeff Hojka)
 
        -  Fix: Not all calls to Premiere Procedure respect the global
          procedure name. (Courtesy of Jeff Hojka)
 
      
      Version 3.28 - 23 July 2019  
      
        -  Add: AllowWord and AllowExcel properties, 
            Options on Previewer Control Template.
 
      
      Version 3.27 - 1 October 2018  
      
        -  Fix: Setting engines to None on global extension did not remove
          them if they were actually available in the app.
 
      
      Version 3.26 - 14 September 2018  
      
        -  Add: Clarion 11 to install.
 
        -  Change: Subject, ToAddress and attachment list primed before
          calling PrimeEmailParameters, not after.
 
        -  Fix: CPCS, ABC, reports did not generate parameters correctly.
 
        -  Fix: Commas removed from report file names. (although legal,
          NetTalk 10 and earlier splits the attachment list on commas)
 
        -  Fix: Recipient name (set from email address) set specifically for
          the Email template each iteration of the To list.
 
      
      Version 3.25 - 30 August 2018  
      
        -  Add: Support for programs who have an old version of NetTalk that
          don't have the Cloud Parameters group declared.
 
      
      Version 3.24 - 22 August 2018  
      
        -  Fix: PrimeEmailParameters method. 
 
      
      Version 3.23 - 15 August 2018  
      
        -  Add: PrimeEmailParameters method. 
 
      
      Version 3.22 - 26 July 2018  
      
      Version 3.21 - 15 May 2018  
      
        -  3.20 was A Major update. Read Upgrading from an earlier Premiere version for
          more information on upgrading.
 
        -  Add: Template option to determine default location for PDF's, Excel
          and Word docs.
 
        -  Add: Support for setting default cloud folders at Report and
          Preview level.
 
        -  Add: Support for wPDF Licensing settings.
 
        -  Add: Support for wPDF engine options in PremiereCreatePDFFromQueue.
 
        -  Add: Embed points to PremiereCreatePDFFromQueue before and after
          the PDF engine is initialized.
 
        -  Add: PDF Permission properties to PremierPreviewOptions
            Group.
 
        -  Add: DefaultFilePath, DefaultfilePathName,DefaultDropboxFolder (et
          al) properties to the Premiere class.
 
        -  Add: Cloud drives as possible default destinations.
 
        -  Add: Template option to Report extension to prevent file name
          change at runtime.
 
        -  Change: wPDF engine uses EXISTS to determine if file creation is
          successful.
 
        -  Rename: Fields in 
            PremierPreviewOptions group type, DropboxDirectory to
          DropboxFolder et at.
 
        -  Documentation: Section on Default File
            Names and Locations added.
 
      
      Version 3.20 - 2 May 2018  
      
        -  A Major update. Read Upgrading
            from an earlier Premiere version for more information on
          upgrading.
 
        -  Add: Support for Upload to Cloud Drive feature to print previewer.
 
        -  Add: Allow user to select pages, and page ranges, using entry box.
          eg 2,3,5-9 and so on.
 
        -  Add: Pages Layout - Full Page option. (Now has Page Width, and Full
          Page for 1 page layout.)
 
        -  Add: Property. PreventFilenameChange to PremierPreviewOptions
            Group.
 
        -  Add: Property; UsingMDIWindow. Set if the preview window is running
          in MDI mode.    
 
        -  Change: Control Template updated. Repopulation in the Premiere
          procedure is recommended.
 
        -  Change: New options added to Destination property of PremierPreviewOptions
            Group.
 
        -  Fix: CPCS Legacy reports were not setting the Preview Parameters
          correctly.
 
        -  Internal: Tidy up some code to use equates instead of numbers.
 
        -  Refactor: ApplyZoom
 
      
      Version 3.12 - 9 February 2018  
      
        -  Fix: Compile error under Clarion PE where no Clarion PDF engine
          installed.
 
      
      Version 3.11 - 9 January 2018  
      
        -  Change: Destination 'D' is mapped to
          Word document. Destination 'R' is now
          used for Email/Word attachment. Backwards compatible with
          RightReports. 
 
        - Update to \Abc\Office example to show new switches added in build
          3.10
 
      
      Version 3.10 - 3 January 2018  
      
        - Add: Global Template, Defaults
          tab.
 
        - Add: New options to Local Template, General
          tab.
 
        - Add: Local Template: Email
          tab.
 
        - Add: New destinations L and D.
 
        - Add: The Destination string can now contain multiple characters (ie
          outputs).
 
        - Add: OpenDocument option to PremierPreviewOptions
            Group
 
        - Add: Embed in Premiere procedure before call to ThisPremiere.Init
 
        - Fix: File names could be set to x:\\ if in the root folder. (thanks
          to Marty Berliner)
 
      
      Version 3.08 - 24 November 2017  
      
        - Add: Show Progress
            Option to SV PDF options on CreatePDFFromQueue procedure.
          (Defaults on).
 
        - Fix: If using PDF-Tools, or wPDF the Office procedures would
          generate an error because of missing AB include files.
 
        - Fix: When using SV PDF Engine, report size was not respected in the
          PDF output. Especially affected Landscape reports.
 
        - Document: A new section added to the docs to show how to edit
            the Clarion files for a better progress window.
 
      
      Version 3.07 - 17 November 2017 --  SEE
        upgrade notes for changes to your program
      
        - Add: Support for Office Inside to create Word and Excel files from
          the previewer window.
 
        - Add: Report field in 
            PremierePreviewerOptions. This allows engines to get additional
          information from the actual report structure.
 
        - Add: Excel and Word file names to Report
            Extension template.
 
        - Add: Allows selection of attachment for mat when emailing.
 
        - Replacement: Save-As button to replace SaveAsPDF button - with drop
          to select Save-As type.
 
        - Add: Examples containing Office added.
 
      
      Version 3.06 - 21 February 2017
      
        - Fix: Calls to GetData from Premiere class  did not pass first
          parameter through TRANSLATE method.
 
      
      Version 3.05 - 20 February 2017
      
        - Fix: (hidden) Preview window did not automatically close when .HideWindow option set to true.
 
      
      Version 3.04 - 17 February 2017
      
        - Add: Translation support. 
 
        - Add: Built-In support for translation via AnyText.
 
        - Add: Support for Email templates for
          Text and HTML.
 
        - Document: Parameter group
          when calling Premiere procedure.
 
        - Tidyup: Use of HideWindow and Automatic
             Options.
 
        - Remove: Premiere.Copies property. Use Premiere.previewParms.Copies instead.
 
      
      Version 3.03 - 19 December 2016
      
        - Add: Support for SendTo_Printer
          procedure as a special case. If the user chooses PDF on the SendTo
          options window then the Previewer is not displayed.
 
      
      Version 3.02 - 22 November 2016
      
        - Add: Option To 
            PremiereCreatePDFFromQueue procedure extension: New tab of
          options for SV PDF converter. Specifically ScanMode for foreign
          character sets.
 
        - Change: Default values for Report Name and PDF File Name set to
          Procedure name. (Delete second global extension and re-add it for new
          defaults to take effect.) Do not do this if you've already set report
          settings.
 
        - Fix: CPCS / CRT Support - could return error on missing variable
          RETURNVALUE.
 
        - Fix: %Email used instead of %EmailTo in report settings.
 
        - Docs: Template Reference added.
 
      
      Version 3.01 - 21 November 2016
      
        - Add: CPCS / CRT Support
 
        - Add: Fomin Report Builder support.
 
        - Add: PremiereCreatePDFFromQueue procedure sets local variable RESULT
          if file is created ok.
 
        - Change: Hyperlink in PremiereCreatePDFFromQueue window is disabled
          until file creation is completed.
 
      
      Version 3.00 - 18 November 2016
      
        - First build as a separate product.
 
      
      Version 1.00 - 17 September 2007
      
        - Original version included with RightReports