Recently, one of the developers asked me:
“Michael, how do you go about saving a view when one of the prompts on the page contains a variable that populates the initial value (such as date)?”
I explained that I hadn’t really given it much thought. I continued on with my work for the day, not thinking about it much more. Later that day, the developer comes back to me and says:
“I thought you said it couldn’t be done, but you did it on XYZ Report…how did you do that?”
Sure enough, I took a look and was baffled as to how I got it working, as I wasn’t even aware that it WAS working correctly. I had just assumed that whatever value had populated the prompt when the view was saved was the default value.
That day, I took a few hours, researching and looking around for a solution and couldn’t find anything. Even with a working example I couldn’t figure it out. I chalked it up to a strange fluke and kept working on other things.
A few weeks later, a different developer comes to me and asks me how I did that. I explained to him that I had already looked into the issue and couldn’t figure out a solution or a method that allowed me to make it work…as I was sitting there waiting for him to reply, it came to me, so I figured I would share it with the OBIEE Community, as I haven’t seen it posted anywhere.
Problem:
When a user saves a view, all of the selection criteria that is currently populating any prompt will be saved. In a situation where the prompt contains a variable, such as a session variable populating the current date, that evaluated variable is saved. Typically this is not ideal, as items such as dates should change as time passes.
Solution:
Create the dashboard page as you normally would, setting up the sections to allow collapsing. Populate the sessions with all reports, links, etc, except for the prompts which will contain non-static variables. Save the dashboard and go out to the tab to set up your saved view. Collapse sections or set any prompt values that you would like to set up and save your view as you would normally do. Then go back and add in the prompts which contain the variables, save your work and then you will have a saved view that users will be able to use and the evaluated variables will not be saved in the view.
This is odd, as typically, there aren’t many order of operation type functions that have to be followed in OBIEE in order to get reports working the way that we’re looking for.
Happy reporting!