Author Topic: [Solved] Error while adding SQL server function to the report  (Read 218 times)

Offline pravin.cognos

  • Senior Member
  • ****
  • Posts: 61
  • Forum Citizenship: +0/-0
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

 
« Last Edit: 20 Jan 2012 12:22:16 am by pravin.cognos »

Offline HalfBloodPrince

  • Community Leader
  • *****
  • Posts: 118
  • Forum Citizenship: +5/-0
Re: Error while adding SQL server function to the report
« Reply #1 on: 18 Jan 2012 04:23:25 am »
Try this DATEADD({YEAR}, -1, Start date)

Offline pravin.cognos

  • Senior Member
  • ****
  • Posts: 61
  • Forum Citizenship: +0/-0
Re: Error while adding SQL server function to the report
« Reply #2 on: 18 Jan 2012 04: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
« Last Edit: 18 Jan 2012 04:52:27 am by pravin.cognos »

Online blom0344

  • BI Architect
  • Global Moderator
  • Statesman
  • *****
  • Posts: 1,747
  • Forum Citizenship: +60/-2
  • Assess what you need instead of what you want
    • Reasult b.v.
Re: Error while adding SQL server function to the report
« Reply #3 on: 18 Jan 2012 05:22:15 am »
What connectivity did you define for the datasource?  OLE/DB or ODBC ?
Oracle9i,DB2/AS400/Busobj 6.5/Powercenter7/Cognos8 /
SSIS 2005 / SQL SERVER 2005 /PowerDesigner 12.5/15

Offline pravin.cognos

  • Senior Member
  • ****
  • Posts: 61
  • Forum Citizenship: +0/-0
Re: Error while adding SQL server function to the report
« Reply #4 on: 18 Jan 2012 05:30:08 am »
We use OLE/DB connection.

Online blom0344

  • BI Architect
  • Global Moderator
  • Statesman
  • *****
  • Posts: 1,747
  • Forum Citizenship: +60/-2
  • Assess what you need instead of what you want
    • Reasult b.v.
Re: Error while adding SQL server function to the report
« Reply #5 on: 18 Jan 2012 06:16:17 am »
Actions --> Package --> Specify Package Function List..

Are SQL server functions in the selected list?
Oracle9i,DB2/AS400/Busobj 6.5/Powercenter7/Cognos8 /
SSIS 2005 / SQL SERVER 2005 /PowerDesigner 12.5/15

Offline pravin.cognos

  • Senior Member
  • ****
  • Posts: 61
  • Forum Citizenship: +0/-0
Error while adding SQL server function to the report
« Reply #6 on: 20 Jan 2012 12: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
« Last Edit: 20 Jan 2012 12:23:13 am by pravin.cognos »