Tag Archives: APEX

Printing directly with APEX


When looking for a print solution with APEX you will find .PDF

You will find a lot of .PDF

And .PDF is good. There is nothing wrong with .PDF. In fact, .PDF looks cool and you can do a lot of neat stuff with it. With toolkits like pl/pdf you can create .PDF’s directly from PL/SQL.

But sometimes there is the need to be able to print directly.
For instance with batch-processing or with nightly print-runs or whatever. And this is where you would find yourself locked out with .PDF and, glancing Google, you would guess you’d be out of luck!
Since we had:

  • created a web based solution
  • the need to print directly
  • print in nightly-runs

plus we had:

  • about 400 reports (.rdf files) which we need to reuse (without having the opportunity to rebuild them in something like pl/pdf)
  • combine different output / distribution mechanisms

we needed to tackle this challenge!

So we did !!

It was fixed by using some old and new technology mixed together:

Oracle reports builder
and
Oracle Fusion Middleware, more specifically, Oracle Reports Server, aka WLS_Reports

By using this combination of products, you can create a printing solutions which is capable of printing directly to your network printer, create HTML or PDF reports.
Schedule them, e-mail them, and all this by URL-control!

http://<your-reports-server-node>:8888/reports/rwservlet?command=argument&command=argument&and-so-on

Use the following (much used, but far from a complete list of) control-commands:

  • report=<name of your .rdf>
  • userid=<userid/password@database>
  • desformat=HTML/PDF
  • destype=type of output of the report
  • desname=name of your output (device, file, whatever)

More commands in the link to the documentation on the bottom of this post!!

Notes:

  • You can post these parameters to the Reports Server without calling them in the original URL!
  • You can set a “local” on your Reports Server for omitting <@database> in ‘userid’ for your default database
  • Actually you can set all environment variables, like TNS_ADMIN, NLS_LANG, REPORTS_PATH, etc.

What we found is we needed to run Oracle Reports Server on Windows, just to take advantage of the Windows Printing System which is quite stable and easy to configure. (So, yes, okay, there you have it, a good thing about Windoze!)

Basically you can create a simple solution, but you can easily expand it quite a bit, making a printing and reporting solutions worthy of and enterprise environment, with distributing reports via e-mail, creating reports in file-systems, embedding reports in websites, and basically anything you want or would need.

And, you get a nice Management Console for free with this installation!

08-forms-em
Oracle Enterprise Manager Console

From this management console you can administer your print-jobs, set all kinds of parameters, which is quite neat!!

But, wait… the catch… It’s gonna cost you!

Or, can you keep it under control?

But of course!

Printing is mostly a half-on-line thing, and for a lot of stuff, it’s not extremely performance / time critical… So what can we do?

Oracle Reports Server is licensed as “Oracle Forms & Reports Server” and it will set you back € 370 per Named User or € 18.200 per CPU (being Oracle CPU’s according to the Core Factor Table!)
It’s still a whole lot of money, but would you really need more than 2 cores? If you give the machine enough memory and fast disks? Probably not.

Is it worth considering taking another node in your environment? Perhaps. This print-solutions could be a viable reason to do so. It brings you quite a bit of functionality straight from the box. But, as always, do your math and make educated choices.

The documentation link promised:
https://docs.oracle.com/cd/E16764_01/bi.1111/b32121/toc.htm

If you would like more info, please just drop me a line!


Communication limit with mod_plsql through PlsqlMaxParameters

There is always a lot to do when you run your page. And, somehow, these days there are some default limits to the amount of work you are supposed to do.
Okay, but what does this mean…

In an application, we have a screen to create some appointment between a bunch of people. This bunch can become quite substantial indeed.
In those days we were running Oracle HTTP Server 9i to lift mod_plsql up in the IP, and we never had any issue creating these somewhat larger appointments in our application.

Recently we got a call on our service desk, which said there were some issues in creating an appointment with a greater number of participants. The message read, somewhere in the error-text:

