Announcements
I am trying to add a column from a custom field to my report extension. I created the custom field using a table and page extension.
More specifically, I made the two custom fields to extend the Company Information page, and I trying to add those fields as columns to a report extension that extends a Sales Invoice Report.
If you look at this screenshot below, you can see "SourceExpression" as a second parameter to the column function:
When I try adding the field name I want (the custom fields) for the SourceExpression, intellisense does not recognize it, and I get a problem saying that "the field does not exist in the current context".
How do I make the field available in the current context?
Thanks,
J
This works! Thank you for your help.
Hi,
Define Company information as a Global Variable in sales invoice Report extension, and than add fields from company information table as a column under in header dataset.
because we are defining companyinfo5 as a new variable than use a GET command to fetch record from database.
dataset
{
// Add changes to dataitems and columns here
add("Sales Invoice Header")
{
column(BankName;CompanyInfo5."Bank Name")
{
}
}
modify("Sales Invoice Header")
{
trigger OnBeforePreDataItem()
begin
CompanyInfo5.get;
end;
}
}
var
CompanyInfo5: Record "Company Information";
Rereads,
Alok
Please verify if you find my answer helpful
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156