Baanboard.com

Baanboard.com (http://www.baanboard.com/baanboard/index.php)
-   Tools Development (http://www.baanboard.com/baanboard/forumdisplay.php?f=8)
-   -   How do display the value of own variable in detail layout in report? (http://www.baanboard.com/baanboard/showthread.php?t=70392)

pralash 5th September 2017 10:00

How do display the value of own variable in detail layout in report?
 
Hi,
I'm new to LN Programming... I created a standard report... but I want to display the value of calculated variable in the detail.1 section.

my script like this...

declaration: ;
domain dmpris stock.value
detail.1:
before.layout:
stock.value = dmoes001.stck * dmoes001.spri

Here I calculated the stock value for each record but I couldn't display the value in the report... So how can I display this value in the report...
Could you please help me...
Thanks,
Pralash

bhushanchanda 5th September 2017 10:07

Hi,

You need to declare the variable as extern -

declaration: ;
extern domain dmpris stock.value
detail.1:
before.layout:
stock.value = dmoes001.stck * dmoes001.spri

Or, directly add the variable in Report Input Fields by selecting the report -> Specific -> Report Input Fields. Then, you don't need to declare it in your script.

pralash 5th September 2017 11:57

Thank you so much for your reply...
I got the result while add the variable in the report input fields. But I can't get the same result by declaring the variable as extern.... So can you please suggest me why I'm not getting the result whenever declare the variable as extern... My sample code looks like this...
|******************************************************************************
|* tccom145401000 VRC B61C a cust
|* Print Test-Table3
|* baan
|* 17-09-04 [14:40]
|******************************************************************************

|****************************** declaration section ***************************

declaration:
extern domain tccom.xkey tmp

|***************************** program section ***************************

detail.1:
before.layout:
tmp = tccom154.purp * tccom154.stck

Thanks,
Pralash

vamsi_gujjula 7th September 2017 17:42

you dont need to define the report script variable as extern .

with / without extern it should work as long as tmp is not in report input fields and tccom154.purp ,tccom154.stck are in report input fields


All times are GMT +2. The time now is 13:30.


vB.Sponsors
©2001-2017 - Baanboard.com - Baanforums.com