Welcome to the nuBuilder Forums!

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

Printing a browse form when using temporary tables

Questions related to using nuBuilder Forte.
Locked
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Printing a browse form when using temporary tables

Unread post by Fike »

I have a browse form which table content is retreived from diferent tables using the 'Before browse' php section, creating a temporary table wiht the hash variable #TABLE_ID#

Therefore the SQL of the browse form is: SELECT * FROM #TABLE_ID#

This works fine when displaying the browse form. However, when pressing the 'Print' button, the new window only displays the headers of the table.

I checked the vale of 'last.browse_sql' in the nuPrintAction() function, and it is somthing like: SELECT title_01, title_02 FROM ___nu15a87637ede74e___ WHERE 1

This query throws an error becuase the tempory table created 'Before browsing' no longer exists.

Is there any workaround for this?

Kind regrads


Fike
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Printing a browse form when using temporary tables

Unread post by admin »

Fike,

At the moment, that is a bug.

A workaround, in the meantime, would be creating a VIEW instead of creating the temp table.

And using that as a TABLE.

Steven
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Printing a browse form when using temporary tables

Unread post by Fike »

The view worked great!

Thank's a lot Steven!
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Printing a browse form when using temporary tables

Unread post by admin »

.
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Printing a browse form when using temporary tables

Unread post by Timo »

admin wrote:Fike,

At the moment, that is a bug.

A workaround, in the meantime, would be creating a VIEW instead of creating the temp table.

And using that as a TABLE.

Steven
When can we expect a fix? Using a VIEW is no option for me. (need to dynamically create the sql statement). Thank you.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Printing a browse form when using temporary tables

Unread post by admin »

Timo,

The Print Button should now work using #TABLE_ID#


Steven
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Printing a browse form when using temporary tables

Unread post by Timo »

Thanks! I'll try it out as soon as I have a chance.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Printing a browse form when using temporary tables

Unread post by admin »

.
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: Printing a browse form when using temporary tables

Unread post by Timo »

It works like a charm :D
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Printing a browse form when using temporary tables

Unread post by admin »

.
Locked