COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: anjidwh.cognos on 05 Aug 2014 01:31:24 AM

Title: date function is causing an error in report studio
Post by: anjidwh.cognos on 05 Aug 2014 01:31:24 AM
Hi,

In my report, I have 3 query subjects. Q3 is coming from Q1 UNION Q2. In Q3 I have applied to_char function on date column which working fine in one environment. But it was causing an error when I deployed same report to some other environment.

I am trying to trace out the issue. Is this environment issue or report issue. In both environments I have same version of cognos.

Can anybody face this kind of pblm earlier. Please help me to get out of this. Appreciated your help!!

Thanks,
SR
Title: Re: date function is causing an error in report studio
Post by: MFGF on 05 Aug 2014 04:40:33 AM
Quote from: anjidwh.cognos on 05 Aug 2014 01:31:24 AM
Hi,

In my report, I have 3 query subjects. Q3 is coming from Q1 UNION Q2. In Q3 I have applied to_char function on date column which working fine in one environment. But it was causing an error when I deployed same report to some other environment.

I am trying to trace out the issue. Is this environment issue or report issue. In both environments I have same version of cognos.

Can anybody face this kind of pblm earlier. Please help me to get out of this. Appreciated your help!!

Thanks,
SR

Hi,

to_char() is a database function, right? If you are unioning queries locally on the server, then probably database functions are not available on the result set. Try using a cast() function instead (ie an inbuilt cognos function)

Cheers!

MF.
Title: Re: date function is causing an error in report studio
Post by: anjidwh.cognos on 05 Aug 2014 07:39:27 AM
How we could know that report is running at database server level or cognos server level?

Here my question is the same report working in other environmnet..And the same report is running intermittently fine in the next environments like sometimes it was erroring out and sometimes not.

Please suggest why it is happening like next environment?

Thanks
SR
Title: Re: date function is causing an error in report studio
Post by: MFGF on 05 Aug 2014 07:46:17 AM
Quote from: anjidwh.cognos on 05 Aug 2014 07:39:27 AM
How we could know that report is running at database server level or cognos server level?

Here my question is the same report working in other environmnet..And the same report is running intermittently fine in the next environments like sometimes it was erroring out and sometimes not.

Please suggest why it is happening like next environment?

Thanks
SR

Are any changes being made to the report that might account for why it runs sometimes but not others? Some changes might trigger local processing to occur on the Cognos server.

Did you try the solution I suggested? Does it fix your issue?

MF.