Expand my Community achievements bar.

SOLVED

Calculation not showing in pdf

Avatar

Level 1

Hi!  Hopefully, someone can help me.  I made a grid that should show each lines sale total and in the second line it is not showing the total when you test the form in pdf preview.  All the calculations and everything look the same as the other lines that are showing the total.  Does anyone have any ideas on what would make a line not show a total when all the others do?  I have the form attached.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I do not know why it is happenin but if you change the binding on the total field to Normal it works just fine.

Paul

View solution in original post

7 Replies

Avatar

Correct answer by
Former Community Member

I do not know why it is happenin but if you change the binding on the total field to Normal it works just fine.

Paul

Avatar

Level 10

Paul beat me to it.

You have all of the fields on your form set to Global binding, which depending on what you are trying to do is probably not what you want. Global binding means that every field with the same name will get the same data.

Also (again depending on what exactly you're trying to accomplish with the form) there's an easier way to deal with tables and table calculations.

There's a good diagram in the help - search on "to perform calculations in a table" - basically if you let the table auto-number the rows (leave the Row1 name alone and when you duplicate the rows each subsequent Row1 will get an instance number after it e.g. Row1[1]) and leave your cells the same name (you don't need to rename them for every row) you can then use wildcards in your Total calculations and maintenance on your form will become much easier (in case fields get renamed, etc.).

Avatar

Level 1

Thanks for the info! I have it on the Global binding because I have 3 different forms and I want the information to automatically populate in the other forms. Does anyone know how you can make the print buttons print a specific page, not all of the pages?  

Avatar

Level 10

A caveat I'd add for the Global binding is the way you have it set up if someone changes a value on one of the other pages it will change the other references as well - if you don't want someone making changes on one of the other pages you should make the fields on those pages read only.

As for printing, xfa.host.print() is what you want.


This will print page 1:

For a list of the variables check the help under: Scripting > Scripting Reference > Scripting Methods > print

Avatar

Level 1

Thanks.  Ugh!  Now I am running into another problem!   I realized that my margin calculation wasn't right because I didn't have the garment costs in my formula.  Everytime I try to add it into my costs cell the program crashes!! I'm so close to being done!

Avatar

Former Community Member

Global binding only works in a a single form. It will not work across forms.

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----