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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date parameters

Status
Not open for further replies.

Dukester0122

IS-IT--Management
Mar 18, 2003
587
US
Need to do 2 things on my report:
1) I have a date field (PromisedDate) which is showing 01/01/2006 12:00:00AM. I want to get rid of the time and just need the date.

2) I want to create a date parameter(from/to) using the PromisedDate field, how do i create this in RS?

Just trying to get a feel of RS before I move some of my Crystal Reports.

Appreciate any help.
 
for the first question use this:
[tt]= Fields!PromisedDate.Value.ToShortDateString[/tt]

for the second question go into the report parameters dialog box, add a new parameter, and then in the middle of the page there is a place where you can set it to used queried values, here you choose the dataset that contains your PromiseDate field.
 
1) worked perfect
2) In report parameters I did the following:
- Data type: DateTime
- Prompt: Report_parameter_0
- Available values:
- From query:
- Dataset: database
- Value field: PromisedDate
- Label field: PromisedDate
- Default values: NULL
Result: The report ask for Report Parameter and I chose 04/15/2006 00:00:00 but gave me all dates instead of just the parameter date.
 
You need to either set the parameter on your dataset or as a filter on your dataset - to do this, go to the Dataset tab and click on the ... button (edit dataset) - either add a query parameter or a query filter and link it to the report parameter

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top