Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Help with Multiple Date Needs Post Reply Post New Topic
Author Message
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Topic: Help with Multiple Date Needs
     Posted: 22 Jan 2013 at 5:04pm
We have decided to standardize some date prompts in our reports as an example:


01/01/1800 - Previous Month
01/01/1850 - Previous 7 days
01/01/1900 - Previous Day
01/01/1925 - MonthYTD

I have tried just about every way of getting these all on one report for the end users and cannot get any which way to work.

Anyone have any ideas or suggestions? Greatly Appreciated!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Jan 2013 at 7:59am

are you doing this to so they can either enter a date range or one of the above? YOu could use an static LOV to accomplish thsi as well.

Either way, here is one way to try and use what you have
 
({?param}=date(1800,1,1) and table.date in lastfullmonth)
or
({?param}=date(1850,1,1) and table.date in last7days)
or
({?param}=date(1900,1,1) and table.date = dateadd('d',currentdate,-1))
or
({?param}=date(1925,1,1) and table.date in yeartodate)
IP IP Logged
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Posted: 18 Feb 2013 at 12:00pm
So sorry - we have had some major issues going on and I wasn't able to reply until now.
We are trying to standardize our Crystal reports so that if the end users want to run it and only bring back the last full week's data, they can do that or if they want the last full month they can do that too.
So for now, I am trying to get the just previous month and the previous week to work and cannot get anything to work.
Here is what I have using monthly and this works fine alone: How do I add the previous full week using parameters of 1850,01,01?

dateVar EndMonth := Date(Year(DataDate),Month(DataDate),01)-1;

If {?Starting Date for Report} = Date(1800,01,01) Then
Date(Year(EndMonth),Month(EndMonth),01) Else
{?Starting Date for Report}

Thank you so much in advance for your help and patience!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Feb 2013 at 3:53am
({?param}=date(1850,1,1) and table.date in lastfullweek)
IP IP Logged
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