0

Help needed for dynamic print function

Hi, all!

I know this has been asked a million times, but I just can't seem to wrap my head around it. We all know Ninox is not the most user-friendly software ever and the help section is extreeeemly technical at times.

So, my problem is: After years of suffering under the built-in print functionality, I finally decided to want to switch to something that actually looks like a decently designed invoice (which is what I use Ninox for). I followed the help pages, created a test template (just to test before investing hours) - and it doesn't work. What I did:

1) created a .docx document with three simple lines

{d.Plattennummer}

{d.Titel}

{d.Sonstiges}

2) imported this into Ninox as dynamic layout

And... drumroll... nothing... Ninox just happily shows exactly the three lines, but nothing dynamic about it.

What am I doing wrong? 

Johanna

7 replies

null
    • Fred
    • 1 mth ago
    • Reported - view

    Did you run a test print?

    Ninox shows you what the template is not the final document filled in with data.

    You can also see my post about Carbone Studio. I found it to be really helpful when developing templates. The one thing you need to learn as well is how to create JSON datasets.

    It took me a bit of effort to start with dynamic printing, so stay with it and it will fall into place. Just remember that you are learning a second coding language (after Ninox) so give yourself time and space to learn it.

      • Johanna_Schmidt_Fotograf
      • 1 mth ago
      • Reported - view

       That's it - stupid Ninox doesn't show data in the preview. Why would it? That would make too much sense, I guess. Thank you!

      Just one more question: How do I get rid of the Carbone.io watermark in the background of my PDF?

      • Fred
      • 1 mth ago
      • Reported - view

      turn off test print.

      • Johanna_Schmidt_Fotograf
      • 1 mth ago
      • Reported - view

       Thank you! 

      • Fred
      • 1 mth ago
      • Reported - view

      If you are satisfied with the answer, please mark the post answered when you have a moment.

    • Rafael Sanchis
    • Rafael_Sanchis
    • 1 mth ago
    • Reported - view
    let vTbl := ((select Emisiones) order by Codigo_Transmittal);
    let vObj := vTbl.{
            vCtrl: Codigo_Transmittal,
            vDat1: format('Fecha Transmittal', "DD.MM.YYYY"),
            vDat: format('Fecha Emision', "DD.MM.YYYY"),
            vRva: format('Rev A', "DD.MM.YYYY"),
            vRvb: format('Rev B', "DD.MM.YYYY"),
            vRv0: format('Rev 0', "DD.MM.YYYY"),
            vDis: Disciplina,
            vTxt: Documento
        };
    let xArr := [{}];
    xArr := null;
    let xObj := {};
    for i from 0 to cnt(vObj) do
        xObj := item(vObj, number(i));
        if i = 0 then
            setItem(xObj, "vSkip", 1);
            xArr := array(xArr, [xObj])
        else
            if item(vObj, number(i - 1)).text(vCtrl) = item(vObj, number(i)).text(vCtrl) then
                setItem(xObj, "vSkip", 0);
                xArr := array(xArr, [xObj])
            else
                setItem(xObj, "vSkip", 1);
                xArr := array(xArr, [xObj])
            end
        end
    end;
    let pJson := {
            pName: "Rafael Sanchis",
            pCompany: "Vepica",
            pAdress: "Calle la Pedrera, Zona Industrial Guaicay",
            pCity: "Caracas",
            pMobile: "(+58) 212-822-8000",
            pTbl: xArr
        };
    " Generar y guardar el archivo PDF con los datos agrupados ";
    PDF := importFile(this, printAndSaveRecord(this, "JSONAgrupado", pJson), "ReporteFinal.pdf")

    Example output (The, script, the output, and the word example)

    • Fred
    • 1 mth ago
    • Reported - view
     said:
    stupid Ninox doesn't show data in the preview. Why would it? That would make too much sense, I guess.

    To be fair, Ninox is not actually processing the template and the data. Ninox is using the online print engine developed by Carbone. So Ninox is just storing the template, then when you click on print it sends the template and data to Carbone then the PDF comes back.

    Maybe in some future version of Ninox Carbone Studio will be built in so you can see a visual of your report with data.

Content aside

  • Status Answered
  • 1 mth agoLast active
  • 7Replies
  • 48Views
  • 3 Following