Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Summing Issue Post Reply Post New Topic
<< Prev Page  of 5 Next >>
Author Message
cheryla
Groupie
Groupie


Joined: 23 Oct 2013
Online Status: Offline
Posts: 51
Quote cheryla Replybullet Posted: 25 Oct 2013 at 4:31am

Yes that sounds correct.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Oct 2013 at 4:44am
you can use a
1. stored procedure with run time parameters or
2. a crystal command with run time parameters or
3. a group select
 
optiosn 1 and two are more efficient but require more techincal skill and possibly rights tio the DB you so not have.
option 3 is less efficient but easier.
your choice
 
Update: The run time parameters are assuming you want to be able to change your date range each time you run the report.


Edited by DBlank - 25 Oct 2013 at 4:45am
IP IP Logged
cheryla
Groupie
Groupie


Joined: 23 Oct 2013
Online Status: Offline
Posts: 51
Quote cheryla Replybullet Posted: 25 Oct 2013 at 4:49am
ok tyvm I will look into these options. appreciate the help!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Oct 2013 at 5:17am
i or someone else can help you with any of the options if you need it.
just wanted to make sure you picked which one works for your set up.
IP IP Logged
cheryla
Groupie
Groupie


Joined: 23 Oct 2013
Online Status: Offline
Posts: 51
Quote cheryla Replybullet Posted: 28 Oct 2013 at 4:45am
I think it would be best to try the 3rd option (easier). getting into permissions, etc can get tricky.
 
This report would need to be able to run with different dates each time. I believe it will be run once a month but not for sure on this as the user may change their mind on how they want to use it.
 
Please advise how I can solve this issue with the date info.
 
Thanks again for your help.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Oct 2013 at 4:59am
creaet a start date and end date param.
ifyou want to hard code these to the last month youc an chaneg it, either wise you will want to use 2 paramters fields as date types
 
create a formula field as
//groupflag 
if {PURCHASE_ORDER.DESIRED_RECV_DATE}  in {?startdate} to {?enddate} then 1
sum this at the group PO level
any group hat has a value >0 has at least one row of data that falls in your run time parameter dates so you can use this to do a group select
open the select expert and expans it to show formula if it is not already
select the 'group selection' radio button
add your group selection here
sum(groupflag,po)>0
 
This measn you are always pulling in all of your PO rows first, grouping and then doing a group select (not efficient). If you have a way to limit the data on PO that you know will not meet your group selection use it too as it will speed thing up.
Also note that all groups still appear in your group tree even if they do not appear in the report (omitted via the group select). The group tree is created before the group select is applied.
summarization formulas are applied to all of the data (hence the ability to use it in the group select statement) but Running Totals and variable formulas should only be applied to data that 'is left' after the group select is applied.
IP IP Logged
cheryla
Groupie
Groupie


Joined: 23 Oct 2013
Online Status: Offline
Posts: 51
Quote cheryla Replybullet Posted: 28 Oct 2013 at 6:40am
I already had parameters set up for beg date and end dates. I created the "groupflag" formula as suggested and entered into my group footer for my po level. It looks like every po has a one now.
 
I then opened the select expert and clicked on radial button. I'm questioning the formula that you used. sum(groupflag,po)>0
 
I don't seem to have an option for the po part of this. Could I have placed it in the wrong area? So for now I entered sum((@groupflag))>0
 
I'm not seeing anything different for now.
 
Please advise what I'm missing. Thanks!!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Oct 2013 at 6:58am
1. I forgot to mention you have to remove the date condition from the 'record select' statement. If you don't remove that then youa re not expanding your overall data set to look past the range (this is why 'every group seems to have one').
 
2. don't just drop the 'groupflag' formula field onto your group footer, you have to insert a summary using that formula field.
select the summary button (blue sigma/E)
use the flag formula as the field to sumamrize
set it to a sum
summary location as the group footer (for the po group)
 
once you create it will appear on your group footer
if you select it on your group footer then click on the select expert button it will be the default field to be used
set it to 'is greater than' and enter "0" in the value
IP IP Logged
cheryla
Groupie
Groupie


Joined: 23 Oct 2013
Online Status: Offline
Posts: 51
Quote cheryla Replybullet Posted: 28 Oct 2013 at 7:06am
ok I will try this and let you know thx!!
IP IP Logged
cheryla
Groupie
Groupie


Joined: 23 Oct 2013
Online Status: Offline
Posts: 51
Quote cheryla Replybullet Posted: 28 Oct 2013 at 8:02am

Ok I'm more confused. I deleted the select expert formula that select the info per the date range asked for by user. I summed up the groupflag into the group footer as noted. I then went into select expert under group selections and entered sum (0">{@groupflag})>0.

 
when I run the report it is still asking me for a date range (which I enter) then it is giving me all kinds of data  form dates I don't need to see. It looks like the sum groupflag formula is adding up each receivng line of the po (over all po lines). How do I get the report not to show me all the info not within my date range?


Edited by cheryla - 28 Oct 2013 at 8:05am
IP IP Logged
<< Prev 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.016 seconds.