Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Using computed fields with parameters
filbert
I have an Oracle report that uses a compute field - Total.runningCount() - to number rows in the report. I call it RowNum and it works fine.
I wanted to produce a report that allowed the user to cap the number of rows returned (mostly for testing to allow wide ranging data selection without producing unwieldy reports). So I set a parameter and used "where RowNum < ?" in the SQL. It worked.
Now I am trying to do it again (on MSSQL,bit that can't be relevant, surely) but it doesn't work. BIRT complains that it has never heard of RowNum (I'm paraphrasing!). I can understand that it might not be possible to use computed fields in an SQL query, disappointing but understandable. However, why did it work once and not again!
It's not just the parameter, I can't do "where RowNum < 100" either.
This is BIRT 2.2.1, by the way.
If I can't do it with a calculated field, can anyone suggest a way of allowing the user to specify how many rows are returned?
TIA
Rgrds
Peter
Find more posts tagged with
Comments
mwilliams
Hi Peter,
The best way to limit it by a computed column will probably be with a filter on the dataSet or on the table you're displaying the data in.
rpolunsky
Peter,
Oracle generates a pseudocolumn named 'rownum'. Your original query is picking up that item, not the computed column. That's why it fails under MSSQL.
Richard