COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: pravin.cognos on 18 Jan 2012 04:57:18 AM

Title: [Solved] Error while adding SQL server function to the report
Post by: pravin.cognos on 18 Jan 2012 04:57:18 AM
Dear Gurus

Our database is Sql Server 2005. We created relational models. While building packages, I have selected SQLServer in the function list. But I am facing two problems while authoring the reports.

1. I dont see SQLSever in "Vendor Specific Functions" tab in the expression editor.

2. When I add any SQL server function to the report, it is throwing an error.

Ex: I added a date function i.e DATEADD(YEAR, -1, Start date) and when validated got the below error.

Error:   QE-DEF-0459 CCL Exception. QE-DEF-0260 Parsing Error before or near ......

Please help !!

Thanks
Praveen

Title: Re: Error while adding SQL server function to the report
Post by: HalfBloodPrince on 18 Jan 2012 05:23:25 AM
Try this DATEADD({YEAR}, -1, Start date)
Title: Re: Error while adding SQL server function to the report
Post by: pravin.cognos on 18 Jan 2012 05:48:25 AM
Hey Thanks Prince

The Flowers braces worked. May I know what is the reason I am not seeing the SQLServer function set and why should we use this braces in the expression.

Cheers
Pravin
Title: Re: Error while adding SQL server function to the report
Post by: blom0344 on 18 Jan 2012 06:22:15 AM
What connectivity did you define for the datasource?  OLE/DB or ODBC ?
Title: Re: Error while adding SQL server function to the report
Post by: pravin.cognos on 18 Jan 2012 06:30:08 AM
We use OLE/DB connection.
Title: Re: Error while adding SQL server function to the report
Post by: blom0344 on 18 Jan 2012 07:16:17 AM
Actions --> Package --> Specify Package Function List..

Are SQL server functions in the selected list?
Title: Error while adding SQL server function to the report
Post by: pravin.cognos on 20 Jan 2012 01:19:50 AM
Thanks a lot Blom :)

There was the error. I selected SQLServer and moved it to other window by misatake. Now I moved it to Selected functions window from Actions tab. Thanks for your help.

Cheers
Praveen