It's all about the answers!

Ask a question

Issue with onFetch in RTC-BIRT reports


Timothy McMackin (153106) | asked Apr 18 '11, 12:14 p.m.
JAZZ DEVELOPER
Hello all,

I'm having trouble with adding scripts to the onFetch method of simple RTC-BIRT data sets. Is the following an issue with RTC or BIRT, or am I using onFetch wrong?

I create a simple report data set, for example retrieving work items for which I am the owner. In this data set's beforeOpen method, I declare a variable and set it to zero:

onFetchCounter = 0;

In the data set's onFetch method, I increment the variable:

onFetchCounter++;

Then I add a text field that displays the value of onFetchCounter to the table on the report. The resulting table looks like this:

WI_ID	onFetchCounter

123 2
456 3
789 4
012 5
345 6
678 6


The counter starts at 2, which is not a big deal, but it seems that the onFetch method does not run between the second-last and last rows. Am I not using onFetch right?

I'm using RTC client/server 2.0.0.2.

4 answers



permanent link
Milan Krivic (98013176143) | answered Apr 19 '11, 3:50 a.m.
Hello all,

I'm having trouble with adding scripts to the onFetch method of simple RTC-BIRT data sets. Is the following an issue with RTC or BIRT, or am I using onFetch wrong?

I create a simple report data set, for example retrieving work items for which I am the owner. In this data set's beforeOpen method, I declare a variable and set it to zero:

onFetchCounter = 0;

In the data set's onFetch method, I increment the variable:

onFetchCounter++;

Then I add a text field that displays the value of onFetchCounter to the table on the report. The resulting table looks like this:

WI_ID	onFetchCounter

123 2
456 3
789 4
012 5
345 6
678 6


The counter starts at 2, which is not a big deal, but it seems that the onFetch method does not run between the second-last and last rows. Am I not using onFetch right?

I'm using RTC client/server 2.0.0.2.


Hi tmcmack,

I tried same thing as you, but this works for me. I can send you example if you want. I did everything what you did.

Regards,

permanent link
Dhanya Saseendran (8831621) | answered Apr 19 '11, 6:38 a.m.
Hello all,

I'm having trouble with adding scripts to the onFetch method of simple RTC-BIRT data sets. Is the following an issue with RTC or BIRT, or am I using onFetch wrong?

I create a simple report data set, for example retrieving work items for which I am the owner. In this data set's beforeOpen method, I declare a variable and set it to zero:

onFetchCounter = 0;

In the data set's onFetch method, I increment the variable:

onFetchCounter++;

Then I add a text field that displays the value of onFetchCounter to the table on the report. The resulting table looks like this:

WI_ID	onFetchCounter

123 2
456 3
789 4
012 5
345 6
678 6


The counter starts at 2, which is not a big deal, but it seems that the onFetch method does not run between the second-last and last rows. Am I not using onFetch right?

I'm using RTC client/server 2.0.0.2.


Hi tmcmack,

I tried same thing as you, but this works for me. I can send you example if you want. I did everything what you did.

Regards,

I am also having trouble in using the fetch counter. I am trying to do a summation of timespent from children at the parent level. And since my onFetch method is not proper, I am getting a ruuning sum rather than sum ar each parent level.

Would be great if you could share your scirpt which is working and if you could mention the RTC version.
My RTC version is 2.0.0.2 same as Tim's.

Regards,
Dhanya

permanent link
Milan Krivic (98013176143) | answered Apr 19 '11, 7:14 a.m.
Hello all,

I'm having trouble with adding scripts to the onFetch method of simple RTC-BIRT data sets. Is the following an issue with RTC or BIRT, or am I using onFetch wrong?

I create a simple report data set, for example retrieving work items for which I am the owner. In this data set's beforeOpen method, I declare a variable and set it to zero:

onFetchCounter = 0;

In the data set's onFetch method, I increment the variable:

onFetchCounter++;

Then I add a text field that displays the value of onFetchCounter to the table on the report. The resulting table looks like this:

WI_ID	onFetchCounter

123 2
456 3
789 4
012 5
345 6
678 6


The counter starts at 2, which is not a big deal, but it seems that the onFetch method does not run between the second-last and last rows. Am I not using onFetch right?

I'm using RTC client/server 2.0.0.2.


Hi tmcmack,

I tried same thing as you, but this works for me. I can send you example if you want. I did everything what you did.

Regards,

I am also having trouble in using the fetch counter. I am trying to do a summation of timespent from children at the parent level. And since my onFetch method is not proper, I am getting a ruuning sum rather than sum ar each parent level.

Would be great if you could share your scirpt which is working and if you could mention the RTC version.
My RTC version is 2.0.0.2 same as Tim's.

Regards,
Dhanya

Dhanya,

Can you please send me your report design file to my mail, so I can see how do you organize your parent-child work items on report, it would be the better way to help you.

my mail: milan.krivic@apis-it.hr

Regards,

permanent link
Dhanya Saseendran (8831621) | answered Apr 20 '11, 8:20 a.m.
For the benefit of others wathing this topic, Milan helped to use another event called onRender. And my queries are working fine now.

Thanks a lot
Dhanya

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.