on 09-22-2015 8:39 AM
Hi All,
I am trying to get the default date as todays date in the webi report. for that I have done as below in the universe, but encountering error
Select Clause: Project.CreatedDate
Where clause: Project.CreatedDate = (CASE WHEN @Prompt('Enter date or Today','A',,mono,free,not_persistent,{'Today'})='Today' THEN 'sd' ELSE @Prompt('Enter date or Today','A',,mono,free,not_persistent,{'Today'}) END)
The CreatedDate format is in DateTime, the above one is not getting parsed showing as error.
The values for the CreatedDate is in below image.
Please help me in getting todays date as default in report.
Thanks,
Santhosh
What is 'sd'? Looks like you're trying to compare a datetime data type with a varchar data type.
Also, I'd avoid building this object with the where clause. Instead, put the where clause in a predefined condition otherwise you will ALWAYS be prompted for this condition whether you want to or not when you use the Project Created Date object.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am really sorry , Actually there must be GETDATE() but i have tested that the formula is not parsing due to getdate or not, so I removed getdate and kept some junk string there, apologies for that.
Thanks for correcting me.
Please help me on the situation. I simply want to get todays date as default date in the webi report and later, If the user refreshes the report he must be able to select previous dates in the report. but by default he must get today's data.
Thanks,
Santhosh.
In that case, have a read of this blog post:
http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
It explains everything far better than I could in the time I've got to post on here.
Regards,
Mark
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.