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
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
So, you can use the Stretched property.
Regards.
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
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.
[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
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
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"]')]