0
votes

I have this problem. I'm trying to do a report using iReport. This is my master query:

SELECT r.idreq AS Id, d.denom AS Dependencia, t.denom AS TipoProceso, r.docproceso AS DocProceso
FROM requerimiento r, cotizacion c, dependencia d, tipoproceso t
WHERE r.idreq=c.idreq AND r.iddepen=d.iddepen AND r.idtipoproc=t.idtipoproc
AND c.estado=true AND r.idreq=$P{pIdReq} 

As you see, there exists pIdReq parameter in the master report, now in the master detail I've added a subreport, that subreport has this query call SPCuadroComparativo3($P{pIdReq}). I wanna know how can I get linking both parameters? Or how can I use the parameter from master report?

1

1 Answers

1
votes

Create the parameter in main Report pIdReq.Drag and drop a sub Reprot.Go to sup Report properties click on PARAMETERS it will ask for add sup report parameter.So add the parameter name pIdReq then expression map with main Report parameter i.e pIdReq.Go to sub report create the parameter name same as pIdReq. you can use now the sub report parameter in sub report query which is linked with main report parameter pIdReq by $P{pIdReq}

*create the main report parameter by name pIdReq.
*Goto properties of subReport configure Parameters.
*Add the same Parameter Name in sub report.
*Put the sub report parameter in sub report query

.