cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Code needed for searching between date ranges

Former Member
0 Likes
1,104

Ive got a report that i need some code for. The report is showing some costing information. There is a part number in the database that im trying to show the costing for. However over time the operations department has changed the cost of this part number. When you query the database, the cost shown for this part is relative to the date the job was created.

e.g.,

part 1029 cost has changed throughout its history.

on 9/2/09 its original cost was .0024

on 6/9/10 its cost was changed to .0032

on 6/30/10 its cost was changed to .0026

all the dates of these changes are in one table and in one column

In the ERP system, when you ask for costing on shop orders for this part #, it shows you the costing relative to the date the shop order was created. I need code that would enable me to say the shop order was created on 3/8/10 and the cost associated for this part number is relative to this date.

The shop order date is created on 3/8/10 which falls between the 1st and 2nd record on the cost table shown above. in this case i would need the cost from the 1st entry.

View Entire Topic
Former Member
0 Likes

This should work, you can create a parameter for the date, and use it in a select statement.

<= {?My_Date} Then put the date in the detail, and do a summary for Maximum Create a sub report, and link to the main in {?Pm-Max of My_DB_Date}TO {?Pm-?My_Date}

this seems to work ok, although I have not fully tested it.