[WD21] Hidden calculations in reports do not work!?!?

Startbeitrag von Ola am 20.07.2017 10:31

Hi all,

Using the report editor I am doing a somewhat complicated query-based report which includes both visible automatic calculations on data fields and their break sums and total sums. These work OK.

Then I am also doing some "hidden" calculations in the "before printing body" code section, adding conditionally value to variables defined in the report's beginning section, whose results are not shown on row level, but only in the "End of document block".

Everything works fine EXCEPT that the hidden calculations done before printing the last body row of the report are NOT executed or taken into consideration; the values of the last body row are excluded from the totals shown in the "End of document block"!

How can I get also the last body row included in the hidden calculation results?
Any hints/tips will be appreciated.

Best regards


Hi ola

I think this is the same problem I have had a number of times. Sometimes resolved by putting the variable 'again' in the before printing method of the control. MyControl = MyControl which forces it to refresh and this gets it to include the last calc.

Another painful bug

von Mark Crichton - am 20.07.2017 10:46
Thanks Mark,

Your hint saved my day!:spos:

I had trusted that PCSoft can do the calculations correctly and in the right order, so I had linked the final display fields to the report variables that were calculated in the before printing body section. The linking does not seem to work with the last body row, so I moved the calculation results to the final display fields "manually" in the body code, and removed the links.

I wonder whether this bug has been fixed in WD22?:rolleyes:

Best regards

von Ola - am 20.07.2017 11:47
Pleasure :cheers:

von Mark Crichton - am 20.07.2017 20:24
Hi all,

Just a heads-up on linking report fields to report variable.

I made some more testing with report fields linked to report variables. This bug seems to be more or less systematic. Whenever an end result field is linked to a report variable (I am not talking about file or query items but report variables defined in the report init section), the values printed in the last body row are simply skipped and consequently the end result is wrong.

The solution is not to link link report fields to report variables; they should be updated by code in the body (or break etc...) section.

And this is not nearly the worst problem in WD's report editor...

Best regards

von Ola - am 24.07.2017 10:59
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.