Empty Variable invisible

Hi... I have a question...

I'm trying to write labels directly from a databse, with the usual fields name, adress and so on... In this particular db, i have 2 name fields. Name 2 only applies if there is a c/o adress, otherwise it's empty...

Now i have setup this report. Masterband in 2 columns, with one memo field, containing the label setup inside, like below

"Name", "Call"
"Name 2"
"Adress"
"ZIP" "City"

I would like if it where possible to ommit the printing of "NAME 2", if it is empty. As of now, it leaves an empty line on my lable and that i don't like.

Would it be possible for me to have this wish??

/Finn

Comments

  • edited 6:20AM
    Hmmmmm... I think you need to put this memo on a band alone.

    So, you can use the Stretched property.

    Regards.
  • edited 6:20AM
    In one Band???

    As of now, it is located in one band, but with 2 columns, so as to make it usable for printing labels as it should...

    Pls explain in more details, what you have in mind...

    /Finn
  • gordkgordk St.Catherines On. Canada.
    edited 6:20AM
    in the obp of the band test for null or '' depending upon engine option settings
    then modify the lines of the memo, or in the memo itself use the iif function provided to swap the datafield used starting at line2 of the memo and repeating untill last line where you insert '' for the true value
    to print labels horizontal 1, 2 ,3 set bands column property
    to print vertically
    1,3
    2,4 use page columns.
  • edited 6:20AM
    Hi... I have tried this, but keep getting the error ')' expected...

    [Medlemmer."Navn 1"], [Medlemmer."Call"]
    [IIF(<Medlemmer."Navn 2"> = '',<Medlemmer."Adresse">,<Medlemmer."Navn 2">)]
    [IIF(<Medlemmer."Navn 2"> = '',[IIF(<Medlemmer."PostNr"> = 9999,<Medlemmer."Udlands Adresse">,<Medlemmer."PostNr">)] [IIF(<Medlemmer."PostNr"> = 9999,'',<FrxDBDataSet3."By">)],Medlemmer."Adresse")])]
    [IIF(<Medlemmer."Navn 2"> = '','',[IIF(<Medlemmer."PostNr"> = 9999,<Medlemmer."Udlands Adresse">,<Medlemmer."PostNr">)] [IIF(<Medlemmer."PostNr"> = 9999,'',<FrxDBDataSet3."By">)])]


    The nested IIF's are because i have a zip-code database i inner-join and if the zip is 9999 then i will have to use another dbfield called 'Udlands Adresse', instead of both 'PostNr' and 'By'.....

    The other.. I'm not sure what you mean with 'in the obp of the band' !?!

    /Finn
  • edited 6:20AM
    Hi

    Sorry... OBP (OnBeforePrint) i get now, but i have tried to check here and maybe se the CurX / Y... But this i can't get to work...

    And moving around with the data fields here, i'm not sure how to do..

    /Finn
  • gordkgordk St.Catherines On. Canada.
    edited 6:20AM
    since everything is contained in one memo
    look at what you missed in your true value and false value.
    To display a data field value in a memo you use []
    [Medlemmer."Navn 1"], [Medlemmer."Call"]
    you are going to replace text on line 2 of the memo
    [Medlemmer."Navn 2"] with [Medlemmer."Adresse"] if navn2 is empty
    since like delphi ' are stripped your line will look as below
    [IIF(<Medlemmer."Navn 2"> = '','[Medlemmer."Adresse"],'[Medlemmer."Navn 2"]')]

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.