COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: arun89 on 20 Aug 2015 02:45:38 AM

Title: Cognos Framework Manager
Post by: arun89 on 20 Aug 2015 02:45:38 AM
Hi All,

I need to input two datetime values to a procedure added to framework manager.

I use ?fromdate? and ?todate? in the query subject definition for the 2 inputs.

However , when i validate the query, i get the below error. The prompt keeps showing.Any help would be appreciated.

XQE-QRY-0404 There are parameters or variables that require values.
Title: Re: Cognos Framework Manager
Post by: MFGF on 20 Aug 2015 03:18:25 AM
Quote from: arun89 on 20 Aug 2015 02:45:38 AM
Hi All,

I need to input two datetime values to a procedure added to framework manager.

I use ?fromdate? and ?todate? in the query subject definition for the 2 inputs.

However , when i validate the query, i get the below error. The prompt keeps showing.Any help would be appreciated.

XQE-QRY-0404 There are parameters or variables that require values.

Hi,

Edit the definition of the stored procedure query subject, and for each argument, press the ellipsis button on the right. Set the value for each to be a Cognos parameter (ie ?fromdate? for the first and ?todate? for the second. See a similar example below:
(https://image.ibb.co/m5Uh3Q/SP1_zpspw5gzwlv.png)

Once you have set both of these, press the Validate button at the bottom, and enter values for the two prompt values:
(https://image.ibb.co/du3aOQ/SP2_zpsfgkvnyuv.png)

Cheers!

MF.
Title: Re: Cognos Framework Manager
Post by: arun89 on 20 Aug 2015 03:31:33 AM
Hello,

Thanks for your reply.

But thats exactly what i Did.I still get the error. Please see the attachemnt.

Or does this require any fix pack??
Title: Re: Cognos Framework Manager
Post by: MFGF on 20 Aug 2015 04:03:59 AM
Quote from: arun89 on 20 Aug 2015 03:31:33 AM
Hello,

Thanks for your reply.

But thats exactly what i Did.I still get the error. Please see the attachemnt.

Or does this require any fix pack??

Should there really be quotes around those date values?

MF.
Title: Re: Cognos Framework Manager
Post by: arun89 on 20 Aug 2015 04:17:50 AM
Even without the quotes i get the same error.  :(

Regards,
Arun
Title: Re: Cognos Framework Manager
Post by: MFGF on 20 Aug 2015 05:06:32 AM
Looks like you have the format of the time wrong?

Try changing the values to 2015-08-06 11:26:17 and 2015-08-15 16:39:56

No quotes - just these values.

I tried a similar approach and it works fine for me.

MF.
Title: Re: Cognos Framework Manager
Post by: arun89 on 20 Aug 2015 05:31:20 AM
Nope.  Doesnt work for me. PLease check the attachment.

Is this something to do with fixpack. Or is there something that I am missing

Title: Re: Cognos Framework Manager
Post by: MFGF on 20 Aug 2015 05:45:22 AM
Quote from: arun89 on 20 Aug 2015 05:31:20 AM
Nope.  Doesnt work for me. PLease check the attachment.

Is this something to do with fixpack. Or is there something that I am missing

All I can tell you is that it works fine for me. I have SQL Server 2012, Cognos BI 10.2.2 and my stored procedure is coded thus:

USE [GOSALES]
GO
/****** Object:  StoredProcedure [gosales].[MF]    Script Date: 20/08/2015 11:43:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <MFGF Muppet>
-- Create date: <20th August 2015>
-- Description: <Cognoise Test SP>
-- =============================================
ALTER PROCEDURE [gosales].[MF]
-- Add the parameters for the stored procedure here
  @FromDate datetime,
  @ToDate datetime
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

    -- Insert statements for procedure here
SELECT * from GOSALES.TIME_DIMENSION where DAY_DATE between @FromDate and @ToDate
END


MF.
Title: Re: Cognos Framework Manager
Post by: arun89 on 20 Aug 2015 05:46:40 AM
Hi ,

Even for other data types, I am not able to validate.

I use  Cognos BI 10.2.1 FP1.

Regards,
Arun
Title: Re: Cognos Framework Manager
Post by: MFGF on 20 Aug 2015 05:48:25 AM
Quote from: arun89 on 20 Aug 2015 05:46:40 AM
Hi ,

Even for other data types, I am not able to validate.

Regards,
Arun

What version of Cognos are you using? What database? What version? How is your SP coded?

MF.
Title: Re: Cognos Framework Manager
Post by: arun89 on 20 Aug 2015 06:19:37 AM


Cognos 10.2.1 Fixpack1

Sqlserver 2008

SP goes like below

Create PROCEDURE [imsdb].[getUsernames]  @fromDate datetime = NULL, @toDate datetime = NULL
AS
........

Title: Re: Cognos Framework Manager
Post by: MFGF on 20 Aug 2015 07:54:09 AM
Quote from: arun89 on 20 Aug 2015 06:19:37 AM

Cognos 10.2.1 Fixpack1

Sqlserver 2008

SP goes like below

Create PROCEDURE [imsdb].[getUsernames]  @fromDate datetime = NULL, @toDate datetime = NULL
AS
........

Looks ok to me. The only difference between this and mine is the = NULL clause on each argument. I don't have SQL Server 2008 or Cognos 10.2.1 to test against though.

MF.