By: Keith Berman - bobbassen
Display n # of rows in report.
2002-10-29 12:30
Is it possible to display only a subset of the rows from a result set based on a parameter. For example, my result set has 1000 rows but I only want to show the first 100 in the report. I was planning on passing the number of rows in as a parameter and then using a count variable to compare against that parameter using the printWhenExpression.
Is there an easier way?
Thanks in advance!!
By: Teodor Danciu - teodord
RE: Display n # of rows in report.
2002-10-29 13:14
Hi,
I don't see an easier way or any other way at all.
Good luck!
Teodor
By: Alex Parfenov - aparfeno
RE: Display n # of rows in report.
2002-10-29 13:33
In informix, I can insert 'first XXX' into my select statement like so: 'select first 100 sku,desc, ... from product where ...' thus limiting number of records brought back. I am not sure if such device exists in Oracle or MS-SQL. If your database supports it, I believe you can use JR's query arguement to embed your MRW right into the query (I think the JR syntax might me slightly different since you are not passing a whereClause parameter, but simply a part of the SQL query). If this is possible in your situation, this solution would be much more efficient since you are not going to pull unnecessary rows from database.
By: Keith Berman - bobbassen
RE: Display n # of rows in report.
2002-11-05 12:57
It does exist but I think it will slow down the processing and make are SQL retrieval less efficient.
One problem with only printing the first n rows on my report is that the remaining rows that are not printed still add a blank line to the report. This causes my summary to appear many lines after the results I have displayed. Is there any easy way around this. If not, I think I can move my summary info into the detail area and try to print it 1 time, after my nth row has printed.
By: Teodor Danciu - teodord
RE: Display n # of rows in report.
2002-11-05 13:07
Hi,
Have you seen that you have
<printWhenExpression>
also at band level.
In newer versions, of course.
The blank should not appear if you remove
the entire report band and not each and every
element on that band.
Still, the blank space could also be removed
if you set isRemoveWhenBlank="true" to all
of them.
Thank you,
Teodor
By: Teodor Danciu - teodord
RE: Display n # of rows in report.
2002-11-05 13:09
Sorry, I meant
isRemoveLineWhenBlank="true"
Teodor
By: Keith Berman - bobbassen
RE: Display n # of rows in report.
2002-11-05 13:07
I found the isRemoveLineWhenBlank="true" option, that handled it, thanks!!
Display n # of rows in report.
2002-10-29 12:30
Is it possible to display only a subset of the rows from a result set based on a parameter. For example, my result set has 1000 rows but I only want to show the first 100 in the report. I was planning on passing the number of rows in as a parameter and then using a count variable to compare against that parameter using the printWhenExpression.
Is there an easier way?
Thanks in advance!!
By: Teodor Danciu - teodord
RE: Display n # of rows in report.
2002-10-29 13:14
Hi,
I don't see an easier way or any other way at all.
Good luck!
Teodor
By: Alex Parfenov - aparfeno
RE: Display n # of rows in report.
2002-10-29 13:33
In informix, I can insert 'first XXX' into my select statement like so: 'select first 100 sku,desc, ... from product where ...' thus limiting number of records brought back. I am not sure if such device exists in Oracle or MS-SQL. If your database supports it, I believe you can use JR's query arguement to embed your MRW right into the query (I think the JR syntax might me slightly different since you are not passing a whereClause parameter, but simply a part of the SQL query). If this is possible in your situation, this solution would be much more efficient since you are not going to pull unnecessary rows from database.
By: Keith Berman - bobbassen
RE: Display n # of rows in report.
2002-11-05 12:57
It does exist but I think it will slow down the processing and make are SQL retrieval less efficient.
One problem with only printing the first n rows on my report is that the remaining rows that are not printed still add a blank line to the report. This causes my summary to appear many lines after the results I have displayed. Is there any easy way around this. If not, I think I can move my summary info into the detail area and try to print it 1 time, after my nth row has printed.
By: Teodor Danciu - teodord
RE: Display n # of rows in report.
2002-11-05 13:07
Hi,
Have you seen that you have
<printWhenExpression>
also at band level.
In newer versions, of course.
The blank should not appear if you remove
the entire report band and not each and every
element on that band.
Still, the blank space could also be removed
if you set isRemoveWhenBlank="true" to all
of them.
Thank you,
Teodor
By: Teodor Danciu - teodord
RE: Display n # of rows in report.
2002-11-05 13:09
Sorry, I meant
isRemoveLineWhenBlank="true"
Teodor
By: Keith Berman - bobbassen
RE: Display n # of rows in report.
2002-11-05 13:07
I found the isRemoveLineWhenBlank="true" option, that handled it, thanks!!
0 Answers:
No answers yet