Examples of template attributes?

(2 posts) (2 voices)

Tags:

  1. duane, Member

    Hi. In the template documentation it mentions the following commands:

    > select 'dbr.template', '#template' | 'row template code' | 'header template code', 'row template code', 'footer template code', [ 'template_class' | 'none' ]
    > select 'dbr.template.header', data1[, data2[...]]
    > select 'dbr.template.footer', data1[, data2[...]]

    ...but the documentation isn't quite clear on how the options beyond the basics can be used. So my questions are:

    1) For the template call
    > select 'dbr.template', '#template' | 'row template code' | 'header template code', 'row template code', 'footer template code', [ 'template_class' | 'none' ]

    What are the 3/4 ' template code' variables for? Formatting? Something else?

    2) For the header/footer commands
    > select 'dbr.template.header', data1[, data2[...]]
    > select 'dbr.template.footer', data1[, data2[...]]

    The examples you give for the 'data' are (a) static or (b) in-built functions like now(). Can procedures be used as well?

    Thanks!

  2. myDBR Team, Key Master

    What are the 3/4 ' template code' variables for? Formatting? Something else?

    The 'row template code' and 'header template code' etc are there for compatibility to old code. Instead of using defined templates one was able to create a dynamic template directly in the report without defining them in templates (the 'header template code' is the same code that is stored in the templates).

    The usage of this is not recommended anymore as it leads to more complex code and increases maintenance work. You better use the normal templates.

    > select 'dbr.template.header', data1[, data2[...]]
    > select 'dbr.template.footer', data1[, data2[...]]

    The examples you give for the 'data' are (a) static or (b) in-built functions like now(). Can procedures be used as well?

    You can generate this command + data anyway you like. As the header and the footer occurs in the template only once, the values are single values. Where those values come from, does not matter.

    --
    myDBR Team


Reply

You must log in to post.