Report Body Queries

vios15vios15 Member Posts: 43
Dear Expert,

I have 3 tables.
1. Item (eg A123456 with description)
2. Price Category (eg A123456 Cat A Price=$10, A123456 Cat B Price=$20)
3. Item Category (eg Cat A, Cat B)

In Price Category, there are historical data plus current latest price.

My query is, can I generate a report base on Item No and Price Category of the last record of each Cat, base on the latest date creation? eg. A123456 Cat A Price=$10 (In year 2009) is the latest price but prior to that I have historical data like A123456 Cat A Price=$9 (In year 2008), A123456 Cat A Price=$11(In year 2007).

How could I code in the OnAfterGetRecord, I need only to output the latest of each category?

Thanks for the help.

Comments

  • UdAkunuriUdAkunuri Member Posts: 31
    Hi,

    According to my understanding, you need latest price of each category for an Item.

    For this you can take the data items Item and Item Category, And in Item Category write the code for getting latest price for this category and item.
    Thanks & Regards,
    Udaykumar Akunuri
  • vios15vios15 Member Posts: 43
    Hi UdAkunuri,

    Correct me if I am wrong.

    Do you mean that I need to use Item as the first table then looks into Item Category table?

    But it only print one line, I need the following;

    A123456 Cat A $10
    A123456 Cat B $9
    A123456 Cat C $11

    Thanks
  • UdAkunuriUdAkunuri Member Posts: 31
    Ya, You can take print like this by taking only two data items.

    Take the Record variable of the Item Price Category and write the code to pick the latest price with this item and Item category Code....
    Thanks & Regards,
    Udaykumar Akunuri
  • vios15vios15 Member Posts: 43
    Hi UdAkunuri,

    I will try. Thanks for the help.
Sign In or Register to comment.