Calculations and printing.

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.

John McCann

It seems we missed this post, is this still the case? do you have a sample solution if this is not yet resolved in the final release?

Affirmative for me!
I have the same troubles with unstored calculations on 2.2 / java 1.5

Do you have sample solution demonstrating this?

Hmmm… do we have the same or a similar problem - mine’s induced by a calc which has moved as part of “printSliding”? See http://forum.servoy.com/viewtopic.php?t=5362

Regards,
Neale.

Hi All

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.

I just updated to the latest beta, and my stored calculations show up and dissapper when opening a FID.

Sometimes they are there, and if I switch to a different record and back, then they appear again.

It seems to be very sporatic, I just switched versions 20 minutes ago, and this problem just showed up.

Servoy Developer
Version R2 2.2.3-build 335
Java version 1.4.2_04-b05 (Windows XP)