Page 1 of 1

Variable from other databand does not run in subreport

Posted: Thu Sep 22, 2016 2:23 am
by phuongtn2010
Hi,
I have a problem with parameter.
- I have a Databand1.category(cat_id, cat_name)
- In databand I insert a subreport: I insert databand2 in subreport with query command. In this query I insert a variable(is cat_id of databand1)

--> But it just fill the first value of databand1, it does not run other records

This is my query:
select t.ten_tm , t.ma_tm, l.CHUTHICH
from tentm t, loaitm l where t.MA_TM in (select regexp_substr(l.CHUTHICH, '[^, ]+', 1, level)from dual
CONNECT by regexp_substr(l.CHUTHICH, '[^, ]+', 1, level) is not null)

and l.id = {loaitm.ID} (problem in this line)


thanks

Re: Variable from other databand does not run in subreport

Posted: Thu Sep 22, 2016 11:29 am
by HighAley
Hello.

The sub-report is rendered an a new page. The variables from the main report are not available.
Please, try to use the Sub-report Parameters.

Or you could use Panels instead of the sub-reports.

Thank you.

Re: Variable from other databand does not run in subreport

Posted: Wed Sep 28, 2016 3:17 am
by phuongtn2010
Thank you, I solved it :)

Re: Variable from other databand does not run in subreport

Posted: Wed Sep 28, 2016 7:43 am
by HighAley
Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.