سؤال

I am new to development in business objects universe development, now I am struck in writing the if else in universe.

My requirement is

I have created a filter with string names Yesterday and Last Sunday.

In my report if filter is selected as yesterday then automatically select query should have the date filtering as yesterday and same should be the case when I select Last sunday.

Can any one give me the idea on how to acheive.

هل كانت مفيدة؟

المحلول

Without knowing the full details, i would say in this situation you would have 2 objects in the universe for this, one being the date object that you want to filter against (e.g. invoice date), the other being generic date objects set to yesterday and last sunday.

Please note the following code is based upon an Oracle database, if your database is different please refer to your approriate documentation and/or db admin for your syntax

For a "Yesterday" object create a date-type dimension object with the following select statement, ensuring the object format follows your reporting conventions:

trunc(sysdate-1)

For a "Last Sunday" object again create a date-type dimension object with the following select statement:

trunc(next_day(sysdate-7,'SUNDAY'))

In your report to filter by the required date, you'd pull the date field you want into the query filters pane, select "Object from this query" in the parameter window and select the newly created "Yesterday" or "Last Sunday" object for the parameter.

Hope this helps!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top