Solved

Crystal Month to Date by Parameter

Posted on 2006-10-23
4
683 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ActiveX Component can't create object ("crystal.crpe.application") 5 198
Grand Totals on Crystal Reports 7 43
Crystal image Object type? 7 34
Crystal Reports Version 7 4 27
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

810 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