Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Sum, Grouped by date Post Reply Post New Topic
<< Prev Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 May 2018 at 8:53am
to be clear, they do want them counted in more than one place? so a 5 minute row is counted in both <15 and <60...and they want to see duplicated data inside the same total % chart?
IP IP Logged
jdclover
Newbie
Newbie
Avatar

Joined: 15 May 2018
Location: United States
Online Status: Offline
Posts: 8
Quote jdclover Replybullet Posted: 25 May 2018 at 9:07am
Yeah, they do want them showing up in more than one place. I double checked that with them to make sure.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 May 2018 at 9:30am
I'd lean towards maybe a union statement for the data source to create the multiple rows as that are needed for this multiple grouping or maybe go with a sub-report for only the chart.
IP IP Logged
jdclover
Newbie
Newbie
Avatar

Joined: 15 May 2018
Location: United States
Online Status: Offline
Posts: 8
Quote jdclover Replybullet Posted: 25 May 2018 at 9:43am
Yeah I'm thinking sub-report. Thank you for going over this with me though, I appreciate the help.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 May 2018 at 9:45am
No problem.
If I think of something else I'll post it, or maybe someone else will chime in. Good luck.
IP IP Logged
jpdev
Newbie
Newbie
Avatar

Joined: 29 May 2018
Location: United States
Online Status: Offline
Posts: 1
Quote jpdev Replybullet Posted: 29 May 2018 at 11:14am
JDClover - How does the % calculation work column by column? I'm trying to do the same thing but can't get it to work. RE: % of call under 15 Min. Each day you have a different percentage. But I need it monthly.

Thank you in advance.
IP IP Logged
jdclover
Newbie
Newbie
Avatar

Joined: 15 May 2018
Location: United States
Online Status: Offline
Posts: 8
Quote jdclover Replybullet Posted: 31 May 2018 at 11:59am
My report prompts for a start and stop date. Based on the difference between those days, different dates are output.
So if a week or less, I report each day;
under a month, I report each week;
under a year, I report each month;
over a year, I report each year;

so here's the example:

        if datediff('d',{?Start Date},{?End Date})<8
            then totext(date({Command.CALL_INSTANT}), 'MM-dd-yy')
        else if datediff('d',{?Start Date},{?End Date}) in [8 to 30]
            then totext(dateadd("ww",datepart("ww",{Command.CALL_INSTANT})-1,date(year({Command.CALL_INSTANT}),1,1) - dayofweek(date(year({Command.CALL_INSTANT}),1,1)+0)), 'MM-dd-yy')
        else if datediff('d',{?Start Date},{?End Date}) in [31 to 365]
            then totext(date(year({Command.CALL_INSTANT}), month({Command.CALL_INSTANT}),1), 'MM-dd-yy')
        else if datediff('d',{?Start Date},{?End Date}) > 365
            then totext(date(year({Command.CALL_INSTANT}),1,1), 'MM-dd-yy')

if you wanted it to do it by month, you'd care about this portion:
        else if datediff('d',{?Start Date},{?End Date}) in [31 to 365]
            then totext(date(year({Command.CALL_INSTANT}), month({Command.CALL_INSTANT}),1), 'MM-dd-yy')

but I'm only using the code above because I want things to change based on how many days of data I'm pulling, if you're just using a date/time column, you can have it display by month by going into the chart expert and under columns if you have your date highlight it and choose group options and then under "The column will be printed", choose "for each month".
IP IP Logged
<< Prev Page  of 2
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.