GeekInterview.com
Series: Subject: Topic:
Question: 4 of 211

Restricted rows display to the report page which should divisible by 5

Hi Techies, Need your help for achieving this requirement. We have got a requirement to display a report in a page which should display max 20 rows but if a report is having totally 17 rows then in the 1st page it has to display 15 rows(divisible by 5) and the other two rows should appear in the next page. Similarly, If a report is having 23 records then in the first page it should display 20 (divisible by 5) and on other page it should display 3 rows. Please advice!
Asked by: shah_nawazzz | Member Since Apr-2012 | Asked on: Apr 12th, 2012

View all questions by shah_nawazzz

Showing Answers 1 - 2 of 2 Answers
Ashish Sharma

Answered On : Apr 17th, 2012

Instead of doing this at cognos level, try to do it at SQL level using rownum function. Take the max of mod(rownum,5). then save the rownum value in a ?variable? and then take all the records where rownum>? Variable?

  
Login to rate this answer.
ASHOK KUMAR GUNTUPALLI

Answered On : Jun 14th, 2012

1.Drag a list report
2.Add the query items you need for the list report
3.Add a Query Calculation to the list report and name it as Running total,In the Expression Definition Type in
running-count([Query Item])
4. Add a Query Calculation to the list report and name it as Rows Display,In the Expression definition type in
floor([Running total]/17)
5. Go to the page Explorer and drag the page set to the page are
6. Change the Query of the page set to your list query
7. In the properties of the page set,click on the ellipses of sort and grouping
8.Drag the Row Display data item under grouping
9.Save and run the report.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.