HTTP-400 Too many arguments passed in. Got 2009 parameters. Upper limit is 2000

Okay, somehow this application function is not going to work!

On research we identified the parameter PlsqlMaxParameters to be the problem. This parameter was introduced with the first version of Oracle HTTP Server right after 9i. If unset, PlsqlMaxParameters defaults to a value of 2000.
I am guessing here, but my bet would be this to be a restriction to prevent a buffer-overrun of some kind.
To resolve the issue the PlsqlMaxParameter needed to be added to plsql.conf. (We tried to do this in dads.conf to keep most of Oracle HTTP Server unaffected, but got errored out).
We chose the value of 4000, meaning a 100% increase while maintaining a fair and safe limit.

For Oracle HTTP Server, the parameter is set in plsql.conf which can be found in either:

  • $ORACLE_BASE/Oracle_WT1/instances/instance1/config/OHS/ohs1/moduleconf
  • $ORACLE_BASE/ohs/Apache/modplsql/conf

For Oracle EPG, the parameter can be set as follows:

  • dbms_epg.set_global_attribute(‘max-parameters’, ‘100’);

And this is where it gets tricky!

Currently we are leveraging Oracle 11g Standalone HTTP Server (11.1.1.7), so without this bulky and difficult WebLogic overhead and we thought we’d aught to test this installation with these big appointments.
As expected, we received an error-message, so the behavior is consistent for this part. The scary bit though was that the error-message is no longer an error-message but a hint to go in the woods…

The request could not be understood by the server due to malformed syntax.

Which could virtually mean anything, and if we hadn’t run into the previous error, we’d have a helluvatime trying to resolve this.
Luckily the theater was set and we knew what we were searching for and testing, so we quickly resolved this also by adding PlsqlMaxParameters.

I hope this post will help you troubleshooting this catch-all message too!

Update on July 25th 2014
As we’re running into problems a new, I decided to call upon Oracle Support too… Raise and SR and see what comes floating to the top.

Well, a confirmation of what we already concluded, there is no conclusion…

I'm not able to determine what the maximum value is that you can set this to as it does not appear to have been documented in the bug, and the parameter has not been documented at all in the product documentation. I don't have access to the source code, so I'm not able to see if a hard limit has been set or not.

Raising the number of MaxPlsqlParameters is not considered to be a definite solution. Which kinda sounds logical since where you need a page-call with more than four thousand !! parameters (or even 2,000 when you think of it), you would think something could be optimized.

And the suggestions of MOS, which I will support:

  • I would suggest you raise the value to what you need it to be for your environment. If there is a hard limit in the code, and you configure this above that limit, then you will get an error.
  • I would then suggest you look into your application and work to reduce the number of parameters as per the recommendation of the developer of the parameter.

Visiting User Experience Event 18|3|2014

Today I had the privilege to visit the Oracle UX team from the USA. This special event was hosted by Amis Services (@AMIS_Services) and my visit was with Michel Koolwaaij, my esteemed colleague from VIR e-Care Solutions.

The event was super-well attended by a lot of enthusiastic people, comprised of students, novel developers and experienced seniors alike. I also got to meet a whole bunch of super interesting people (again) like:

  • Ultan Ó Broin (@ultan)
  • Patrick Barel (@patch72)
  • Noel Portugal (@noelportugal)
  • Lucas Jellema (@lucasjellema)
  • Lonneke Dikmans (@lonnekedikmans)
  • Mark Vilrokx (@mvilrokx)
  • Aylin Uysal

Through this post I would like to share some of what I picked up from the presentations and demos I went to and key learning points I figured out for myself.

Demo of Oracle voice (by Mark Vilrokx)
Oracle voice is a solutions based on Siri powered by Nuance which in fact now comprises a super lightweight front-end interface for voice-controlling Oracle Fusion Apps. The actual voice recognition and lexicon integration is done on the Nuance back-end.
A personal fun thing to find out is that actually the technology is again based on the work of the Belgian speech-specialists of Lernout & Hauspie, which I got to meet over 10 years ago!

