Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: SubTotal Post Reply Post New Topic
Author Message
Rajasekharsv
Newbie
Newbie


Joined: 15 Jul 2010
Online Status: Offline
Posts: 9
Quote Rajasekharsv Replybullet Topic: SubTotal
     Posted: 26 Jul 2010 at 8:23pm
Hi, i want to modify the report in the below describe formula
i am getting result from the query is sum of amount which is against usercodes and also i have the column numlevel which is also against the usercodes.
here column numlevel contains the values 1 to 5.
now i want here the sum of amount whos usercodes which is under numlevel2.
i.e, the usercode of numlevel 5 is under usercode of numlevel4,the usercode of numlevel 4 is under usercode of numlevel3 and the usercode of numlevel 3 is under usercode of numlevel2 ,
Now i want the sum of amount , usercodes whos numlevel is 3,4 and 5 which is under the usercode, having numlevel value is 2
 
Please help me
 
thanks in advance
Sv
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 27 Jul 2010 at 3:10am
in detail section:
shared numbervar aSum;
if {table.userLevel}>2 then
  aSum := aSum + {table.field}
 
"" //hides the result
 
in group header:
shared numbervar aSum :=0;
""
 
in group footer
shared numbervar aSum
 
HTH
 
IP IP Logged
Rajasekharsv
Newbie
Newbie


Joined: 15 Jul 2010
Online Status: Offline
Posts: 9
Quote Rajasekharsv Replybullet Posted: 27 Jul 2010 at 7:06pm
Thanks for responding,
 i want this report in asp.net,
what should i group,already it was grouped by other field name main users,in that the userlevels are included,
please explain detailly.
actually the report is as follows
MainUser(GroupHeader)
  Usercode(userlevel2)                        
      Usercode(userlevel3)                        Amount                  A
      Usercode(userlevel3)                        Amount                  A
              Usercode(userlevel4)                        Amount          B
  Usercode(userlevel2)                        
      Usercode(userlevel3)                        Amount                  A1
      Usercode(userlevel3)                        Amount                  A1
              Usercode(userlevel4)                        Amount          B1
 Group footer-------------------------------------     Total--(A+A+B+A1+A1+B1)
 
Now i want the report in the following format
 
mainuser(GroupHeader)
  Usercode(userlevel2)                        ------------------(A+A+B)
      Usercode(userlevel3)                        Amount                  A
      Usercode(userlevel3)                        Amount                  A
              Usercode(userlevel4)                        Amount          B
  Usercode(userlevel2)                        ------------------(A1+A1+B1)
      Usercode(userlevel3)                        Amount                  A1
      Usercode(userlevel3)                        Amount                  A1
              Usercode(userlevel4)                        Amount          B1
 Group footer-------------------------------------     Total--(A+A+B+A1+A1+B1)
 
Please help me
Thanks,
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum