Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to print labels according conditions for each seperate record

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi !
In my app my users can choose what to print on a label.
Now they like to have kind of freedom to decide how to print the data (change layout within several separate lines)

e.g.
Data fields are :
-name1
-name2
-name3
-adress1
-adress2
-land

they might for a certain record to print
-name1
-name2+adress2
-land

but this might be for another record:
-name1+name2
-adress2+adress1

etc.

I made available a way to choose the layout for each record by using a special form with a numbers of buttons, representing part of the data, which can be dragged and dropped in the desired way. I can store that layout in a certain way. But how to dynamicly print the data according the custom label-layout?

-Bart
 
There would be a generic solution: Put all report controls in layout1 on a label detail band and set their printwhen property to layout=1, put all report controls in layout2 on the same detail band and set their printwhen property to layout=2 etc etc etc. then additional to all other data let your driving cursor or table have that field layout with the number of the layout you want.

It's just not maintainable, if it goes beyond 2 or 3 layouts, the detail would be scattered and you wont be able to select a single control without moving others aside first.

A better doable solution is to have a common simplified layout like line1,2,3,4,5 and let the report controls print fields you populate with data in different ways, depending on the layout needed. In the simplest case you really just need 1 report control in the size of the area you want to print on and set it's expression to a memo field and then compose whatever you want to print in the memo field where you can layout the data as needed in several lines of the memo of the report cursor. You can compose the memo from the single parts of the data like firstname, lastname, city, state, street, postal code etc. in any way you want, and the label is a one size fits all label, this way.

Bye, Olaf.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top