cancel
Showing results for 
Search instead for 
Did you mean: 

How to get previous values from a @PROMT

Former Member
0 Kudos

Hi All,

In my report, I need to prompt the user to make a selection of a single date, but the report should contain (in addiction to date selected) also the eight dates before than those initially selected.

Is it possibile to do it in WEBI (XI 3.1) or in the universe, and how? The server in use is Teradata.

Thanks in advance

Cheers

R

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I've found the equivalent function in Teradata, your suggestion has been very helpful.

Thanks

Cheers,

R

Former Member
0 Kudos

Hi,

This can done by adding a where clause in any of your objects which is being used in the report.

Create a objetc at universe which should be user input date (ex @prompt(user input date))

Now in the where clause of this or in any object add the below condition:

Date between dateadd(dd,-8,@prompt(user input date)) and @prompt(user input date)

the above condtion will give you the dates between user input date - 8 to user input date.

The above function is with respect to SQL server 2005.similarly do it in your DB.

Hope this will help you.

Cheers,

Ravichandra K

Former Member
0 Kudos

Hi,

I tried this approach but the function "dateadd" seems not to exist in Teradata.

In addiction, the data type "dd" does not match a Defined (Teradata) type Name.

Do you have any other suggestions?

Cheers,

R

Former Member
0 Kudos

Hi RaviChandra,

Good explanation but unfortunately I am not able to understand to my requirement.

Here is my requirement,

I supply a prompt for the user to select quarter , the format is like 2009-Q2.

Now I have to show data in the report for that user entered quarter and the previous Quarter.

When I capture that user entered quarter , it is in string format. I tried doing in the report level, but I am having a hard time to convert that object in to date format.

I have a prompt condition in the universe which prompts the user to select.

After this what should I do? As per you suggestion as below,

Date between dateadd(dd,-8,@prompt(user input date)) and @prompt(user input date)

Where should I make this condition? Your help on this will be greatly appreciated.

I am using WebiXIR2, Designer XIR2, Sybase.

Thanks,

John