cancel
Showing results for 
Search instead for 
Did you mean: 

Count in matrix

Former Member
0 Kudos

Hi,

In matrix i have a field status if i have 5 no's of 'A' in that column and 4 no's of 'N' in that column. In header i should get value 5 in Accepted text box and value 4 in rejected text box. Plz give me a solution for it.

Madhavi

Accepted Solutions (1)

Accepted Solutions (1)

Nussi
Active Contributor
0 Kudos

Hi Madhavi,

you have to go through all columns and look if the columns have a N or A.

than set the column title with the result.

i create a short vb6 sample for you


for i = 1 to oForm.Items.item("mtxList").Specific.RowCount
  if InStr(oForm.Items.item("mtxUID").Specific.Columns.item("ColUID").Cells(i).Specific.Value,"A") > 0 then
       ACounter = ACounter + 1
  end if
next i

oForm.Items.item("mtxUID").Specific.Columns.item("ColUID").TitleObject.Caption = Cstr(ACounter)

this should help you

lg David

Former Member
0 Kudos

Thanks for ur help david in which part i should write this code.

Nussi
Active Contributor
0 Kudos

Hi,

i would include it in the itemevent handler.

it's up to you what you do with this logic.

maybe create a button "Calculate" in this form and

catch when the buttons is pressed.

if pval.EventType = et_ITEM_PRESSED and pval.itemuid="btnCalc" and pval.beforeaction = false then

' count the columns and set the title

lg David

Former Member
0 Kudos

Thanks david its working well

Former Member
0 Kudos

Hi David,

In this code the title of that column also change as numeric like 0,1 while it comes into loop. Plz give me solution avoid the text changing in the title of the column 'Status'.

Madhavi

Former Member
0 Kudos

I commented the title object now its working sorry without noticing it i posted the question

Answers (0)