I have a few forms that I print out that have unstored calculations on them. In RC8 they do not compute prior to printing and I end up printing out blank fields. Using the database.recalculate(foundset) I can force the calculation. Even though I have a work around this seems like something Servoy should be able to do automatically prior to printing a form.
I am having a problem with refreshing a stored calculation (and don’t know if it’s a problem described here or a programming error on my side). I have a stored calculation attributes_trimmed where the code is: return utils.stringReplace(attributes,‘\n’,‘’); i. e. it replaces new lines in a checkbox field (just for better/proper display in table view, where the attribute attributes (yeah, the attribute is called attributes, sorry for that) is not a checkbox field but a text field).
Now, when displaying the field on a form as checkbox field AND text field, the attribute attributes_trimmed won’t display when I check values in Attributes. I think I have to refresh the stored calculation and I set the property onDataChange to recalculate. The code in method recalculate is:
var current = forms.WaypointDetail.foundset.getSelectedIndex();
databaseManager.recalculate(current);
The problem is, the recalculation only takes place when I click on the forms background, i. e. do a commit.
Did others find a solution for that?
Best regards, Robert
PS: See content of field Attributes (above as text field, below as checkbox field and the stored calculation Trimmed Attributes). When committing, the stored attribute will show the correct content.