Solved

Crystal Month to Date by Parameter

Posted on 2006-10-23
4
680 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
  • 2
4 Comments
 
LVL 100

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 100

Expert Comment

by:mlmcc
ID: 17796560
Glad i could help

mlmcc
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now