Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Report and iFrame method problem
-
- 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
@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:
and for WHERE in the raport in SQL use:
For initial test insert manually the user IDs (to be able to use update from mysql)
the table can look like this but for final solution you need to define more automatic solution
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);
Code: Select all
...
WHERE con_part=(select rec_id from raport2 where rap_user='#USER_ID#')
the table can look like this 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
-
- 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
@Janusz: This seems like a good/easy to implement workaround. And hopefully there will be a fix soon. Let's keep our fingers crossed.
-
- 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
@Steven: The change works for me!
@mariorog:
You can simply change the line
with this one
in the file nuajax.js, Line 170
https://github.com/steven-copley/nubuil ... ax.js#L170
@mariorog:
You can simply change the line
Code: Select all
last.hash = nuHashFromEditForm();
Code: Select all
last.hash = parent.nuHashFromEditForm();
https://github.com/steven-copley/nubuil ... ax.js#L170
-
- Posts: 6
- Joined: Fri Jul 24, 2020 5:28 pm
Re: Report and iFrame method problem
Dear Kev1n and Steven,kev1n wrote:@Steven: The change works for me!
@mariorog:
You can simply change the line
with this oneCode: Select all
last.hash = nuHashFromEditForm();
in the file nuajax.js, Line 170Code: Select all
last.hash = parent.nuHashFromEditForm();
https://github.com/steven-copley/nubuil ... ax.js#L170
the change works for me too !!!!!
Thanks A LOT for your time.
All the best.