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.
0
Comments
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
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