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
-
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.
-
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. -
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.
-
As a First try this would be correct ?
Can't see anything
-
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
- 148Views
-
4
Following