I have an SQL Database(Progress Openedge) and I am using Crystal reports XI r2
I have a table(prod_price) with the following sample data, and I am trying to do an "Add Command" in Crystal, where I am only grabbing the records for the currently active price records. In the future, as prices are updated there could be several pricing records (5, 6, 10, 20) per product/location.
Prod-Key Loc-Key Seq effective-date price
00010262 00000001 1 01/01/00 240.00
00010262 00000001 1 07/27/18 248.00
00010262 00000001 1 09/01/18 250.00
00010262 00000003 1 01/01/00 245.00
00010262 00000003 1 07/27/18 253.00
00010262 00000003 1 10/01/18 255.00
00010262 00000004 1 01/01/00 250.00
00010262 00000004 1 07/27/18 258.00
00010262 00000004 1 08/15/18 260.00
The data is grouped by Prod-key and then by Loc-key
with only 1 or 2 pricing records for each Product/Location, I was able to use "Report-->Selection Formulas-->Group" and use a formula like below to filter, but I am thinking to the future and how to keep my crystal report working as future pricing is added to the DB.
{prod_price.effective-date} = maximum({prod_price.effective-date},{prod_price.loc-key})
Can anyone help?
I have a table(prod_price) with the following sample data, and I am trying to do an "Add Command" in Crystal, where I am only grabbing the records for the currently active price records. In the future, as prices are updated there could be several pricing records (5, 6, 10, 20) per product/location.
Prod-Key Loc-Key Seq effective-date price
00010262 00000001 1 01/01/00 240.00
00010262 00000001 1 07/27/18 248.00
00010262 00000001 1 09/01/18 250.00
00010262 00000003 1 01/01/00 245.00
00010262 00000003 1 07/27/18 253.00
00010262 00000003 1 10/01/18 255.00
00010262 00000004 1 01/01/00 250.00
00010262 00000004 1 07/27/18 258.00
00010262 00000004 1 08/15/18 260.00
The data is grouped by Prod-key and then by Loc-key
with only 1 or 2 pricing records for each Product/Location, I was able to use "Report-->Selection Formulas-->Group" and use a formula like below to filter, but I am thinking to the future and how to keep my crystal report working as future pricing is added to the DB.
{prod_price.effective-date} = maximum({prod_price.effective-date},{prod_price.loc-key})
Can anyone help?