Report - calculate field in current row based on value from previous row

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Sep 16, 2013
Company:

Hello

Example of results after generate report action:

Row 1: 100 | 20 | calculate value = 100 - 20 = 80
Row 2: calculate value form above (80) | 60 | 80 - 60 = 20
Row 3: calculate value form above (20) | 10 | 20 - 10 = 10

etc...

Is any way to achive a result such above dynamically calculations based on value from previous row on report?

Thanks in advance

Christoph

 
#2
People who like this:1Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

Dear kris,

To implement such dynamic calculation in your report, you can build it via the Data Composition System and use a construction like this in the report:

Code
EvalExpression("SUM(<FieldName>)" , , , "First", "Current")


A sample report that implements such functionality is attached.

Best regards,
Vladimir Gurov

1C Company support team
 
#3
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Sep 16, 2013
Company:

Hello,

Vladimir, it works perfectly. Thank you.

Best regards,
Kris

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.