Reports Executing Cicode in Vijeo Citect

Hi--

My project has legacy cicode that is executed via a periodic report.  I can't find documentation on how this works.  Can you describe this function for me?  For instance, in the configuration of the report, how is the executing function determined?

Also, are there reasons why this would be done instead of defining an event?  My vijeo citect configuration is redundant servers.

Thanks,

  • Hi,

    check the help topic : "Visualization > Reports > Format a Report". By making the block {CICODE} in a report it will treat all calls in there as cicode.

    Events need to be set up per process from the ini (and this is prone to configuration errors).
    By using reports you make sure the cicode always runs only on the report server process and if you would set [Report]RunStandby=0 it will only run in the primary report process, so not in parallel.
  • Erik--
    Thank you for the response. I see where the help file where cicode can be imbedded in a report definition with using {CICODE}.

    Mine is done differently though. The cicode being ran resides in a .ci file. The .ci file is contained in an included project, where the .ci file is usually the same name as the included project. For the report, its Report Name and Report File Format entries are usually called the same name as the .ci file, but not always. The function that is executed in the .ci file, is the first function defined.

    I am not able to tell what is controlling what function from what .ci file is ran.
    Thanks,
    Jacob
  • Jacob,

    The {CICODE} block in the report can call any (public) cicode function defined in your project and include projects (so the sum off all public functions in all *.ci files in your project+includes).
  • Erik--
    Thank you, I understand now. I finally see that there is a file with .rpt extension in the project that uses the format {CICODE} functions {END} to call the function.
    --Jacob