Page 2 of 2

Re: Report and iFrame method problem

PostPosted: Thu Aug 06, 2020 9:25 am
by admin
Thanks.

Re: Report and iFrame method problem

PostPosted: Thu Aug 06, 2020 7:37 pm
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
Przechwytywanie.JPG (22.69 KiB) Viewed 490 times

but for final solution you need to define more automatic solution :-)

Re: Report and iFrame method problem

PostPosted: Fri Aug 07, 2020 3:38 pm
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.

Re: Report and iFrame method problem

PostPosted: Sun Aug 09, 2020 9:53 am
by admin
Hello people,

This should now be fixed.

Please test it.


Steven

Re: Report and iFrame method problem

PostPosted: Mon Aug 10, 2020 10:06 pm
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

Re: Report and iFrame method problem

PostPosted: Sun Aug 16, 2020 11:57 pm
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.

Re: Report and iFrame method problem

PostPosted: Mon Aug 17, 2020 6:19 am
by admin
No worries.

Steven