Dynamically hide/display fields in Report request page - NAV 2009 R2

Hi everyone,

I have to create a report with two fields in a request page : a boolean and a text field.
One of the requirements is that the text field in invisible when the user runs the report, It only gets visible if the boolean is checked by the user.
Is it possible in NAV 2009 R2? and how?

Thanks in advance :)

yes, it is possible and what did you try and what is not working?

sql or classic report ?

RTC report (request page [:)])

Hi Poppins,

You need to assign a boolean variable to the “visible” property of the control you like to hide.

Then you can assign the show/hide value to the variable in the OnOpenPage trigger.

Hi sir,


The identifier ‘Variable’ could not be found.


I am Learning how to NAV , am using Nav 2016. i hav tried what u said but it is giving error like above (created 2 variables 1st of boolean and 2nd text visibility of 2 nd variable is assigned with 1st in request page of report.

I Hopei will get reply soon ,

Thanks,

Raja

Did you set Include in dataset property of the boolean to yes?

yes i hav kept just now but not able to get Text variable as you validate the boolean variable.

with that Set Include in dataset removed error.[:D] .

Hi Mohana,

Just now i hav noticed that i can use editble property but unable to use Visible property

Can you attach the object (text version) to the post, then we can see why it doesn’t work?

OBJECT Report 55001 Customer by salesPerson1

{

OBJECT-PROPERTIES

{

Date=12/04/15;

Time=11:15:13 AM;

Modified=Yes;

Version List=;

}

PROPERTIES

{

}

DATASET

{

{ 1000000007;;DataItem; ;

DataItemTable=Table13;

OnAfterGetRecord=BEGIN

“Salesperson/Purchaser”.SETCURRENTKEY(“Salesperson/Purchaser”.Code);

END;

}

{ 1000000008;1;Column;Code_SalespersonPurchaser;

SourceExpr=“Salesperson/Purchaser”.Code }

{ 1000000009;1;Column;Name_SalespersonPurchaser;

SourceExpr=“Salesperson/Purchaser”.Name }

{ 1000000010;1;Column;Commission_SalespersonPurchaser;

SourceExpr=“Salesperson/Purchaser”.“Commission %” }

{ 1000000011;1;Column;CompanyInfo_Pic ;

SourceExpr=CompanyInformation.Picture }

{ 1000000000;1;DataItem; ;

DataItemTable=Table18;

OnPreDataItem=BEGIN

Customer.SETRANGE(“Salesperson Code”,“Salesperson/Purchaser”.Code);

Customer.SETFILTER(“Sales (LCY)”,’>0’);

END;

}

{ 1000000005;2;Column;SalespersonCode_Customer;

SourceExpr=Customer.“Salesperson Code” }

{ 1000000001;2;Column;No_Customer ;

SourceExpr=Customer.“No.” }

{ 1000000002;2;Column;Name_Customer ;

SourceExpr=Customer.Name }

{ 1000000003;2;Column;Address_Customer ;

SourceExpr=Customer.Address }

{ 1000000004;2;Column;City_Customer ;

SourceExpr=Customer.City }

{ 1000000006;2;Column;Sales ;

SourceExpr=Customer.“Sales (LCY)” }

}

REQUESTPAGE

{

PROPERTIES

{

OnInit=BEGIN

MESSAGE(‘Init’);

END;

OnOpenPage=BEGIN

MESSAGE(‘On Open’);

END;

OnClosePage=BEGIN

MESSAGE(‘On close’);

END;

}

CONTROLS

{

{ 1000000000;;Container;

Name=genenral;

CaptionML=ENU=Options;

ContainerType=ContentArea }

{ 1000000001;1;Field ;

Name=Boolean;

SourceExpr=BoolValue }

{ 1000000002;1;Field ;

Name=text;

SourceExpr=Textvalue;

Visible=BoolValue }

}

}

LABELS

{

}

CODE

{

VAR

CompanyInformation@1000000000 : Record 79;

null@1000000001 : Text;

BoolValue@1000000002 : Boolean INDATASET;

Textvalue@1000000003 : Text;

opt@1000000004 : Text;

window1@1000000005 : DotNet “‘Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.Microsoft.VisualBasic.Interaction”;

window@1000000006 : Dialog;

BEGIN

END.

}

RDLDATA

{

<?xml version="1.0" encoding="utf-8"?>

0

SQL

rd:DataSourceID27a28329-09ae-4350-b2e6-eed7bff71f70</rd:DataSourceID>

DataSource

SalespersonCode_Customer

No_Customer

Name_Customer

Address_Customer

City_Customer

Sales

SalesFormat

Code_SalespersonPurchaser

Name_SalespersonPurchaser

Commission_SalespersonPurchaser

Commission_SalespersonPurchaserFormat

CompanyInfo_Pic

rd:DataSetInfo

rd:DataSetNameDataSet</rd:DataSetName>

rd:SchemaPathReport.xsd</rd:SchemaPath>

rd:TableNameResult</rd:TableName>

</rd:DataSetInfo>

1in

1in

1in

1in

1in

1in

0.25in

true

true

Name

Textbox13 LightGrey Solid

2pt

2pt

2pt

2pt

true

true

No Customer

Textbox3 LightGrey Solid

2pt

2pt

2pt

2pt

true

true

Name Customer

Textbox5 LightGrey Solid

2pt

2pt

2pt

2pt

true

true

City Customer

Textbox9 LightGrey Solid

2pt

2pt

2pt

2pt

true

true

Sales

Textbox11 LightGrey Solid

2pt

&n

http://dynamicsuser.net/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.19.66.02/Dynamic-Request-pagetxt.txt

this is my text file sir sorry at first i wasn’t able to uploaddue to site technical reasons then came to know how to overcome …

Raja,

You’re not assigning any value to your BoolValue variable. Do this in OnOpenPage.

Hi Sir(Erik P. Ernst),

what i want is dynamically change the hide/display fields in request page . if i hardcode value in Boolean

variable then my fields will be either permanently visible/ Permanently Invisible . I am Not able to take from window .INPUT();… So, Can we Achieve it? if Yes , How ?

I am Looking Forward for your Reply…[Y]

hi Everyone,

At Last got answer from my Seniors , (Mahesh U) that in NAV 2015,2016 we are not able to change the visibility of request page fields . INstead of that we can achieve this by defining them in another group and group visibity can be

Modified at Runtime/Dynamically display fields in request Page.

Thanks to everyone …who helped me .Mohana,****Erik P. Ernst,uppala mahesh,ramesh