Printing Data from the Form / Database collection

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
bartek.skrajnowski
Enthusiast
Posts: 6
Joined: Thu Feb 20, 2020 3:19 pm

Printing Data from the Form / Database collection

Post by bartek.skrajnowski » Thu Feb 20, 2020 3:33 pm

Hi all.
I need Your help, I couldnt find anything in other existing topics.
I want to create a form (solution) with some database fields.
1st field is a combo box to pick the specific record. after we choose the correct entry in combobox below 2 fields should fill with data according to the choose we made. So we pick the item number and the field below should be filled with the description of the item automaticaly (from the data base).

Ive already tried different fields but I cant find a way how to use a diiferent fields from the database row, which are connected with variable.
how to do it correct? see the sample in attachment.
Bartek
Attachments
form1.PNG
form1.PNG (2.71 KiB) Viewed 2358 times

bartek.skrajnowski
Enthusiast
Posts: 6
Joined: Thu Feb 20, 2020 3:19 pm

Re: Printing Data from the Form / Database collection

Post by bartek.skrajnowski » Fri Feb 21, 2020 1:29 pm

Additionally I want to admin that I know that I could use an object table and it would work perfectly but i want to do it with a combo box.
Is it possible?

highfrost
Valued Contributor
Posts: 34
Joined: Tue Aug 19, 2014 10:51 am

Re: Printing Data from the Form / Database collection

Post by highfrost » Fri Feb 21, 2020 1:44 pm

Hello,

yes this is possible :)
First of all I would make a view of your database for the combo box list.
Attach the view or entire database to your solution.
Use the database field you want as the item source for you combo box.

Next choose a source variable. When you select something in your combo box this variable will get this value.

Next attach the entire database a second time (or first time if you used a view) to your solution and put a filter on this database. I usually do an SQL statement; just add WHERE [column name] = :variablename.

This will give you a database with only the records selected via the combo box.
Of course you can show these database fields in whatever fashion you would like.

Hope this helps.

bartek.skrajnowski
Enthusiast
Posts: 6
Joined: Thu Feb 20, 2020 3:19 pm

Re: Printing Data from the Form / Database collection

Post by bartek.skrajnowski » Fri Feb 21, 2020 2:46 pm

I did almost all, You adviced. thanks
and I can assign variable (attached to new database field with a filter) to a field. But that field presents only 1 data from the database.
So when I choose item index and will store that in a variable I can use that variable later in other fields. But in the database I have: Index, Description, CodeName.
So how can I present data in other fields? How to make a combo with index (that is already expained:)) and below two fields with data Description and CodeName which are filled wright after You choose Index from Combo?

bartek.skrajnowski
Enthusiast
Posts: 6
Joined: Thu Feb 20, 2020 3:19 pm

Re: Printing Data from the Form / Database collection

Post by bartek.skrajnowski » Fri Feb 21, 2020 2:49 pm

My fault. Sorry. You ve already explained that!.
I try keep on reading with undrestanding;)
Thanks a Lot!

Post Reply