Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: its urgent Post Reply Post New Topic
Page  of 5 Next >>
Author Message
neha_patel
Groupie
Groupie
Avatar

Joined: 06 Oct 2010
Location: United States
Online Status: Offline
Posts: 44
Quote neha_patel Replybullet Topic: its urgent
    Posted: 07 Oct 2010 at 7:12am
hey can please some one help me........
 
my problem is i have one field in my sql db that is visitor... and i have date field also thr..... i have to take two date ranges and have to group by data with site name..... and according to date have to count how many visitors was thr on tht site during that dates.....
 
i am doing that with formula....
 
if({Visitor_info.Date}in({?CFromDate}to{?CTodate})) then
Sum ({Visitor_info.DailyUnique}, {Site_Info.Site_Name})
 
for one date and same foe second only parameter is diffrent..... but its giving me total number.....
 
please help me some expert i have to finish this  today evening.......
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2010 at 8:05am
you cannot do condtional sums
use a Running total.
field to sumamrize={Visitor_info.DailyUnique}
type=SUM
evaluate=use a formula
{Visitor_info.Date}in({?CFromDate}to{?CTodate}
reset=on a group ({Site_Info.Site_Name})
place in {Site_Info.Site_Name} footer
 
IP IP Logged
neha_patel
Groupie
Groupie
Avatar

Joined: 06 Oct 2010
Location: United States
Online Status: Offline
Posts: 44
Quote neha_patel Replybullet Posted: 07 Oct 2010 at 8:32am
thanks for your reply..... i did try this but in running total its adding that value to next record.... see my problem is....
 
i have couple of site name and site id in my one table and have visitor info in second tabel.....
 
i have to create report and give two date ranges
for both range i have to fetch data from table and have to do group by site name and for that site i have to display data in two diffrent columns and at last have to display total of this two field.... and in other fields i have to do comparission between this two fields..... so may be this running total will not work..... please help me....... i really appriciate it.........
IP IP Logged
neha_patel
Groupie
Groupie
Avatar

Joined: 06 Oct 2010
Location: United States
Online Status: Offline
Posts: 44
Quote neha_patel Replybullet Posted: 07 Oct 2010 at 8:50am
i did this with formula as i told before
 
if({Visitor_info.Date}in({?CFromDate}to{?CTodate})) then
Sum ({Visitor_info.DailyUnique}, {Site_Info.Site_Name})
 
its giving me result but the thing is when date is in range its not checking all dates for this site.... once date is match its calculating all visitor for that site.......
 
i want total withing given range only......
 
please help me some one time is running.....
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2010 at 9:02am
i do not understand your design.
as i said before you cannot do condtional sums.
Likely multiple RTS will work.
 
Originally posted by neha_patel

i have to do group by site name and for that site i have to display data in two diffrent columns
create a group on the sitename
create 2 running totals to display each summation based on your 2 sets of params
you can also create a formula field to compare these summaries at the group level
Originally posted by neha_patel

and at last have to display total of this two field....
create 2 more RTS that are the exact same as your others (group totals)but they are not set to reset on the group (same thing as adding all the group level rts togther).


Edited by DBlank - 07 Oct 2010 at 9:03am
IP IP Logged
neha_patel
Groupie
Groupie
Avatar

Joined: 06 Oct 2010
Location: United States
Online Status: Offline
Posts: 44
Quote neha_patel Replybullet Posted: 07 Oct 2010 at 9:14am
what i am telling you is running total is giving me like this
if i have 4 site macy's,khols,kmart,target and if i am displaying total visitor's for each site within date thn.....
 
macy's 100 this is correct
khols   400+macy's100 means 500 which is wrong
 
kmart   300+500 from above.... which is wrong.....
target 100+800 from above
 
its giving me like this.....
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2010 at 9:23am
Did you group on the store name?
Did you set the Running total Reset value to = On cange opf Group (Store name)?


Edited by DBlank - 07 Oct 2010 at 9:24am
IP IP Logged
neha_patel
Groupie
Groupie
Avatar

Joined: 06 Oct 2010
Location: United States
Online Status: Offline
Posts: 44
Quote neha_patel Replybullet Posted: 07 Oct 2010 at 9:24am
I dnt knw how to do that can you please tell me???
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Oct 2010 at 9:25am
which part?
IP IP Logged
neha_patel
Groupie
Groupie
Avatar

Joined: 06 Oct 2010
Location: United States
Online Status: Offline
Posts: 44
Quote neha_patel Replybullet Posted: 07 Oct 2010 at 9:26am
Did you set the Running total Reset value to = On cange opf Group (Store name)?
IP IP Logged
Page  of 5 Next >>
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.