Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formulas Post Reply Post New Topic
Page  of 2 Next >>
Author Message
bturner
Newbie
Newbie
Avatar

Joined: 17 Jun 2010
Location: United States
Online Status: Offline
Posts: 28
Quote bturner Replybullet Topic: Formulas
     Posted: 17 Jun 2010 at 5:19am

I have a formula that returns a date range.  How would I add the time to return w/ the date range?

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jun 2010 at 5:43am
Please explain further.
IP IP Logged
bturner
Newbie
Newbie
Avatar

Joined: 17 Jun 2010
Location: United States
Online Status: Offline
Posts: 28
Quote bturner Replybullet Posted: 17 Jun 2010 at 6:28am
This is my formula:   Minimum ({?Dates}) & " - " & Maximum ({?Dates})
 
This is what it returns:  6/1/2010  12:00:00AM - 6/16/2010  12:00:00AM
 
I do not want the time to return w/ the date.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jun 2010 at 6:35am
Date(Minimum ({?Dates})) & " - " & date(Maximum ({?Dates}))
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jun 2010 at 6:35am
or change your param type from DATETIME to DATE
IP IP Logged
bturner
Newbie
Newbie
Avatar

Joined: 17 Jun 2010
Location: United States
Online Status: Offline
Posts: 28
Quote bturner Replybullet Posted: 17 Jun 2010 at 9:08am
When I changed the param type from DateTime to Date the formula opened w/ an error "This field cannot be summarized"
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jun 2010 at 9:14am
WHen you switched the type it defaulted the 'Allow Range values' option back to FALSE.
Flip it back to TRUE.
If you use the DATE type option you can use your original formula...
Minimum ({?Dates}) & " - " & Maximum ({?Dates})


Edited by DBlank - 17 Jun 2010 at 9:15am
IP IP Logged
bturner
Newbie
Newbie
Avatar

Joined: 17 Jun 2010
Location: United States
Online Status: Offline
Posts: 28
Quote bturner Replybullet Posted: 17 Jun 2010 at 9:29am
I may have to start over.  Now when I right click/Edit on the DATES parameter under the parameter fields in my field explorer it doesn't even open.  I created another parameter called "Dates Run" and changed my formula.  When I tried to refresh I got another error message "Prompting filed with the following error message: Error source: Error code: 0x80070057."  Is there anyway to attach or send the report on this forum? 
IP IP Logged
bturner
Newbie
Newbie
Avatar

Joined: 17 Jun 2010
Location: United States
Online Status: Offline
Posts: 28
Quote bturner Replybullet Posted: 17 Jun 2010 at 9:37am
Oh I didn't go into my select expert and change the formula there from Dates to Dates Run.  Can you tell I'm new at this?  Now it's working.  Does that sound like I did that correctly? Still not sure why I can't edit that other Dates parameter but at least it's working.  Thank you very much!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jun 2010 at 9:44am
If the params are in the report you can not delete them. YOu have to reove all use from the report first (on the canvas, in a formula, in the select expert, etc.) and then you can deleted it. If it has a green check mark on it in the field explorer then it is being used in the report somewhere.
 
I think you have things correct but really can't tell from here.
If it gives you problems just post it and someone can try to assist at that time.
IP IP Logged
Page  of 2 Next >>
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