Thanks,
But then it must be able to switch from one condition to the other, right?
your suggestion will bring everything regardless of what we enter in the prompt, right?
Main Topics
Browse All TopicsHi,
My requirment is to enter dates for start date and end date prompts and if i enter a wild card, should bring back all data.I have pasted what i'm trying to do.But it's not parsing OK.
Please help me get it right.
Thanks!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi,
'*' doesn't work because of the datatype mismatch.
I tried a default date like '1/1/1900' and that works.But again, as you said, this value holds good only when i enter it in both the prompts.If i enter 1/1/1900 for the end date and 8/24/2009 for the start date, doesn't work.Can you suggest any workaround?
Thanks!
Thanks, tried that. But i have Kit Creation Date End also.If i try something like this, it gets back all the data regardless of what i type in. Do you see the problem?
(( DATE('1/1/1900') = DATE(@Prompt('A- Kit Creation Date Start','A',,MONO,FREE))) OR
(( DATE('1/1/1900') = DATE(@Prompt('B- Kit Creation Date End','A',,MONO,FREE))) OR
(DATE(@Select(Kit\Kit Creation Date))
BETWEEN DATE(@Prompt('A- Kit Creation Date Start','A',,MONO,FREE))
AND DATE(@Prompt('B- Kit Creation Date End','A',,MONO,FREE))))
Thanks! But, can you please explain how that would solve my problem?
Let me mention to you, my requirement here.
I have a Date Range "Start Date' And "End Date". If the user enters '1/1/1900' in the start date and '8/24/2009' (just an example) in the end date, it should get all the dates upto '8/24/2009'.
If i enter '8/24/2009' as start date and '1/1/1900' as end date, it should start from '8/24/2009 and get all the dates in the database that are greater than 8/24/2009.
1/1/1900 is my wildcard prompt value here.
Sorry was on my mobile, was harder to type.
(( DATE('1/1/1900') = DATE(@Prompt('A- Kit Creation Date Start','A',,MONO,FREE))) OR
(DATE(@Select(Kit\Kit Creation Date))
BETWEEN DATE(@Prompt('A- Kit Creation Date Start','A',,MONO,FREE))
AND DATE(@Prompt('B- Kit Creation Date End','A',,MONO,FREE))))
Should work as you are just using to wildcard your data. Pick a date that is never a valid start date, so when you see '1/1/1900', it doesn't matter what is entered for the second prompt as your logical expression will evaluate as true without ever hitting the date conversion code which is why that has to be first in the list of logical conditions.
if both fields need to be set, then you are basically doing what Jim suggested earlier. So again I support his thoughts.
What's wrong with just this:
DATE(@Select(Kit\Kit Creation Date)) BETWEEN DATE(@Prompt('1 Kit Version Start Date','A',,MONO,FREE)) AND DATE(@Prompt('2 Kit Version End Date ','A',,Mono,FREE))
Then just pass in '1/1/1900' and '12/31/2999' into the dates or like Jim showed '5/5/55' and '2/2/22'.
I like CRXI's idea for a simple solution. If your users do not like this, do you have the option to add additional parameters? It might clarify it for your users.
First Parameter could contain two values: "Return All Data and Ignore Date Range Entered Below" and "Use Date Range Entered Below".
You can have a conditional where clause.
If @Parameter = 1 then Date > 1/1/1900
Else Date between @BeginDate and @EndDate
This will work as long as @BeginDate and @EndDate both have default values (they can be any value, this is just so the user isn't prompted at run time).
I have done this a lot for reports where we will try to make it easier for users to pull standard (MTD, WTD, YTD) but then also give them the option to choose the date range.
Good luck.
The tests you posted in message 25190089 seem OK logically. 1/1/1900 entered for either the start or end date should give you every date, which may not be what you want, but I don't see any reason why you would get "all the data regardless of what i type in". Actual dates, like 08/20/09 to 08/25/09, should work.
If I misunderstood and the problem was actually that 1/1/1900 for either the start or end date was giving you every date, and you wanted 1/1/1900 for the start date to mean no start date and 1/1/1900 for the end date to mean no end date, you should be able to change the tests to handle that.
Are those your only tests, or are there others (other parameters or other fields that you're checking)? If there are other tests, then there could be problems if the tests are not combined properly, but, offhand, I'd expect a problem like that to exclude records, not include extra records.
James
Thanks James! Upon rethinking about the prompts, i settled down with the idea that Jimpen gave in the first post,which is typing 1/1/1900 as start date and 12/31/2050 as enddate. This works fine but, has a problem too.There are no date entries on some rows,meaning they are all blanks.
For this situation ,i couldn't bring back those rows. Can anyone suggest a workaround for this?
Thanks everyone,for all the help!
Well, I think you have an issue then.
You have to tell the report what a "Blank" date represents. IF you want a blank date to NOT appear in the report, then you'll need to filter the blanks out within the report itself or the Query itself.
IF you want the "blank" Date to represent an actual date, I think the best way to do that is to create a new field object that converts "blanks" into a specific DATE and then use the new object for your prompt.
Just shooting from the hip here....hope it helps.
M
Business Accounts
Answer for Membership
by: jimpenPosted on 2009-08-25 at 17:12:05ID: 25183458
There is no really easy way to do it.
Why not just do 5/5/55 to 2/2/22? It should bring back from 1955 to 2022.