Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

select field not printable (empty column when printing browse form)

Questions related to using nuBuilder Forte.
Post Reply
Andrea
Posts: 29
Joined: Sun Jan 02, 2022 10:18 am
Been thanked: 1 time

select field not printable (empty column when printing browse form)

Unread post by Andrea »

Hello all,

I have a form with a select field for selecting values from another table. It works fine but when I am in browse view and I click the print button (nuActionButton) to call nuPrintAction() the resulting "print table" has an empty column instead of showing the selected values.
A second thing I noticed is that on this "print table" date values do not show up in the date format applied to the date field on the forms.

As I really like this print feature I would be very happy if anyone knows how to fix this.
Thankyou very much in anticipation!

Best wishes

Andrea
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: select field not printable (empty column when printing browse form)

Unread post by kev1n »

Hi Andrea,

Would it be possible to create a minimal working example (maybe in a separate db), dump the db and upload it here?
This would make it a lot easier to understand and track down the issue.
Andrea
Posts: 29
Joined: Sun Jan 02, 2022 10:18 am
Been thanked: 1 time

Re: select field not printable (empty column when printing browse form)

Unread post by Andrea »

Hi Kev1n,

thankyou for the swift reply!
I finally found the reason why the select-values were not available in print table.
I had 2 fields of the same name with different content in the two tables. It worked but was no clean way.

Table projektleiter:
projektleiter_id
projektleiter <- name of project leader

Table projekte:
projekte_id
projektnr
projekt
projektleiter <- projektleiter_id of table projektleiter

SQL on browse form projekte:

Code: Select all

SELECT * FROM projekte INNER JOIN projektleiter ON projekte.projektleiter = projektleiter_id ORDER BY projektnr;
display field in browse form: projektleiter.projektleiter



The solution was renaming the field 'projektleiter' in table projekte to 'projektleiterid' to have unique field names:

Table projektleiter:
projektleiter_id
projektleiter

Table projekte:
projekte_id
projektnr
projekt
projektleiterid <- projektleiter_id of table projektleiter

SQL on browse form projekte:

Code: Select all

SELECT * FROM projekte INNER JOIN projektleiter ON projektleiterid = projektleiter_id ORDER BY projektnr;
display field in browse form: projektleiter


Now print table is complete :-)

Thankyou!

Best wishes

Andrea
Last edited by admin on Sat Jan 08, 2022 7:26 am, edited 1 time in total.
Reason: added code tags
Andrea
Posts: 29
Joined: Sun Jan 02, 2022 10:18 am
Been thanked: 1 time

Re: select field not printable (empty column when printing browse form)

Unread post by Andrea »

Hi again,

I just made a test with an other table. If you give the full name (tablename.fieldname) for display in browse form the columns value show up in browse form but not in print table. It always has to be only the fieldname.

Example:

-> empty column:
1.JPG
2.JPG
3.JPG
-> all fine:
4.JPG
2.JPG
5.JPG
You do not have the required permissions to view the files attached to this post.
Post Reply