If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Throwing error while validating

Started by inu, 08 Jul 2015 02:23:13 AM

Previous topic - Next topic

inu

Hi Team,

Can you please look into this query used in report studion query item as follows:
round(average (_add_days( [Events Job_Events].[Event_Date], 0)-_add_days( [Events Schedules].[Etd_Date], 0)), 1)

throwing error at round function


Regards
Inam

MFGF

Quote from: inu on 08 Jul 2015 02:23:13 AM
Hi Team,

Can you please look into this query used in report studion query item as follows:
round(average (_add_days( [Events Job_Events].[Event_Date], 0)-_add_days( [Events Schedules].[Etd_Date], 0)), 1)

throwing error at round function


Regards
Inam

Yep - it would throw an error - that is entirely correct. The round() and average() functions are designed to work with numbers not dates or intervals. You are subtracting one date from another in your expression, which returns an interval...

MF.
Meep!

inu

Quote from: MFGF on 08 Jul 2015 02:39:20 AM
Yep - it would throw an error - that is entirely correct. The round() and average() functions are designed to work with numbers not dates or intervals. You are subtracting one date from another in your expression, which returns an interval...

MF.

Hi MF,

Thanks for your response,  if i validate in cognos 7 , it validates correctly,  but same report cognos10 is throwing error .

Can you suggest me what should i do

Regards
Inam

MFGF

Quote from: inu on 08 Jul 2015 03:02:49 AM
Hi MF,

Thanks for your response,  if i validate in cognos 7 , it validates correctly,  but same report cognos10 is throwing error .

Can you suggest me what should i do

Regards
Inam

Cognos 7 and Cognos 10 are entirely different products. Just because something works in 7 doesn't necessarily mean it will work the same way in 10. :)

I'd suggest you revise the expression to use appropriate syntax. I already explained that you are using a numeric function on an interval (which isn't a valid thing to do). What should the expression deliver? What are the requirements?

MF.
Meep!