Demo of Oracle mobilitics
Basically this is a demonstration of one of my key-take-aways for today.
These days you, as a classical developer, are challenged to step back, forget “grabbing data and throwing it into a grid or master-detail” and think about how you would “interact” with the data you have in your system.
If you think about it, you would not really want to scroll through master-detail… You want to visualize your data, so it becomes something more tangible and give you an overview with the ability to drill down or zoom in.
The “Designing for Mobility & Simplicity” talk of Aylin Uysal dove deeper into this.

Presentation UX directions with HTML5 by Mark Vilrokx
For me this was somewhat of a confirmation, strangely enough. Basically HTML5 is used as a rapid application development framework for Oracle ADF applications. In effect meaning that an Oracle APEX development environment supersedes Oracle ADF in both speed and diversity of application development (J) End of sentence

Presentation Designing for simplicity by Aylin Uysal
Stressing that person to person collaboration is still super important also (and perhaps even especially) for UX design. Organize several sesison consisting of different stakeholder groups, since UI design differs by user (or stakeholder) category.
Information abundance in classical UIs is to be replaced by minimal data UI design. Having less data, better (more visually represented) strongly increases UX!

Presentation Wireframing 101 by Ultan Ó Broin
Wireframing, in this context was new to me. Create a low fidelity “sketch” of what you want, don’t prototype anything yet! Create difference wireframes of applications and application flows to prevent “Squeak and poop” behavior of management or customers when presenting UX designs in wireframe format. A wireframe is no nicely worked out app, making it difficult to judge for outsiders.
A nice example of such rapid prototyping is the way Google Glasses is developed.
A good tool for digital wireframing (but also just for that) is Balsamiq which is used by the Oracle UX team as the preferred wireframing tool.

Presentation One picture worth a thousand words by Lucas Jellema
In this presentation of more pictures that words, Lucas gave some very cool examples of how pictures are able to, indeed, transfer much more information that words. An inspiration to use when you are UX-ing.

Visit to the Chamber of Secrets
I am so sorry, I had to sign quite an NDA before being let in… Please visit your local Oracle UX-session!

So, what are the key learning points:

  • Step back, and think free-flow how you would consume information. Unthink current UI design and… step back!
  • Less is more, also in UI design. A user experience is about getting to what the NEED as quickly as possible.
  • APEX is a viable development tool, in any situation!
  • User Interface design is becoming a serious trade, a trade to take into account.
  • Watch out for those InfoTiles!

A special “Thank you” to Wieteke Gaykema from AMIS who worked like crazy and still got me in at the Chamer of Secerts, even though I was shamefully late with my NDA!

Increasing the reach of your SE database license

Imagine the following situation…

Since a few years your business has been investing in centralizing valuable business information. After some research in the market you have found the Oracle database to be the best fit for your requirements.
Using the free Oracle Application Express (APEX) framework, helping you to rapidly develop the web-applications needed to support both internal and external users, was a premium. Making this installation available based on the Oracle Standard Edition One database, you have created this solution against the lowest possible investment!

As many great projects go, the use and the number of APEX applications is growing. With the addition of ready to use applications to inspire you, many cool plug-ins to ever increase the usability and integration possibilities you get caught up in the data growth dogma!
With an ever increasing user population and expansion of data-reporting for ever faster business reporting your initial system is starting to fail, showing ever more frequent performance lags or system unavailability. These problems form a risk for your business, a risk you need to eliminate as soon as possible!
The standard advise here would be to upgrade your environment, the standard advise here would be to upgrade to a bigger machine and to an Enterprise Edition database. This is what your investment would be then…

  • Medium Oracle Sun Server X2-4 with 4 x 10 core CPU’s at € 42,500
  • (40 cores x 0,5 core-factor **) 20 Oracle Database Enterprise Edition licenses               at € 914,800

Without rendering your application infrastructure worthless by the required investment, a more reasonable step would be to migrate to Oracle Database Standard Edition.

  • Medium Oracle Sun Server X2-4 with 4 x 10 core CPU’s at € 42,500
  • 4 Oracle Database Standard Edition licenses at € 67,400

