0

Dynamic Reports

Trying to create a table of check using a WORD document with no success at all so far.  The first screenshot is the Word table with fields which I believe is correct.
 

 

This is a screen shot of the table and fields.
SYSTEM is a Choice field
CATEGORY is straight text
NOTES likewise.

 The report resides in another table where using a Dynamic Multiple Choice field I make my selections thus.
 

 No data is being printed at all.
Any pointers please?
I have struggled with Dynamic Reports no end but I am determined to get this sorted.

Muchos Gracias!

16 replies

null
    • Fred
    • 10 mths ago
    • Reported - view

    I think you need to put the [i] after d.

    {d[i].SYSTEM}

    Then the 2nd line would be:

    {d[i+1].SYSTEM}

    Since SYSTEM, CATEGORY, AND NOTES are fields in a record, each line is a record then the data in the record.

    Here is my form:

    and this is what is looks like:

    Ninox seems to be pushing people to use JSON when doing dynamic printing, and from my experimentation I would agree. I too ran into your issue. When I try to print a field called CurrentTeamName I would get nothing, but once I switch to JSON it started to work.

    The code for the above is:

    let x := (select Teams where League = 2);
    x.{
        TeamName: CurrentTeamName
    }

    Good luck.

    • Alan_Cooke
    • 10 mths ago
    • Reported - view

    Clearly, I have something correct.
     

    Fields:

    But no data and row upon one is spite of selecting one record. 

    Report is in LOCATIONS and called from there.

     


    Where/how do I use the JSON?  This will be a first for me.

      • Alan_Cooke
      • 10 mths ago
      • Reported - view

       The Ninox report engine for above
       

    • Fred
    • 10 mths ago
    • Reported - view
     said:
    Where/how do I use the JSON?  This will be a first for me.

     Under Test Print there is a switch for Custom JSON, flip it on.

    Then click on the Fx button. For some reason clicking on blank field does nothing.

    Then type in your code.

    To create a JSON you only need to use the curly brackets { }.

    Like in my example previously, I put in a variable a select to get a subset of records. Then I created my JSON.

    If you only want to create a JSON for the current record you can just use the curly brackets.

    {
    jsonName1: fieldname1,
    jsonName2: sum(referencefield.number),
    }

    The nice thing about using the JSON is that you can create fields that pull data from anywhere in your DB and add it to your print. You can create your own subtables as well.

    let otherTableData := select otherTable
    {
    jsonName1: fieldname1,
    jsonName2: sum(referencefield.number),
    jsonName5: count(otherTableData),
    jsonSubTable: for loop1 in (a select or a reference field) do
        {
            jsonName3: loop1.fieldname3,
            jsonName4: loop1.fieldname4
        }
    }

    So I have something like this as a word file, notice the subtable in the table:

    And my code looks like:

    let x := (select Ingredients);
    x.{
        jIngredient: Ingredient,
        jCost: Cost,
        jActivity: for loop1 in Activity do
            {
                jAction: loop1.Action,
                jQuantity: loop1.Quantity
            }
        end
    }

    And this is my output:

    You can also reference Carbone's documentation for help as well.

      • Alan_Cooke
      • 10 mths ago
      • Reported - view

       Thanks very much for all the help Fred, I will have a go at tackling the learning curve.

    • Rafael Sanchis
    • Rafael_Sanchis
    • 10 mths ago
    • Reported - view

    As a First try this would be correct ?

    Can't see anything

      • Fred
      • 10 mths ago
      • Reported - view

      carbone does not like spaces in names. Please see my previous comments about using JSON and Ninox's recommendation in this post.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 10 mths ago
      • Reported - view

       

      My first tried

      • Fred
      • 10 mths ago
      • Reported - view

      can you show your JSON code and your word doc so others can see what you did?

      • Rafael Sanchis
      • Rafael_Sanchis
      • 10 mths ago
      • Reported - view

       

      Yes too simple

      let x := (select 'Booking Time');
      x.{
          First_Name: First_Name,
          Last_Name: Last_Name,
          Booking_Cod: Booking_Cod,
          C_Hours: C_Hours
      }

      • Rafael Sanchis
      • Rafael_Sanchis
      • 10 mths ago
      • Reported - view

      I will like to group by First_Name is possible ?

      • Rafael Sanchis
      • Rafael_Sanchis
      • 10 mths ago
      • Reported - view

      Another simple example.

      • Fred
      • 10 mths ago
      • Reported - view

       add “order by JSONfieldname” at the end of your JSON, after the closing curly bracket.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 10 mths ago
      • Reported - view

       

      👍

      • Rafael Sanchis
      • Rafael_Sanchis
      • 10 mths ago
      • Reported - view

       Hi Fred.

      The are some way to sum the Hours by Last Name inside the code

      let x := (select 'Booking Time');
      x.{
          First_Name: First_Name,
          Last_Name: Last_Name,
          Booking_Cod: Booking_Cod,
          C_Hours: C_Hours
      }
      
    • Kruna
    • 10 mths ago
    • Reported - view

    I would love to use dynamic printing and tried a lot to make it work, but unfortunately our CI font is not supported and there’s no way at all to include it.

    So I have two options - change CI font or stay with ninox Print engine…Iam struggling with both 😵

Content aside

  • 10 mths agoLast active
  • 16Replies
  • 151Views
  • 4 Following