How to get data from different table on Reports

Hi everyone,

I’ve searched this forum but didn’t find answer. It might be pretty clear to you, but…

I have a report: Purchase Header, Purchase Lines this works fine but I need to add one field from Item table (string) and this is where my problem starts.

My thoughts: I can link from Purchase Lines to Item table as you can see below.

I get no error on compilation, but no data for filed from Item table are coming through. Everything works for Purchase Header, Lines.

Thank you for any thoughts



where did you add the Item fields?

Make sure you have Type Item in Purchase Line…

Try DataItemLink as

Type = Item and No. = No.

On DataitemLine of Item Data item

Use No=No

Get this error whey I tried your suggestiong: any advice?

A ‘=’ is missing in TransferFormulaData

The one what you have set in screenshot is correct…

Thx for reply,

I am rendering that field in RoundLoop, Body(3) as where all other fields are.

Cheers any thoughts?

What are the lines available in Purchase Line…?

don’t understand, what you are after. Can you be a bit more specific.

Can you show the Purchase Lines availalbe in particular Purchase Order for which you are running the report?

How many lines you have and what are the Types for all lines?

here are another two screenshots

Purchase Lines:


Selections: marked should be transferring data from item table.

Thank you

What exactly is your requirement?

Simply to show this field on report

We have “Purchase Line”.“No.” in same section to show the No.

No was only as a example, field which I am after is KK Finish, which I believe is custom field

Then I suggest you to Get the Item Details through Code…in RoundLoop dataitem OnAftergetRecord using PurchLine.“No.”

OK thx I will try to do more research about this. can you point me to some examples, documentation pdf. I do have a installation CD

Best is define item table as record and put value you required in a variable and display it.


Instead of adding the item dataitem I think you should add the code under RoundLoop - OnAfterGetRecord (just after existing default code). Check my example below.

Create a text variable “KKfinish” and use it on the section.



IF “Purchase Line”.Type = “Purchase Line”.Type::Item THEN BEGIN

IF Item.GET(“Purchase Line”.“No.”) THEN

KKFinish:=Item.“KK Finish”; //your field here



If you custom field is available in Item Master then define Item as Record Variable and write a code on onaftergetrecord trigger and put your field in variable and display that variable in report.