Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Prompt in Crystal

Status
Not open for further replies.

Tubby6

Technical User
Jun 4, 2007
26
CH
I am required to create a prompt that will display the last seven days worth of data. I cannot integrate this formula unto the report. instead I have to create a prompt that will allow me to choose 7 days, 15 days, etc. Is there anyone that can help?
-thanx.
 
Create a parameter field for # of days and tie this field into your record selection formula so you only get that number of days.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
How would I create the syntax for it. I'm sorry I'm a bit confused.
-thanx
 
Hi,
Have you tried anything yourself..Like reading the help files?

Anyway, use the CurrentDate function combined with your numeric parameter to do this..

Here is a starting point:

{TableDateField} >= (CurrentDate - {?parameter} )


[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
First, create the parameter field. You do know how to do that correct?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
See You guys are misunderstanding.. You can do this in Select Expert anyways.. Where you write "Last 7 Days" . I actually wanted a prompt that would do this dynamically.

What you are telling me is that you have to write in a time.. but I do not want that.
-thanx anyways
 
dgillz. yes. I was trying different things...
{?ParameterField} in Last7Days
But that didn't result in anything.
I was just doing random things to see if that would work.
 
No, a parameter field will always prompt you for the value, every single time.

You said yourself in your first post:
I cannot integrate this formula unto the report. instead I have to create a prompt that will allow me to choose 7 days, 15 days, etc.

Last 7 Days from the select expert will NEVER prompt you, which is what you said you wanted.

So did you change your mind, or did the requirements change?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Actually I was responding to TurkBear at first..
But referring to dgillz
I tried putting what I wrote previously about
the {?parameterfield} in Last7days to connect that with the parameter I had created. But I know that was really wrong (lol) and plus the prompt requires a user to write a specified time ...
 
OK please first make sure that your parameter field is a number. You want to prompt the user for the number of days, correct?

Then in your record selection formula (do not use the select expert to do this) enter a formula:

{YourDatabaseDateField} in CurrentDate-{?YourParameter} to CurrentDate

If you wanted to do this without the prompt, you would just enter:

{YourDatabaseDateField} in Last7Days

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Hi,
OK, clear this up please..Is it 'Last 7 days' or a variable # of days? ( 7 or 15 or whatever)..


If variable then it will always prompt for what the variable # should be..






[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
SUCCESS! THANK YOU SO MUCH DGILLZ!
 
variable # of days.. turkbear. Dgillz help worked. thanx a bunch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top