I am attempting to write a label report that will include an item’s Extended Text. Since Extended Text is not a field in the Item table I am using a GET statement to get the Extended Text line as follows: ExtendedTextLine.GET(Item.“No.”); The report compiles, but when I run the report I get the following error: “The expression Code cannot be type-converted to an Option value.” Not sure of the cause of the error, or if this is the best way to include the item’s extended text on my report. Any suggestions are greatly appreciated.
The best and most simple way would be to include the Extended Text table as a DataItem in your Report.
Hi Steve, The GET function retrieves ONE line with the primary key value you specify. The primary key of this table is a combination of those fields: “Table Name”,“No.”,“Language Code”,“Text No.”,“Line No.” Also, the Extended Text Line table can contain more than one line for an item. For those reasons, you cannot simply use the GET function. The suggestion of Alberto would be more simple. Make sure you link you DataItem with the “Item No.” and you set your table view to show only the TableName::item.
Thanks for the response guys. I have tried adding Extending Text Line as a data item. What Navision wants to do is force me to print data from the Extended Text Line table in the Extended Text Line body section of the report. I know I should know how to do this but, how do I get the “Text” field from the Extended Text Line to print in the Item body section of my report. Thanks again for all the help.
quote:
Originally posted by steve37665
…how do I get the “Text” field from the Extended Text Line to print in the Item body section of my report. Thanks again for all the help.
You can’t, because the “Extended Text Line” DataItem is processed after the Item DataItem. If you use the body of “Extended Text Line”, you will obtain something like this: Item 1920-S ANTWERP Conference Table Ext. Text: To go with our conference table, we recommend our guest chairs, which are available in black, blue, green and yellow. Item 1924-W CHAMONIX Base Storage Unit Ext. Text: Blabla ...
If you don’t like it, try instead to show the values of the Item table in the “Extended Text Line” body section.
quote:
Originally posted by dgodbout
If you don’t like it, try instead to show the values of the Item table in the “Extended Text Line” body section.
I would rather use the “Extended Text Line”'s header section… You would not want to have the item data printed over and over again, once for each extended text line [;)]