Array in extra Memofield?

Hello everybody

I'm an absolute beginner in terms of Delphi and FastReport

We have a software with FastReport 5.4.4. I need to customize a report for a finished print template

My question is:
how can I directly address the arrays from MasterData1?

The following example:

We have articles with sub-articles.

Item No. 1 = main article
Item No. 100 = sub-article1
Item No. 200 = sub-article2
..
Item No. 900 = sub-article9

From this article I should now represent quantity, unit and sum in an extra memo field.
Extra memo field because I have to place it in the report because of print template (form)

I had tried it right in the memo field:
[IIF(<Positionsdaten."V.ARTNMMER"> = 100,(<Positionsdaten."V.ARTBEZEICHNUNG">''))]

So I would like it (code wrong):
if <Positionsdaten."V.ARTNMMER"> =100 then write <Positionsdaten."V.ARTBEZEICHNUNG"> in Memo1
if <Positionsdaten."V.ARTNMMER"> =200 then write <Positionsdaten."V.ARTBEZEICHNUNG"> in Memo2
if <Positionsdaten."V.ARTNMMER"> =300 then write <Positionsdaten."V.ARTBEZEICHNUNG"> in Memo3

Can someone help me with this, how do I realize that?

Do I have to enter this directly in the memo field or directly as a code?

I have no plan ... sorry ... I am grateful for any help



Comments

  • edited 10:30AM
    JeetKune wrote: »
    Hello everybody

    I'm an absolute beginner in terms of Delphi and FastReport

    We have a software with FastReport 5.4.4. I need to customize a report for a finished print template

    My question is:
    how can I directly address the arrays from MasterData1?

    The following example:

    We have articles with sub-articles.

    Item No. 1 = main article
    Item No. 100 = sub-article1
    Item No. 200 = sub-article2
    ..
    Item No. 900 = sub-article9

    From this article I should now represent quantity, unit and sum in an extra memo field.
    Extra memo field because I have to place it in the report because of print template (form)

    I had tried it right in the memo field:
    [IIF(<Positionsdaten."V.ARTNMMER"> = 100,(<Positionsdaten."V.ARTBEZEICHNUNG">''))]

    So I would like it (code wrong):
    if <Positionsdaten."V.ARTNMMER"> =100 then write <Positionsdaten."V.ARTBEZEICHNUNG"> in Memo1
    if <Positionsdaten."V.ARTNMMER"> =200 then write <Positionsdaten."V.ARTBEZEICHNUNG"> in Memo2
    if <Positionsdaten."V.ARTNMMER"> =300 then write <Positionsdaten."V.ARTBEZEICHNUNG"> in Memo3

    Can someone help me with this, how do I realize that?

    Do I have to enter this directly in the memo field or directly as a code?

    I have no plan ... sorry ... I am grateful for any help


    I'm not too sure what you're trying to accomplish. Did you get an error message with your IIF statement? It might work if you use == instead of =. = creates a variable or assigns a value whereas == compares ...V.ARTNMMER to 100 and returns ...V.ARTBEZEICHNUNG if they are the same.

    I've had the best luck entering code into the expression editor. The code tab doesn't seem to do anything but of course without documentation from Fast Report, it's hard to guess what the sheet is looking for (html tags? script tags??)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.