Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - in row calculation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

in row calculation

 Post Reply Post Reply
Author
Message
skiman View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Location: Belgium
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote skiman Quote  Post ReplyReply Direct Link To This Post Topic: in row calculation
    Posted: 21 August 2015 at 4:57am
Hi,

I'm trying to use some in row calculation.

I have three columns:
Description, Quantity, Unit price.

I want to add another column: 'Total', And I added an extra item to each record.
oItem := oRecord:AddItem("")
oItem:format := "%.2f"
oItem:formula := "C1*C2"
oItem:caption := "x"

I expected/hoped that the result of this item would be shown in my new column. In my column the 'x' is shown?

Another way would be to have a formula for a Column. I was thinking of using the TAG property to put my formula in.

Any suggestions for this?

ABO Service
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2015 at 6:58am
Hello Chris,

Pattern for property "formula" is
SUMSUB(R#C#:R#C#) or SUM(R#C#:R#C#) 

R is row index and C is column index and  * instead of # - means all rows or columns

see "Formula Property" in documentation
C:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v16.4.0\Help\SymbolReference.chm

So on setting caption: If formula is correct  then caption of ReportRecordItem  replaced with result  else caption text used. So to update text of item with formula you need to set any caption even empty string.

Regards,
 Oleksandr Lebed 
Back to Top
skiman View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Location: Belgium
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote skiman Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2015 at 7:16am
Hi,

I don't want to make a SUM, but I want to multiply two columns. I was expecting that C3*C4 would give me the result.

If C3 = 5 and C4 = 20 then C3*C4 would be 100.

With sumsub I can make subtotals on the grouprow, but I need a multiplication on a row.
ABO Service
Back to Top
skiman View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Location: Belgium
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote skiman Quote  Post ReplyReply Direct Link To This Post Posted: 31 August 2015 at 4:50am
With sumsub I can make subtotals on the grouprow, but I need a multiplication on a row.

In fact, I want to have a formula for a record:item.

I would like to have the possibility to add columns, and to define the formula for that column. I would add the item for each row, and to insert the value in that item. A value which is calculated according to a new formula.

The item has the formula property, so I would expect it can be used?
ABO Service
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.