Purchase order may contains items from different projects, so project name is not available as part of purchase order field but Project Name is available as part of purchase order item field and its part of “Sub purchase order item” report.
If you want to display project name for each item or group items by project name then you have to customize the “Sub Purchase Order Item” report there ProjectName is available as part of Data Explorer tab.
Or if you want to display the ProjectName in Main “Purchase Order” report considering all items are from same project. Then You have to use following script code to get the ProjectName and assign it to a Textbox.
Following is the sample script code to get project name and assigned it to a textbox –
If ReportUtilities.PurchaseOrder Isnot Nothing AndAlso ReportUtilities.PurchaseOrder.Projects Isnot Nothing Then
Dim projName as string = ReportUtilities.PurchaseOrder.Projects.OfType(Of ProjectInfo2).Select(Function(pi) pi.Name).FirstOrDefault()
ReportUtilities.SetTextBoxValue(rpt, “grpPOInfo”, “txtProjName”, projName)