Hi guyz,
I have just a problem with my report.
I want to capture the first description of the "Gen. Journal Line".Description and place it to the header.
This report in navision is Report ID # 2 "General Journal"
I put variable firstdesc then upon loading
i create this code
Body - OnPresection ()
if fistdesc = '' then
begin
firstdesc := "Gen. Journal Line".Description
end;
then i Place a control with source expression = firstdesc.
But i notice the first page dont have the description only the second page.
Thanks guys.
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Body - OnPresection ()
IF "Gen. Journal Line".FINDFIRST THEN
firstdesc := "Gen. Journal Line".Description
David
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
It looks as not good example, using DataItem variable to find some record in OnPresection of the body will lead into neverending loop... Because each time it will jump to the first record...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Ooops Quite right Kamil wrong place move the code to the DataItem:
"Gen. Journal Line" - OnPreDataItem()
IF FINDFIRST THEN
firstdesc := "Gen. Journal Line".Description
Another way is add a Group header and put the code in there
GroupHeader - OnPresection ()
IF CurrReport.SHOWOUTPUT THEN BEGIN
firstdesc := "Gen. Journal Line".Description
CurrReport.SHOWOUTPUT := FALSE;
END;
David
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com