Mystery: Interactive Report broken for end-users!

November 4, 2010

A friend dropped me a line saying her Apex app’s Interactive Report wasn’t working for her users anymore and she asked if I knew what could cause it.  She said it worked for her in the Apex development environment, but not outside.  I talked her into giving me an account on her Apex workspace and started digging through it.

For me in the developer environment, it wouldn’t do any of the JSON updates, like search for text, filter, change columns, sort, etc. – all the cool things we love about IRs.  I’d seen this before, but it’d been so long I’d forgotten.  I finally dug into the page template and noticed that there wasn’t much inclusion of external CSS going on and when I added that in, the report worked.  So I sent her that as “fixed!”  I couldn’t figure out how this application could have worked before, but had stopped!

Unfortunately, she wrote back saying that didn’t do it for someone running outside the development environment!  Aaagh!

But I love a good challenge, so I dug back in.  I got another session going in another browser so it was outside Apex’s environment.  I noticed a difference between the two user sessions, that in the Development Environment, it showed my username on the top of the page, but not when I wasn’t.  That was the hint I needed!  It reminded me that the Interactive Reports store your queries by the APP_USER name into the database.  No user name, no interactivity!

It turned out that this was a new application, she was using a custom authentication method that was new to her and she wasn’t setting the APP_USER value!

I’d used this same custom authentication method and found I needed to call

APEX_CUSTOM_AUTH.SET_USER(p_user => 'some custom value');

in the Post section of the authentication method.

Once that was set, everything worked great.

It was only after I told my friend the solution that she said that this was a new application she was building.  Oops!  If she’d said that up front, I might have figured out what was wrong sooner!  :-/

About these ads

2 Responses to “Mystery: Interactive Report broken for end-users!”

  1. Trupti Says:

    Hi,

    I have a query, may not be related to the topic of this post.
    I hope you help me out.
    I used to apply all filter options like = etc on date columns of the table browsed in interactive report. Recently due to some reasons all date columns got converted into varchar2 type(at database level) and now we cannot apply those filter options (= ) on such columns. But sometimes it becomes necessary to apply these filters for comparison purpose. Is there any work around through which I can apply these filters options in such case. (please note these interactive reports are directly generated (through script) from database tables so I cannot apply “To_date” clause at database side). Is there any work around at apex level?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: