Hi
I have below code . On basis of condition sometimes i have to get values in Purch Invoice Header . Sometimes from Purch Inv Line. Getting values of all variables in both cases , but getting PO NO value in 1 case only.
Variables are defined in Purch Invoice Header Data Item only.
When i define PO NO in Purch Invoice Header Data Item then i get value in Purch Invoice Header only.
When i define PO No in Purch Invoice Line then i get value in Purch Invoice Line only.
When i put message then it display PO NO value in both cases. Only not showing in Dataset generated.
Thanks
*This post is locked for comments
Could you check by using a MESSAGE on the lines. If the "PO No." are prompted correctly, you may try the below method:-
https://medium.com/nareshwar-r/setdata-getdata-on-ssrs-reporting-on-dynamics-nav-121ac46cde6
Hi
Only one because with same name 2 cannot be given. When i add in header then it print the Header Value not Lines Value. If i give in Lines then it prints LIne Value not Header Value.
Problem is why other variables are working fine. They have been defined only at Header DataItem. How their values are coming.
How many "PO No." you have in your "DataItem" and where it's placed? "Purch. Inv. Header" or "Purch. Inv. Line"?
Hi
Yes in Report Header. It is written as
=First(Fields!PO_No_.Value, "DataSet_Result")
Thanks
Are you displaying the "PO No." on the Report -> Header? If so, please share the expression entered on the Header.
Hi
When i display message then it displays value. Why on report it is not printed or i checked in dataset also it is blank.
If i add variable in Header then it displays value found in Header . If i add variabe in Line then it displays value found in line. Whereas all other variables work in both condition.
Thanks
If your code is on the "Purch. Inv. Line" - "OnAfterGetRecord" trigger, it should work correctly, provided there is data.
You can go to the respective Invoice, click on the "Lines" - > "Item Receipt Lines", and check whether the Receipt Lines are displayed.
Please share the code written on "Purch. Inv. Line" - "OnAfterGetRecord"
Hi
When i print variable value "PO No" in Purch Inv Header then it shows value. When is display message in Purch Inv Line then it shows blank. Since it is global value it should not show value in Lines also . Other variable are showing
Thanks
You may write something like as below:-
Purch. Inv. Header - OnAfterGetRecord()
"PO No" := "Order No.";
"PO Dt" := "Order Date";
After this you have write another code to get the "Order No." and "Order Date" base on the related "Receipt No." and overwrite them onto "PO No" and "PO Dt";
In order to get this, you may refer the code on the 139 "Posted Purch. Invoice Subform" -> Actions - "Item Receipt &Lines". Once you follow that, you may get "Receipt No.", based on that Receipt No, you can get the "Order No." and "Order Date" from "Purch. Rcpt. Line" table.
You have to use same code from "Item Receipt &Lines" on the "Purch. Inv. Line" - OnAfterGetRecord trigger too.
Is there any custom field with the same name (P.O No) in those tables ? Try to change the variable name to something different and try.
Sohail Ahmed
2
mmv
2
Amol Salvi
2