Okay
  Public Ticket #1389348
DOCX templates
Closed

Comments

  • ferdybassi started the conversation

    I have a wpdatatable with some fields, eg:

    id, name, surname, city

    I need to:

    1) filter only one row using wpdatatable filters (I did it by filtering ID, which is unique)

    2) create doc report of that row, eg to print label for delivery

    I didn't understand if I have to use: ${name} or ${name.all} or whatever else.

    The only code that works is ${name.name} that shows the name of the column.

    Thank you.

  • [deleted] replied

    Hi ferdybassi,
    Thank you for the purchase.

    What kind of Report are you using? Word or Excel. You should use ${name.all} but because you just filter one row it will generate just that row in the report.

  • ferdybassi replied

    Hi, it was a DOCX file.

    I'll try again from a scratch document later and I'll let you know.

    Thank you

  • ferdybassi replied

    Hi, 

    I'm not able to get out from this problem. My DOCX template doesn't work.

    I have a view in PHPMyAdmin, which is used to build a wpDataTable.

    The query for the table is as follow:

    SELECT rapporti_elenco.id_rapporto,
           rapporti_elenco.numero,
           rapporti_elenco.anno,
           rapporti_elenco.data,
           rapporti_elenco.ora_inizio,
           rapporti_elenco.ora_fine,
           rapporti_elenco.ore_emi,
           rapporti_elenco.saldo_emi,
           rapporti_elenco.ore_dedicato,
           rapporti_elenco.saldo_dedicato,
           rapporti_elenco.descrizione_intervento,
           rapporti_elenco.materiale,
           rapporti_elenco.euro_addebito,
           rapporti_elenco.euro_orario,
           rapporti_elenco.euro_ore,
           rapporti_elenco.url_modifica,
           rapporti_elenco.url_rapporto,
           rapporti_elenco.stato,
           rapporti_elenco.addebito,
           rapporti_elenco.luogo,
           rapporti_elenco.tipo,
           rapporti_elenco.nome_cognome,
           rapporti_elenco.iniziali,
           rapporti_elenco.denominazione,
           rapporti_elenco.indirizzo,
           rapporti_elenco.citta,
           rapporti_elenco.provincia,
           rapporti_elenco.email
    FROM rapporti_elenco

    rapporti_elenco is the phpmyadmin view. The wpDataTable is working great.

    Template is attached.

  • [deleted] replied

    Hi ferdybassi,

    Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check PRIVATE so nobody can see it except us.

  •   ferdybassi replied privately
  • [deleted] replied

    Hi ,

    When you are creating  ZIP with multiple files for each row Generation logic, you have to create different template. For example in your template file for variables you have to use ${nome_cognome}  instead of ${nome_cognome.all}. Please take a look at this documentation page Creating a bulk Word DOCX Report with Multiple Files where template generation logic is same as on your report.

    Also in the attachment there is a template for the table from documentation.

  • ferdybassi replied

    Hi,

    I finally got the problem.

    Template doesn't work if the data source table contains a field with HTML tags, no matter which template I use.

    I tried with my original template (the one I attached) and it works if I delete the ${field} which contains <p> and <br/>.

    I have some fields with HTML tags because I use a form generator that let input text by FCKeditor.

  • [deleted] replied

    Hi ferdybassi,

    I am glad that you have managed to resolve the issue. If you have anymore questions don't hesitate to ask.