Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access value in a different group

Status
Not open for further replies.

mirage10

Programmer
May 18, 2005
38
US
I have grp1,grp2 on the report.

i want the following on group footer 1 -
grp1

sum(fields!fld.value,"grp2").

meaning i want to access the summary per grp2 on grp1.

when i put the above formula i get the following err message

"The value expression for the textbox ‘textbox7’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a data set."

i tried to access using reportitems!<textbox>.value

still get the same message..

pl. advise.




------------------------------------------
A Man can be only as happy.. as he makes up his mind to be
 
try specifying the dataset scope in the SUM function. for example, you have SUM(fields!fld.Value, "grp2"), try changing it to SUM(fields!fld.Value, "datasetname")
 
Hi,
I was able to figure this out -

wrote this code -
in code section.

public Dim calc1 As integer

Public Function getCashlogAmt(inpAmt as integer)

calc1 =inpAmt
return calc1
end function


in grp2 i passed the sum -

=code.getCashlogAmt( sum(Fields!fld.Value,"grp2"))


in grp1 accessed it -
= code.getCashlogAmt(last(Fields!check_amt.Value)-code.calc1)


basically i stored the value from grp2 in a variable
and accessed that variable in grp1.

------------------------------------------
A Man can be only as happy.. as he makes up his mind to be
 
No,.. above code doesnt work..

unclerico .. when i say SUM(fields!fld.Value, "datasetname") it gives me the grand total.. but i want the total pertaining to that grp.


------------------------------------------
A Man can be only as happy.. as he makes up his mind to be
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top