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

Query Question

Started by RobSil, 28 Jan 2010 02:30:45 PM

Previous topic - Next topic

RobSil

Is it possible to extract query data to be placed in a header?

My data set is homeroom and students such that the rows would look like...

[Homeroom][TeacherName][StudentName]

So 5 rows of data might be...
RoomA, Mr. Jones, Frank Smith
RoomA, Mr. Jones, Julie Anderson
RoomA, Mr. Jones, Steve Sullivan
RoomB, Mrs. Anders, Allison McGrath
RoomB, Mrs. Anders, Jenny Johnston

My report is passed "Homeroom Name" as a param (?HNParam?).  I want there to be a section at the top with 3 text items...

Homeroom Name:  (print HNParam.. done)
Homeroom Teacher: (print "Mr. Jones" if ?HNParam?= RoomA e.g.)
Number Students: (print 3 if ?HNParam?= RoomA e.g.)

My theory is to create a query "SummaryDataQuery" and extract details from that... but when I try this I get errors when I attempt to add a query data item to my Text Item expression.  The error is just the stack trace so not sure what the issue is.  Since it's single data, the info could be extracted into a query, or into variables/parameters if that's possible?

Does anyone know how to accomplish what I've described?

Thx,
Rob


paddhu

The problem is because, Text Items in Cognos layout cannot hold Query elements. They can only hold custom text or layout expressions. What you can do is use a singleton (v8.3 or higher) or use a list and hide the title and border to get the required layout effect.

TheDarkKnight

Yes, Singleton is a gud option to use. i will go with using list for the same i tried this it worked perfectly!!! :).

MFGF

Hi Rob,

Are you on 8.3 or later?  If so, dragging in singletons from the toolbox as Paddhu and TheDarkKnight have suggested will be the easiest option.  Otherwise, drop a list into the page header as suggested, or alternatively drag a Repeater to the page header, drop a block inside the repeater, and drag your Homeroom, Teacher and a calculation to count the Student items into this (with text items between them, containing a comma and a space).

Regards,

MF.
Meep!

RobSil

Thanks for the input!  I am trying a table now... but the grid lines won't go away!  At what level should I hide the border?  I've tried every level that I can think of (column item, list, etc.) but the border stays as a thin green line.

Not sure why it is being so difficult to do... I've even removed the style class of the table to see if that would work to no avail.

Thoughts?

R.

RobSil

Finally found it!

You have to override the class on the "List Column Body" to be none.  I tried pretty much every level of the structure except for that one I think! lol.