# REport:ASAP

**URL:** <https://www.dynamicsuser.net/t/report-asap/34079>\
**Category:** Technical Forum\
**Created:** [November 21, 2011, 8:53am UTC](https://www.dynamicsuser.net/t/report-asap/34079 "2011-11-21T08:53:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkiran](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@kkiran](https://www.dynamicsuser.net/u/kkiran)\
**Post date:** [November 21, 2011, 8:53am UTC](https://www.dynamicsuser.net/t/report-asap/34079/1 "2011-11-21T08:53:05Z")

</div>

I have to create a report which uses three table.I am using 4 to 5 display methods which has to print some values after calculation.I have a display method for no. of weeks paid as Paid weeks.this paid weeks has to come from a field from table known as serial no. against a particular employee at condition when another field named as paid which has boolean value is set as yes.

I have written query in execute section as

select count(serialno.) from contractmasterlinking where contractmasterlinking.paid==Noyes::yes;

Countserial=contractmasterlinking.serialno.;

this countseriali have defined in class declaration and returned in the display method.

I am not able to guess how to add condition for filtering the values against the employee dynamically within this code since my report is generating same values for all the records.

---

<div class="post-metadata">

**Author:** ![vinay\_singh](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@vinay\_singh](https://www.dynamicsuser.net/u/vinay_singh)\
**Post date:** [November 21, 2011, 9:18am UTC](https://www.dynamicsuser.net/t/report-asap/34079/2 "2011-11-21T09:18:07Z")

</div>

How do you input the employee Id or you want to generate the report for all the employees?

---

<div class="post-metadata">

**Author:** ![kkiran](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@kkiran](https://www.dynamicsuser.net/u/kkiran)\
**Post date:** [November 21, 2011, 9:34am UTC](https://www.dynamicsuser.net/t/report-asap/34079/3 "2011-11-21T09:34:27Z")

</div>

I want report to be generated for all employees.

---

<div class="post-metadata">

**Author:** ![vinay\_singh](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@vinay\_singh](https://www.dynamicsuser.net/u/vinay_singh)\
**Post date:** [November 21, 2011, 9:50am UTC](https://www.dynamicsuser.net/t/report-asap/34079/4 "2011-11-21T09:50:03Z")

</div>

I hope that contractmasterlinking table contains the employee Id(suppose EmplId) then you need to write the following code-

while select count(serialno.) from contractmasterlinking group by EmplId where contractmasterlinking.paid==Noyes::yes;  
{  
//Write the code  
Countserial=contractmasterlinking.serialno.;  
//Write the code  
}
