RtC : Visibility Is thids possible???

haryramaniharyramani Member Posts: 48
edited 2013-02-28 in NAV Three Tier
Hi,

I have 2 rows in a table
1st row should be printed if and only if it is first record of a field...
for d second or corresponding records my row2 should get printed....!!!

i.e if 1st record
1st row
else
2nd row

How to identify first record,In visibility expression FIRST(fields!field.Value) is not working.....
Is dis possible????

Comments

  • Wisa123Wisa123 Member Posts: 308
    Hello,

    First(field) of course doesnt work because its intended to display the first line of the current context.
    And thats not what you want if im right.

    What you'll have to do is create a Boolean Variable and set it in OnAfterGetRecord (or whereever you need it) according to wheter or not you want to display the first/second line. After that you just set the Visible Property of your line according to this Bool Value.

    I dont really see any other solution, the report designer doesnt support these kinds of requirements on its own.

    Glhf, Wisa
    Austrian NAV/BC Dev
  • haryramaniharyramani Member Posts: 48
    Wisa123 wrote:
    Hello,

    First(field) of course doesnt work because its intended to display the first line of the current context.
    And thats not what you want if im right.

    What you'll have to do is create a Boolean Variable and set it in OnAfterGetRecord (or whereever you need it) according to wheter or not you want to display the first/second line. After that you just set the Visible Property of your line according to this Bool Value.

    I dont really see any other solution, the report designer doesnt support these kinds of requirements on its own.

    Glhf, Wisa


    First(field) of course doesnt work because its intended to display the first line of the current context.
    I need the first value only....

    For example if there is field named amount having 5 records such as 10$,20$,30$,40$,50$....

    I need to print 1st row[having set of fields] if it is 10$
    for others i need 2 print the second row[having another set of fields].......
  • Wisa123Wisa123 Member Posts: 308
    Yeah then just design your Layout in this scheme
    For example if there is field named amount having 5 records such as 10$,20$,30$,40$,50$....

    I need to print 1st row[having set of fields] if it is 10$
    for others i need 2 print the second row[having another set of fields].......
    What you'll have to do is create a Boolean Variable and set it in OnAfterGetRecord (or whereever you need it) according to wheter or not you want to display the first/second line. After that you just set the Visible Property of your line according to this Bool Value.

    -some Grouping
    Row1: First(field),First(field2)....
    => Visible = iif(boolValue,false,true);
    Row2: field1,field2, ....
    => Visible = iif(boolValue,true,false);

    If this doesnt help you, im just not understanding your problem properly and we have a communication problem :whistle:
    Austrian NAV/BC Dev
  • haryramaniharyramani Member Posts: 48
    -some Grouping
    Row1: First(field),First(field2)....
    => Visible = iif(boolValue,false,true);
    Row2: field1,field2, ....
    => Visible = iif(boolValue,true,false);


    Am new to NAV so am not much clear....
    Wat my doubt is

    Row2: field1,field2, ....
    => Visible = iif(boolValue,true,false)

    In this 2ndrow if we are setting lik this the first value will also include here ri8??????
    and also create a Boolean Variable and set it in OnAfterGetRecord
    i dont know what i have to set ???
  • haryramaniharyramani Member Posts: 48
    my scenario is standard report 108 customer order detail...
    where each customer has some orders and each order has list of items ....
    For example
    customer akamal has 1 order ->1 item
    customer ram has 2 orders->2items
    Under an item
    i have 2 rows having different values in a field (unit price) for each customer

    Consider:
    akamal

    order 1
    item-1
    row 1..... unit price:90.
    row 2 .. unit price: 80

    ram

    order001

    item01
    row1 unit price: 90
    row2 unit price:50
    item02
    row1 unit price:10
    row2 unit price:20
    order002
    item01
    row1 unit price: 67
    row2 unit price:45
    item02
    row1 unit price:50
    row2 unit price:75

    wat i must get is

    akamal
    order-0001
    item01-->unit price 90
    Ram
    Order-001
    item01->unit price:90
    item02->unit price:20
    Order002
    item01->unit price:67
    item02->unit price:75


    With respect to item no 1st record and the following record is what i want to increment the unit price
    if it is 1st item no...unit price is 1strow unit price...
    if it is 2nd item and so on it should be 2nd row unit price....
  • Jatin_PatelJatin_Patel Member Posts: 200
    Is is possible more then 2 rows for unit price?
    Jatin Patel
    Microsoft Dynamics NAV Consultant
    Jatin's Blog
  • haryramaniharyramani Member Posts: 48
    Is is possible more then 2 rows for unit price?

    kindly refer report 108 and table 37
    1st row unit price is :- Unit price($)
    2nd row unit price is :-Unit price Excluding tax ....
Sign In or Register to comment.