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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grand Total help

Status
Not open for further replies.

ttechie

Technical User
Feb 11, 2005
56
IN
When I use this formula, I get

username TotalLines
mark 3001
lara 2545
lee 1005
-------
????
Can someone help me on how to get grand total?
thanks


--formula--
shared numberVar RowsThisRecord;
shared numberVar UserTotalRows;
shared numberVar TotalRows;
stringVar Result := '';
numberVar RowCount := int((len({MEDICAL_REPORT_OBJECT.MRO_TEXT}) / 65));
RowsThisRecord := RowCount;
TotalRows := TotalRows + RowsThisRecord;
UserTotalRows := UserTotalRows + RowsThisRecord;
numberVar i;
for i := 1 to RowCount do
(
Result := Result + mid({MEDICAL_REPORT_OBJECT.MRO_TEXT},(i*65) - 64, 65) + chr(10);
);
"Lines Recorded: " & RowsThisRecord & " " &"Total-:" & " " & TotalRows & chr(13) & Result;
 
Your formula would not return the display you show. Why don't you show what it really displays.

-LB
 
this is what i get:it shows user id , last name and total.
everything is working except i can't get grand total. Thanks for the help.
user id last name Totallines
5 mark 3001
20 lara 2545
23 lee 1005
45 mick 15
----------------
????
 
Sorry, your formula indicates the result would contain:

"Lines Recorded " and "Total-:"

This is what doesn't make sense to me. Plus you are referencing a shared variable, which suggests there might be a subreport someplace. Why don't you explain your overall report structure and where you have your formula placed.

-LB
 
Oh, Ok. For ex. "Lines Recorded " just shows
Lines Recorded "number of line user wrote" in this case 7. Then I add all of the user enteries that I add which adds to is "Total-:" ex 3001.
I have formula name @total it has
shared numberVar UserTotalRows;
I also have formula name @reset it has
shared numberVar UserTotalRows := 0;
shared numberVar GrandTotalRows := 0;



Let me know if you have question or I am still not clear.
thanks for the help!
 
sorry, in @rest it is
I also have formula name @reset it has
shared numberVar UserTotalRows := 0;
shared numberVar TotalRows := 0;
 
Ok, I guess I am not making any sense. I aguess What i am getting running total of users and i want grand total.

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top