Report Print Preview: “Go to main table” link for display method fields

Situation:
A report containing e.g. PurchParmLine.itemId() will not show the orange hyperlink in the print preview screen that allows the user to jump to the main table.

Solution:
To make add a link to a display method field on a report you must replace the display method field by a temporary table datasource. Populate the desired field and send the temporary datasource.

public void executeSection //e.g. located in PurchParmLine body
{
    InventTable tmpPrintItemId; //any table with the ItemId field will do
    ;
    tmpPrintItemId.ItemId = PurchParmLine.itemId();
    element.send(tmPrintItemId);
    super();
}

Now you can add a Field with Properties Table = Inventtable and DataField = ItemId, which will print the contents of PurchParmLine.itemId() and will have the orange hyperlink in the print preview that allows the user to jump to the main table.

See also msdn How to

Advertisements