How to group a report from a variable value in navision

LalakaLalaka Member Posts: 32
Hi!
I want to group a report from variable value. Is there anyone who knows how to do it.

This is my task.
I have created a report using the Prod. Order Line table and I have extracted the Volume field from the Item using GET, this I have assigned it to a variable GTextVolume. These volume values contains volumes of the specified items (750,350,150 etc...).
Now when the report is running I want to group the reports records from this field, GTextVolume.
Ex:
150
    ProdOr1 ProdOr2 ProdOr3 ProdOr4 ProdOr5
750
    ProdOr6 ProdOr7 ProdOr8 ProdOr9 ProdOr10

Is this possible? How do I specify a key?
Have a Nice Day!

Comments

  • dansdans Member Posts: 148
    Hint : Use the integer dataitem.
    Microsoft Certified IT Professional for Microsoft Dynamics NAV

    Just a happy frood who knows where his towel is
  • sameerarsameerar Member Posts: 63
    Take a Temporary Record variable and using Integer DataItem and group the data.

    Check the report 113.
  • LalakaLalaka Member Posts: 32
    dans wrote:
    Hint : Use the integer dataitem.

    Thanks.. I have googled a lot and have not found any way to figure out how to use the integer table. I read once that it is used for looping. But at this instance how do you make use of it.
    Do you tie the Volume variable to the Integer data item and loop?
    I cannot understand how I should go with this. I started working with Navision only in January. :)
    Have a Nice Day!
  • sameerarsameerar Member Posts: 63
    Check the 113 Report - DataItem Integer - Code on OnPreDataItem() and OnAfterGetRecord().

    See Below.

    Integer - OnPreDataItem()

    ValueEntryBuffer.RESET;
    SETRANGE(Number, 1, ValueEntryBuffer.COUNT);

    Integer - OnAfterGetRecord()
    IF Number = 1 THEN
    ValueEntryBuffer.FIND('-')
    ELSE
    ValueEntryBuffer.NEXT;
  • LalakaLalaka Member Posts: 32
    sameerar wrote:
    Take a Temporary Record variable and using Integer DataItem and group the data.

    Check the report 113.


    Thanks how do you do this? How do you group with the Integer Data item.?
    Have a Nice Day!
  • LalakaLalaka Member Posts: 32
    sameerar wrote:
    Check the 113 Report - DataItem Integer - Code on OnPreDataItem() and OnAfterGetRecord().

    See Below.

    Ok :)

    Integer - OnPreDataItem()

    ValueEntryBuffer.RESET;
    SETRANGE(Number, 1, ValueEntryBuffer.COUNT);

    We reset the VE variable and create a filter. What does this do? OK :)Sets the Number's range from 1 to the amount of records in VE.

    Integer - OnAfterGetRecord()
    IF Number = 1 THEN
    ValueEntryBuffer.FIND('-')
    ELSE
    ValueEntryBuffer.NEXT;

    What do we do here? How do we do the calculation?
    Have a Nice Day!
Sign In or Register to comment.