If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

total number of rows

Started by mariyana, 30 May 2007 11:03:38 PM

Previous topic - Next topic

mariyana

*****where can i get total number of rows that are there in a report. I am able to see it in
Report->Query->Profile but for prompts it gives the number of rows for the current prompts and not for the total rows of the report. How can get this..........

Alacran

In the Insert Menu you can find a "Row numbers" object.

Regards...

mariyana

Actually that option is displaying the row numbers in the report next to each record. In this if we choose a prompt the it displays the row numbers next to each record that is available in that prompt.

But i need a place where i can view the total row number of rows irrrespective of the prompt. I am writing a program in vb to retrive the total rows in each report. If it is a simpe report (without prompt and frames) then this is achieved by giving

********************************************************************
dim objimpapp as object
dim objimprep as object

Set objimpapp = CreateObject("CognosImpromptu.Application")
Set objimprep = objimpapp.OpenReport("C:\Program Files\Cognos\cer4\samples\Impromptu\reports\currency.imr")

objimprep.RetriveAll

********************************************************************

but this is not possible with prompts,since it displays the total rows for that prompt choosen and not for the total report


cognosfreelancer

Mariyana

You can achieve your goal by creating a calculated column in the Impromptu report and then referring to the column in your VB code.

This is straightforward enough. I remember doing this sometime back.

Step 1:

Create a calculation with a fixed value of 1. Call it calcA.

Step 2:

Create another calculation that does a total(calcA) and call it calcB.

Ensure both calculations do not show up in the report display.


Refer to this calculation from the code using the 'QueryItem' object of the Impromptu object model

HTH
NKT