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 Range Parameters

Status
Not open for further replies.

Garyjr123

MIS
Sep 14, 2010
139
US
I need help figuring out how to have a report pull just a single date not a range. I basically copied another report which had parameters attached to it and wanted to change the date range parameter to pull data for a single day.
 
You could just go into the daterange parameter and uncheck "allow range values". The record selection formula should look like:

{table.date} = {?Parameter}

If the daterange parameter is referenced in other formulas, your change will cause those formulas to error out. When they pop up, you will have to adjust the formulas.

-LB
 
For CR XI,

Two separate things happen when I try to pull the report data.

1) I try to search on patient then surgery date (parameters: patient & date) and I am able to get one patient from one day but not another patient from a different day. Can't figure out why.

2) I try to search on surgery date and resource id (parameters: date and unit) and again I am able to pull some data but not all data.

This probably isn't enough info but hopefully it helps. Let me know if there is more needed.

 
Are you relating this to the change in parameter?

In your first example, are you saying you ran the report twice, and only once did you get the expected data?

In the second case, you are changing the parameters to unit instead of date?

Is the date parameter set up as a date? If your field is a datetime, you could try wrapping the datetime in date() and see if that makes a difference.

-LB

 
Sorry, I should of been more clear.

The two examples are two separate reports ran two separate ways.

Yes in the first example, I ran the report twice. First with date: 9-13-10 and a Patient then date: 9-15-10 and another patient. The first run provided me with results specifically for that patient for that day but the second results only gave me the patient name but no data.

The second example I am still using date with a unit id.

So in the formula editor you are telling me to wrap datetime with date() so it looks like this:

Old: {appt.start_datetime} = {?StartDate} and
{res2.resunit_id} = {?ResUnitID} and
{resbooking.start_datetime} = {?StartDate} and
{res2.restype_id} = 2

New: {appt.start_datetime} = date({?StartDate}) and
{res2.resunit_id} = {?ResUnitID} and
{resbooking.start_datetime} = date({?StartDate}) and
{res2.restype_id} = 2

 
If the StartDate is already a date (not a datetime), it wouldn't accept that, and that wasn't what I meant. I meant to wrap the field in date()--but actually the formula should work just fine without the date() as long as the parameter is a date, not a datetime. I think you should check your data and see if there is data related to that patient for that specific date.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top