Thursday, January 22, 2009

My Conferences for February

In February I will be presenting at the following conferences:

Oracle Develop - Moscow, Russia 4 - 5 February
Oracle Develop - Prague, Czech Republic 10 -11 February
UKOUG APEX SIG - London, UK 13 February
South-Eastern Oracle User Conference (SEOUC) - Charlotte, North Carolina 25 - 26 February

Each of these are quite different events and I always love getting out and meeting people. I also love to talk, so if you're able to get to any of these don't hesitate to come up to me for a chat.

Regards,
David

Preserving User Saved Interactive Reports

There have been several posts on the APEX Forum relating to issues with saving User's Interactive Reports (IRs).

A few examples are:
http://forums.oracle.com/forums/thread.jspa?threadID=828056
http://forums.oracle.com/forums/thread.jspa?threadID=706257
http://forums.oracle.com/forums/thread.jspa?threadID=845768
http://forums.oracle.com/forums/thread.jspa?threadID=719362

Background on how IRs are saved:
There are two distinct means of saving IRs - As "Default" reports performed by developers when running the application from the Application Builder and users saving reports at runtime.

When a developer saves a default report then that report definition is used to render the report in the runtime environment. When a user saves an IR it is saved into the APEX meta-data tables using the unique id for the report against that user. The unique id is based on the specific region id of the IR. This is critical when discussing issues being faced and their solutions below.

If the application is a PUBLIC application then Users will not be given the option to save IRs as there is no user details to associate that report with so every user would then see everyone's saved reports.


Basically there are three main issues being raised:
  1. Preserving user saved IRs when rebuilding environments
  2. Preserving user saved IRs when updating application
  3. Sharing user saved IRs between different users
1. Preserving user saved IRs when rebuilding environments
This issue relates to the ability to backup user saved IRs so that should you need to migrate your applications from one server to another or restore from backups then users will not lose their saved reports.

In APEX 3.2 we have resolved this issue by allowing you to save these reports as part of the Application Export. We have included a new select list option on the Export screen within the Application Builder - Export Saved Reports
Specify whether to include Saved Interactive Reports in the application export. This will enable you to export the customized settings of users for all Interactive Reports in the application. Options include:

  • Yes includes Saved Reports in the application export.
  • No does not include Saved Reports in the application export.
We have also updated the command-line export utility to include a new switch - expSavedReports: Export all user saved interactive reports. Updating the command-line utility was imperative given that we strongly recommend that "production" environments be configured as run-time only. Therefore, once you have installed APEX 3.2 (Once available) then you should modify your command-line batch program to also include exporting the IRs.

You may well ask why we implemented it as part of the export rather than as a stand-alone utility. The answer is related to the way the IRs are saved and the fact they are tied to the Region_Id for the IR. When an application is imported it retains the same Region_Ids providing the Application ID is the same as when it was exported. If the imported application is given a new Application ID then all the Region_Ids are changed and the saved IRs will not link to the region.

2. Preserving user saved IRs when updating application
This is direclty related to how IRs are saved against a specific Region_Id and how the Region_Id is determined when importing an application. If the Application ID on export and import are the same then the Region_ID will be preserved and any saved IRs will be available. To ensure this select "Install As Application:" option of 'Reuse Application ID xxx From Export File', not 'Auto Assign New Application ID' or 'Change Application ID'.

If the Application ID is changed during the import then new Region_Ids will be defined and none of the previous saved IRs will be shown for the users. To avoid this it is essential that the application id is not changed between environments. The best practice to avoid these sorts of issues is to develop your applications in DEV - Export the application and put into source control. Then only ever build from source control into every other environment and not from exports taken from staging / test / UAT etc. When installing into environments where you want the saved IRs preserved never assign a new Application ID during Import.

3. Sharing user saved IRs between different users
This is a very common request and one which there is no supported solution for.
We plan to investigate this issue as part of our APEX 4.0 development.

The best solution currently is to have the developer create a "default" report layout.

Hope this helps answer most questions on saving IRs

Regards,
David

Wednesday, January 14, 2009

Books, Books, Books + Authors wanted

Well it is the start of a new year so what better time to take the time to read some books.
No matter what your preferred genre, it is also important to keep up with reading new technical books. Unfortunately, I am a very poor reader when it comes to books - technical or otherwise.

There is a new APEX book which has just hit Amazon - Rick Greenwald's Beginning Oracle Application Express (WROX Publishing). I am expecting a shipment any day of a box full of these books that I will be giving away at various events. I had the pleasure of working closely with Rick on this book, which is aimed at new developers to APEX and power business users. I think this book is excellent for anyone when they are first getting into APEX.

As most of you are probably already aware John Scott's Pro Oracle Application Express (Apres Publishing), with contributions from Scott Spendolini, book is also available. I bought a copy from the Oracle Store at Oracle Openworld. I must confess I haven't read it yet (only scanned through) but plan on taking it with me on some long flights I have coming up.

There is also a new book being written by Douwe Pieter van den Bos on Forms Conversion to APEX for Pakt Publishing. According to Douwe Pieter he is progressing well and has delivered the first chapters to the editor. Can't wait for this book to get published as there will hopefully be a lot of Oracle Forms Developers queuing up to buy this book.

Finally, Pakt Publishing also has another book in the pipeline which is an introdcution to Oracle Application Express. They are currently seeking authors to help contribute. If you have ever wanted to be part of writing a book then here is your big chance. Pakt want to get this book out in the summer.

So for all you budding authors who want to see your name on the cover of a book, and also have some free bandwidth, contact James Lumsden [jamesl@packtpub.com] from Pakt Publishing.

Happy reading,
David