by Izertis

Create documents in docx, xlsx (MS Office Word and Excel), odt, ods (LibreOffice and OpenOffice) and pdf format without MS Office or others plugins installed from any module and subpanel using templates.

Includes a 30 day guarantee
Try it Now

By clicking you consent to share your profile with the developer

#1689 - Merging data into the header/footer

Closed General Question created by rdouglas 8 years ago

Hi, is there any way to merge data into the header/footer areas of a Word document template? And does the module support merging into Text boxes with MS Word?

Thanks for your time and patience

  1. dharma member avatar

    Izertis Provider

    8 years ago

    Hi there,

    In the header and footer you only can user global variables of Sugar, variables like [onshow.xxx]. You can not use fields from the dataset of the document.

    For example, to show the global variable of Sugar “current_user”, you can put the variable [onshow.current_user.full_name] (this is equivalent to $GLOBALS['current_user']->full_name value). Other example is [onshow.sugar_version]

    If you need a variable which is not a Sugar global variable, you can create an event into the calculated fields of your module like the next example:

    function BeforeMergeBlock() {
    $GLOBALS['TemplateCurrentUserName'] = $GLOBALS['current_user']->full_name; }

    With this code you can use the variable [onshow.TemplateCurrentUserName] variable into the header or the footer

    And yes, MMR supports merging into text boexes with MS Word.

    I hope this help you.

    Regards

    Anabel

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
  • "The single biggest downfall of the community edition of SugarCRM or SuiteCRM is the lack of creating a report form a custom module for a single event...." - ian

    Read More Reviews