Solved

Crystal Month to Date by Parameter

Posted on 2006-10-23
4
688 Views
Last Modified: 2008-02-01
Is there a way to use the MonthToDate function based on a parameter instead of the system date?

Currently I'm pulling information based on one week, I need to add a couple more entries one based on MTD, one on YTD, and finally the grand prize of LastYTD.

My weekly function looks like this:

if {JOB_CHRG.CHARGEDATE} in DateTime ({?Begining of Week}) to DateTime ({?End of Week})
and {@Billable Items}
then {JOB_CHRG.BILLAMT_LOC}
else 0

I need to use the end of Week parameter as my basis for the MTD and YTD calcuations.

Any help would be appreciated.
0
Comment
Question by:Alexziogas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 17793411
As far as I know no.

What is it you are trying to do?

Get the month through some provided date?
For example if I enter 15 Oct 2006 you want the monthly total up to 15 Oct?

For the MOnth through the end of the given week try using
 
if {JOB_CHRG.CHARGEDATE} in DateTime (Year({?End of Week}), Month({?End of Week}),1) to DateTime ({?End of Week})  and {@Billable Items}
then
    {JOB_CHRG.BILLAMT_LOC}
else
     0

Similarly for the YTD
 
if {JOB_CHRG.CHARGEDATE} in DateTime (Year({?End of Week}), 1,1) to DateTime ({?End of Week})  and {@Billable Items}
then
    {JOB_CHRG.BILLAMT_LOC}
else
     0

LastYear
if {JOB_CHRG.CHARGEDATE} in DateTime (Year({?End of Week})-1, 1,1) to DateTime (Year({?End of Week})-1, Month({?End of Week}),Day({?End of Week})) and {@Billable Items}
then
    {JOB_CHRG.BILLAMT_LOC}
else
     0

mlmcc
0
 
LVL 6

Expert Comment

by:Ken Turner
ID: 17794269
Here's a quote from the CR8.0 Help file for the MonthToDate function (and it's identical in CRXI):

"Note: If you would like to base the date range on a date other than today's date, you must either change the date via the Date/Time option in the Windows Control Panel, or change the report print date via the Set Print Date/Time command in the Report Menu."

Probably not the answer you're looking for!
0
 

Author Comment

by:Alexziogas
ID: 17796199
Thanks mlmcc!  That was exactly what I was looking for, thanks again.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 17796560
Glad i could help

mlmcc
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question