Still requiring a total investment of more than a hundred thousand Euro and leaving you with the old server and licenses to be decommissioned.

In many implementations, not data entry but data-mining or information aggregation are the costly processes. So probably this will be true in this situation too. With a little investigation it is possible to separate a number of functions that will only query data and not necessarily modify data. Especially in this situation you can also increase your application performance by moving these specific processes to a new environment.

But… how…

The information in the new environment needs to be real-time consistent with the “production” or primary environment. Here we introduce a real-time data replication solution like Dbvisit Replicate which will create just this real-time consistent query environment for you! This makes for the following investment:

  • Medium Oracle Sun Server X4-2 with 2 x 8 core CPU’s at € 19,500
  • 2 Oracle Database Standard Edition One licenses at € 11,200
  • 4 Dbvisit Replicate XTD at € 16,180

With this installation you add another € 50 k. of licensing in stead of € 100 k. with the Standard Edition migration. With this choice, you separate your time-critical data-entry process from the query environment, making sure a mis-fired query will not influence the availability of your data-entry process environment, which is a cool extra advantage!

* All prices are based on list-prices, excluding VAT and including 1 year of support.
** Based on the Oracle Processor Core Factor Table.

UKOUG technology conference 2013

Air-born again, December first 2013. Heading to Manchester for the UK Oracle User Group technical highlight of the year, or for short: #UKOUG_Tech13 as the twitter handle sounds.

This time it will be a little different since I have been granted a speaker slot. A great honor and also a great responsibility since there will be a number of people offering their precious time to spend in my session and all that in a VERY EARLY time slot.
But first, find my way to the Manchester Convention Center, my hotel and the sessions I plan to attend this afternoon. Through Twitter there have already been several contacts made with friends inbound to Manchester or those who are already there. These will again be a few full, fun and exciting days spend in the companionship of what will call “The Pragma’s!”:
Joel Goodman, Iloon Wolff, Philippe Fierens and myself.

It turned out to be a great conference! Manchester proved to be a fine venue with a lot of possibilities and compact enough to have everything close-by, where even OTWUK13 (Oak Table World 2013) found its venue close by!
Although I planned to visit many more sessions, there is where I ended up:

  • How to Avoid to Struggle with the APEX Listener by Iloon Wolff
  • Next Generation GoldenGate vs. Streams for Physics Data by Zbigniew Baranowski
  • PL/SQL Enhancements Brought by Oracle Database 12c by Bryn Llewellyn
  • Installing Oracle Database on LDOMS by Pragma Philippe Fierens
  • Goodbye KVM… Hello KVM by Martin Nash
  • Beginners’ Guide to Cost Based Optimization by Jonathan Lewis
  • Roundtable Development Tools, chaired by Andrew Clarke

racattack-51Then, on Wednesday it was time for my own talk. This was my premiere talk on an international stage and I guess it went quite well and It was good to see a few famous Oracle people amongst the audience! In a 45 minute session I discussed a project where we replaced an Oracle Forms application front-end by an APEX implementation on Oracle Standard Edition. This implementation is currently running production with Dutch Healthcare providers.
Thank you, my good friends for your support!

But, first and foremost, UKOUG_tech13 turned out to be the event to meet all my friends and heroes again… (in no particular order 🙂 and without the hope not to forget anyone)

Tim Hall, Simon Haslam, Ronald Luttikhuizen, Osama Mustafa, Peter Raganitsch, Heli Helskyaho, Frits Hoogland, Uwe Hesse, Lonneke Dikmans, Björn Rost, John Scott, Patrick Barell, Alex Nuijten, Alex Gorbatchev, Mogens Nørgaard, Øyvind Isene, Bryn Llewellyn, Kuassi Mesah, Martin Nash, Alex Zaballa, Martin Widlake, Brendan Tierney and even a few more.

And so, Manchester, we say goodbye. Until we meet again!