John -
The problem is accumulating the price values. To resolve this you have to do some changes in both Designer and Script side.
Steps to follow to make this to work:
Designer Side changes:
1) Drag one textbox as named TotalPrice and set Summary group to “GroupHeader1”
2) Go to the properties of txtPrice and make the visible value to False
Script Side Changes:
Write this code:
Sub GroupHeader1_BeforePrint
Dim strTotPrice As String = ReportUtilities.ReturnTextBoxValue(rpt,"GroupHeade r1","txtPrice")
Dim strQty As String = ReportUtilities.ReturnTextBoxValue(rpt,"GroupHeade r1","txtQuantity")
Dim strPrice As String=strQty*strTotPrice
ReportUtilities.SetTextBoxValue(rpt, "GroupHeader1","TotalPrice",strPrice)
End Sub
Publish and Run. Hope this will help.
- Bala
|