Welcome to the nuBuilder Forums!

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

Report and iFrame method problem

Questions related to nuBuilder Forte Reports and the Report Builder.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Report and iFrame method problem

Unread post by admin »

Thanks.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Report and iFrame method problem

Unread post by Janusz »

@mariorog
the main issue is how to transfer record ID to the report placed inside the iframe.
If no other possibility you can use temporary table where you store user by user current ID of the main from (or other data).
Just create table ex. raport2 with 2 fields rap_user and rec_id
you can set the value with PHP Before Edit:

Code: Select all

$q="UPDATE raport2 set rec_id='#RECORD_ID#' WHERE rap_user = '#USER_ID#';";
$t  = nuRunQuery($q);
and for WHERE in the raport in SQL use:

Code: Select all

...
WHERE con_part=(select rec_id from raport2 where rap_user='#USER_ID#')
For initial test insert manually the user IDs (to be able to use update from mysql)
the table can look like this
Przechwytywanie.JPG
but for final solution you need to define more automatic solution :-)
You do not have the required permissions to view the files attached to this post.
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Report and iFrame method problem

Unread post by kev1n »

@Janusz: This seems like a good/easy to implement workaround. And hopefully there will be a fix soon. Let's keep our fingers crossed.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Report and iFrame method problem

Unread post by admin »

Hello people,

This should now be fixed.

Please test it.


Steven
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Report and iFrame method problem

Unread post by kev1n »

@Steven: The change works for me!

@mariorog:

You can simply change the line

Code: Select all

last.hash 			= nuHashFromEditForm();
with this one

Code: Select all

last.hash 			= parent.nuHashFromEditForm();
in the file nuajax.js, Line 170
https://github.com/steven-copley/nubuil ... ax.js#L170
mariorog
Posts: 6
Joined: Fri Jul 24, 2020 5:28 pm

Re: Report and iFrame method problem

Unread post by mariorog »

kev1n wrote:@Steven: The change works for me!

@mariorog:

You can simply change the line

Code: Select all

last.hash 			= nuHashFromEditForm();
with this one

Code: Select all

last.hash 			= parent.nuHashFromEditForm();
in the file nuajax.js, Line 170
https://github.com/steven-copley/nubuil ... ax.js#L170
Dear Kev1n and Steven,
the change works for me too !!!!!

Thanks A LOT for your time.
All the best.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Report and iFrame method problem

Unread post by admin »

No worries.

Steven
Post Reply