Solved

Crystal Month to Date by Parameter

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to Bold a formula within another formula 4 47
Crystal Reports get subgroup count 1 69
Analyze Shared Variable? 7 42
sql views 3 50
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…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

738 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