Report and iFrame method problem

Questions related to nuBuilder Forte Reports and the Report Builder.

Re: Report and iFrame method problem

Postby admin » Thu Aug 06, 2020 9:25 am

Thanks.
admin
Site Admin
 
Posts: 3372
Joined: Mon Jun 15, 2009 9:53 am

Re: Report and iFrame method problem

Postby Janusz » Thu Aug 06, 2020 7:37 pm

@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 489 times

but for final solution you need to define more automatic solution :-)
If you like nuBuilder, please leave a review on SourceForge
Janusz
 
Posts: 358
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Report and iFrame method problem

Postby kev1n » Fri Aug 07, 2020 3:38 pm

@Janusz: This seems like a good/easy to implement workaround. And hopefully there will be a fix soon. Let's keep our fingers crossed.
kev1n
 
Posts: 1038
Joined: Mon Oct 15, 2018 2:13 am

Re: Report and iFrame method problem

Postby admin » Sun Aug 09, 2020 9:53 am

Hello people,

This should now be fixed.

Please test it.


Steven
admin
Site Admin
 
Posts: 3372
Joined: Mon Jun 15, 2009 9:53 am

Re: Report and iFrame method problem

Postby kev1n » Mon Aug 10, 2020 10:06 pm

@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
kev1n
 
Posts: 1038
Joined: Mon Oct 15, 2018 2:13 am

Re: Report and iFrame method problem

Postby mariorog » Sun Aug 16, 2020 11:57 pm

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.
mariorog
 
Posts: 6
Joined: Sat Jul 25, 2020 12:58 am

Re: Report and iFrame method problem

Postby admin » Mon Aug 17, 2020 6:19 am

No worries.

Steven
admin
Site Admin
 
Posts: 3372
Joined: Mon Jun 15, 2009 9:53 am

Previous

Return to Reports