Using parameter in datasource condition

Kishan Bhat <[email protected]> Mon, 14 Mar 2011 08:30:53 +0530
Newsgroups gmane.comp.gnu.enterprise.general
Message-ID <[email protected]>
--===============1162290820==
Content-Type: multipart/alternative; boundary=0015173ff0581437a9049e68850f

--0015173ff0581437a9049e68850f
Content-Type: text/plain; charset=ISO-8859-1

Hello All,

Can I use parameter values inside datasource condition definition? I've
underlined the line of interest, the excerpt from my report.grd xml

=============================
  <parameters>
     <parameter name="printInvId" description="Invoice ID" default="0"/>
  </parameters>

  <sources>
   <datasource database="mipltest" name="dts_invoice_item"
table="invoice_item">
    <condition>
   <and>
   <eq>
    <cfield name="uid_invoice"/>
* **  ** **<cconst value="printInvId"/>*
   </eq>
   <gt>
    <cfield name="quantity"/>
    <cconst value="0"/>
   </gt>
   </and>
   </condition>
   </datasource>
  </sources>
=============================

I need to generate reports for a specific invoice id only, by passing the id
as a parameter.

Thanks,
Kishan

--0015173ff0581437a9049e68850f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Hello All,</div><div><br></div><div>Can I use parameter values inside =
datasource condition definition? I&#39;ve underlined the line of interest, =
the excerpt from my report.grd xml</div><div><br></div><div>=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</d=
iv>
<div>=A0=A0&lt;parameters&gt;</div><div>=A0=A0 =A0 &lt;parameter name=3D&qu=
ot;printInvId&quot; description=3D&quot;Invoice ID&quot; default=3D&quot;0&=
quot;/&gt;</div><div>=A0=A0&lt;/parameters&gt;</div><div><br></div><div>=A0=
=A0&lt;sources&gt;</div>
<div>=A0=A0 &lt;datasource database=3D&quot;mipltest&quot; name=3D&quot;dts=
_invoice_item&quot; table=3D&quot;invoice_item&quot;&gt;</div><div>=A0=A0<s=
pan class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>=A0&lt;condi=
tion&gt;</div><div>
<span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span>=A0=A0=A0=
&lt;and&gt;</div><div><span class=3D"Apple-tab-span" style=3D"white-space:p=
re">			</span>=A0=A0=A0&lt;eq&gt;</div><div>=A0=A0<span class=3D"Apple-tab-=
span" style=3D"white-space:pre">				</span>=A0&lt;cfield name=3D&quot;uid_i=
nvoice&quot;/&gt;</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre"><i>		</i></sp=
an><i>=A0=A0</i><span class=3D"Apple-tab-span" style=3D"white-space:pre"><i=
>	 	</i></span><i><u>&lt;cconst value=3D&quot;printInvId&quot;/&gt;</u></i>=
</div><div>
<span class=3D"Apple-tab-span" style=3D"white-space:pre">			</span>=A0=A0=
=A0&lt;/eq&gt;</div><div><span class=3D"Apple-tab-span" style=3D"white-spac=
e:pre">			</span>=A0=A0=A0&lt;gt&gt;</div><div><span class=3D"Apple-tab-spa=
n" style=3D"white-space:pre">				</span>=A0=A0 =A0&lt;cfield name=3D&quot;q=
uantity&quot;/&gt;</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">				</span>=
=A0=A0 =A0&lt;cconst value=3D&quot;0&quot;/&gt;</div><div><span class=3D"Ap=
ple-tab-span" style=3D"white-space:pre">			</span>=A0=A0=A0&lt;/gt&gt;</div=
><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span>=A0=
=A0=A0&lt;/and&gt;</div>
<div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>=A0=
=A0=A0&lt;/condition&gt;</div><div>=A0=A0 &lt;/datasource&gt;</div><div>=A0=
=A0&lt;/sources&gt;</div><div>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</div><div><br></div><div>I need =
to generate reports for a specific invoice id only, by passing the id as a =
parameter.</div>
<div><br></div><div>Thanks,</div><div>Kishan</div>

--0015173ff0581437a9049e68850f--


--===============1162290820==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnue

--===============1162290820==--