COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognosjon on 14 Oct 2008 08:29:42 AM

Title: Date range query
Post by: cognosjon on 14 Oct 2008 08:29:42 AM
Afternoon all,

I'm stuck and could do with some assistance please.

I have a filter that takes the following form:

[Customershippeddate] in_range ?Date?

what I need to be able to do and appear to have a mental block over is I need two get the minimum date and the maximum date from the date prompt as two seperate data items within the report.

Any suggestions would be appreciated


Title: Re: Date range query
Post by: ej on 21 Oct 2008 12:22:49 PM
I could really use that information as well.  I've been baffled how to pull out information about a parameter built by creating a prompt.  I've seen in some pre-built Cognos reports that came with Cognos 8.3 that one can display the parameters in a cover page, but haven't worked through how it is done yet.  If I figure it out, I'll pass it on.
Title: Re: Date range query
Post by: cognosjon on 22 Oct 2008 01:59:28 AM
Hi ej,

I think we are both after different things.

I think this is what your after.
To get the value of a parameter to dfisplay on your page drag a layout calculation object onto your page. Then when the report expression page is displayed click the 'parameters' tab at the bottom of the available components window and then drag the parameter that you are interested in into the Expression Definition window. Click ok.

The parameter details now selected in the prompt will display on the page. Hope that helps






Title: Re: Date range query
Post by: Nuffsaid on 22 Oct 2008 10:07:32 AM
This works with Oracle....

Create 2 data items

From   minimum(cast(?Date?,date))

To      maximum(cast(?Date?,date))

Associate the page to the query that contains these data items.
Drop the new items on the page and format as desired.
Title: Re: Date range query
Post by: cognosjon on 23 Oct 2008 01:52:53 AM
cheers nuffsaid

wasn't exactly what I was after you have pushed me in the right direction so thanks for that. ;D
Title: Re: Date range query
Post by: Nuffsaid on 23 Oct 2008 12:53:17 PM

QuoteI need two get the minimum date and the maximum date from the date prompt as two seperate data items within the report

Dunno, maybe it's me, but what I suggested will return exactly what you asked for.

Anyway, glad I could be of some assitance.   ;)