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

[Solved] Removing lines from list

Started by CoginAustin, 13 Dec 2005 08:15:12 AM

Previous topic - Next topic

CoginAustin

What is the best way to remove lines from a list report that equal the sub-total.

Example:

Group A
Ã,  Value = 10
Ã,  Value = 20
Sub-total = 30
Group B
Ã,  Value = 50
Sub-total = 50

I would like to remove the Value = 50 but keep the sub-total=50 since it is the only item in the group and the same value as the subtotal.

Thanks in advance


sir_jeroen

Remove all line and add a border around Subtotal...

CoginAustin

I dont get it. I need to remove the entire row. There may be 3 other columns. I just used the above as a simple example.

The data may be:
Group B
Value1 = 10 Value2=30 Total=40
GroupB Sub-total1=10 Subtotal2=30 Total=40

So if the totals of each group match a single line for that group I need to hide that line

bdybldr

#3
Austin, Try this....

Add a data item (RowCount) to the query (not the report) that looks like this:

IF (Count(([GroupName]) for [GroupName] = 1))
THEN (1)
ELSE (0)

Next, create a variable of type Boolean.Ã,  Set the expression as: RowCount(data item created earlier) = 1.

Then, go to the report page and select the list column in your report.Ã,  Go to Conditional style property under General and click the dropdown to select the variable we created earlier.

Then, go to the condition explorer and select "Yes" under the variable that you created.Ã,  The explorer bar will turn green.Ã,  select the list column (one at a time) and set the box type to "None".

This will hide the value records when there is only one row of data.

You could also do this for value = Sub-Total for GroupName.Ã,  Ã, Hope this helps.

sir_jeroen

Have you tried:
2 columns:
    col1            col2
[Group xx] [Calculation]

Calculation: "Total (Value FOR [Group A])"

This will result in:
  col1                col2
Group A           30
Group B           50

(Based on your original data)

sir_jeroen

Btw: The thing is that you only want to show the totals and not the details? Am I correct?

bdybldr

RNA,
If I understand correctly, he wants to show the details if there is more than one record.  If there is only one, then he only wants the subtotal to be displayed.

Is that right Austin?

sir_jeroen

#7
ohhhh... than it's simple.. conditional formatting using a running-count for group... if running-count = 1 then hide...


that's all.... (btw... almost the same as bdybuilder so all honors go to him)


(I hope ;) )

bdybldr

Thanks, RNA.  That's an honor coming from you.

Running-total for group is much easier.  Good call.

sir_jeroen


bdybldr


CoginAustin

Thanks everyone. I got it.

sir_jeroen

Please close the topic...
Good Luck

Cajou

Hello everybody, I'm new here and relatively new to Cognos as well.
I had the same question and I was very glad to have found the answer here, but I don't know how to perform a conditional format using a running-count per group  :-[

Would anybody here be so kind to explain how to do this and give me a more step-by-step guide ?  :)

THX in advance !