Options

Is it Possible to Change lables dynamically in Report?

ramyavenkatramyavenkat Member Posts: 94
In a Report reffering sales invoice line, based on the location feild i want to change the display of the lables dynamically in report.

for eg::if the locaiton is bangalore in sales invoice line, the feild label in report should be T.N.G.S.T
If the location is madurai,the feild label of T.N.G.S.t should change in K.S.T
in the report.

Is this possible??if so using which trigger i will get the lables dyanamically change,,or where i should right the code.

Comments

  • Options
    nav_devpnav_devp Member Posts: 47
    why not use TEXTBOX
  • Options
    SMuruganSMurugan Member Posts: 1
    Hi Ramya

    If i understood correctly,

    it is possible to change values at run time. The code can be On After GetRecor(). Here u can verify the location and set appropriate value. I feel instead of label text box will be convinient.

    To display customised location, define text variable and link to text box(for ur customised location). Set ur own values in OnAfterGetRecord().

    You have to decide how u will relate ur customised location with existing location. If the locations are few in number u can hard code, oterwise u have to think other option.

    Try and reply


    Murugan
    ERP Tech Consultant
    Murugan
  • Options
    sggsgg Member Posts: 109
    Try This approach.

    You can modify the Location Table By Adding a New Field for the Captions you have in mind ("Name 2" for Example).

    Then in the Report, You Use a TextBox as have been suggested.
    Next on OnAfterGetRecord of the SalesInvoiceLines, Add codes like these

    if LocRec.get (SalesInvLine."Location Code") then
    TextLoc := LocRec."Name 2";
    else
    TextLoc := SalesInvLine."Location Code";

    and Of Course you will set the
    SourceExpr Property of the TextBox to TextLoc


    Sgg
    Sunday, Godwin G
  • Options
    ramyavenkatramyavenkat Member Posts: 94
    Thanks Murgan ,I tried ur method and it worked fine.
Sign In or Register to comment.