Looking smart is easy when you havethe right info.

Anonymous



A blog by Hafed Benteftifa.

Static Google Map image Javabean in Oracle Forms 10g

4

Posted by Hafed | Posted in Forms, oracle, PJCs/Javabeans | Posted on 30-12-2008

Here is an output for a Javabean that shows the image from a Static Google Map.

Static Google Map Javabean output-Oracle forms 10g

The example shown here is for the google headquarters. The user inputs the address info in the Forms module and the Javabean takes care of fetching the data from Google Maps.

The process is done in two steps. First step is converting the address into Latitude and longitude (HTTP Geocoding) and then the static map is obtained from Google based on this info.

I will post the javabean here very soon.

File Selection Dialog with Oracle Forms 10g (10.1.2): replacing some of webutil functionalities

25

Posted by Hafed | Posted in Forms, oracle, PJCs/Javabeans | Posted on 24-12-2008

When you have a directory with a complicated hierarchical structure (nested sub-floders), using webutil to browse the folder is inadequate. This is mainly due to the use of JFileChooser which is notoriously slow in this case.

Since most implementations use JInitiator, one way to circumvent this problem is to implement a bean that will make use of AWT FileDialog.

Based on the fileuploader bean found in the oracle forms 10g demos, I have implemented a bean that provides file selection.

This has been tested on Forms 10g 10.1.2 on IBM AIX. Please note that the bean was put together in about 10 hours in order to resolve this specific directory browsing and file selection.

Download jar, pll and installation doc

Update: Here is the FMB with the demo: fileupload.fmb

Migration is over and our Oracle Forms 10g application is now in production

0

Posted by Hafed | Posted in Forms, oracle | Posted on 05-12-2008

We passed the test and our application has now been in production for 5 days.

A lot has happened since we started the Oracle forms migration to 10g (both the Database and application were migrated to 10g).

Some minor glitches did happen when our users started using the new webforms but overall we are having positive feedback.

Preliminary comments are mostly  related to pop-up blockers on IE that did not behave as expected. Remember that to display reports from Forms, we use web.show_document and this one opens up the pdf.

Webutil is also causing some concerns especially with the FILE functionalities (see http://forums.oracle.com/forums/thread.jspa?threadID=834438&tstart=0)

But overall with close to 1200 modules, it is quite an achievement that we did not have major issues.

Strategies for keeping up to date with Oracle forms…

2

Posted by Hafed | Posted in oracle | Posted on 28-11-2008

 

One of my students recently asked me a question relating to how he can make himself valuable compared to other job applicants.

While I could have answered him with one of those pre-packaged all-purpose answer, I really thought about how I myself manage to keep my knowledge up to date.

I do not pretend to be superman but I think that I have the ability to get involved in interesting projects and most important provide the best (working at least) solutions.

Thinking about it, I do not believe that it is due solely to my own personal abilities but more because of the interactions I have with others on a daily basis.

So, I outline in the following the steps I follow in a typical workday. Please bear in mind that the info that follows is geared more toward Oracle Forms but is quite relevant if you work with different platforms, languages, environments, etc…

  • Know who the major and important contributors in your field are and where to find them. In my case, Oracle OTN is the place to be and I make sure to check the Oracle Forms and Reports Forums first thing in the morning. I glance at the current topics and see who posted the topics. While there are a number of experts, those to watch out are Francois Degrelle, Steve Cosner, Tony Garabedian, RajeshAlex and Andreas Weiden.

As a side note, I am quite amazed to see that current practicing forms developers do not even know about the OTN forum. On another level, I also found some quite interesting solutions on ORAFAQ.

  • Check the Forms and Reports OTN pages at least once a week. There might be some news of interest there.
  • Download JCreator LE and start experimenting with PJCs and Javabeans. If you migrate to Oracle 10g, javabeans will provide you with new ways to extend Forms functionalities. You will be amazed what you can do with javabeans.

As a side note, don’t take anything for granted. While Oracle Forms is still here and is very productive, nothing forbids you from learning JAVA or .NET. I myself choose JAVA for some reasons and is quite happy with it. That’s just one more thing in my bag.

  • Try to take time to understand the new Forms architecture. You will save yourself some valuable time when working with Forms 10g if you understand how Forms calls are processed.
  • Do Google for Oracle forms keywords from time to time. You might come up with interesting results.
  • Last but not least, be interested in other platforms, languages and environments. Almost every week, I check www.dzone.com for the latest in development trends and there are quite interesting stuff over there to check. For example, I have done quite some work with WordPress, PHP, mysql and ruby on rails based on the tutorials I found from links posted on dzone.
    While I won’t consider myself a PHP or RoR developer , I can say that I know how to get around with them.

Timers and their usefulness, what has changed in Oracle forms 10g ?

2

Posted by Hafed | Posted in Forms, oracle | Posted on 28-11-2008

Timers were used quite heavily in C/S environments (Oracle forms 6i). Of the many uses, the one that is the most typical is to create a timer when validating an item and then perform an action when the timer expires.

For example, suppose that we need to sort records in a block according to a given criterion. Whenever a new value or a change occurs in a column (record within the  block) we reorder the block. This implies an execute_query built-in. Another one deals with a go_item whenever we validate a given item. In this case, the error related to restricted built-ins will be raised.

By including a timer, we will shift the action from the WHEN-VALIDATE-ITEM to the WHEN-TIMER-EXPIRED.

However, in Oracle forms 10g, the same strategy will raise a whole new issue. Since 10g implies a web environment with a middle-tier hosting the application server, managing timers implies prohibitive server-side management especially with a large user base.

In this case, another solution might be available by using PJC’s/Javabeans. Oracle has already provided a client-side Timer bean. For the time being, I have not tried this bean since it can be set at a minimum to 1 min. I will have to modify the bean code in order to allow much lower interval (in the milliseconds range).

J-2 before the new Oracle forms 10g application move to Production

0

Posted by Hafed | Posted in oracle | Posted on 27-11-2008

Everything is now in place for the move to production. This is scheduled for this coming Saturday Nov 29, 2008.  There were several hurdles along the way and adjusting the printing functionality we had in the C/S version to the new 10g web version were not that easy.

In fact, I had some sleepless nights the last two weeks. I can say that I mastered the way reports server works on UNIX (AIX).

I wrote the following paper which explains what you need to do in order to implement some printing requirements such as duplex printing, tray selection etc.

I used a scenario that might be of interest to a number of implementers. Please note that the solutions I outlined work at the present time and are specific to the platform we use, namely report server on AIX. You might have to make some adjustments if you are on a different UNIX platform.

If you do use this info, please leave a comment or suggestions so that I can improve the document for others to use.

Download: UNIX printing reports server

Forms migration on UNIX- almost the end!

2

Posted by Hafed | Posted in Forms, oracle | Posted on 11-11-2008

We are almost at the end of our Forms migration to  10g on IBM AIX. I received some emails regarding the points to watch out for. As you can imagine by reading the previous posts, the migration as the forms module are concerned should not take that long especially if you use JDAPI. Somme annoyances here are mostly with WEBUTIL functionnalities that you need to implement (replacing host, file transfer, image treatment etc.)

However, before even starting the project, you need to do a THOROUGH assessment of your current application and how it is being used. Please be as thourough as you can get in this phase. Otherwise you might have big surprises later on. We have had some really nasty surprises during our journey and that was mainly due to printing on AIX among other things.

First thing to consider is the application server and the platform you selected for hosting it. If it is Windows, then no major hurdles here. If you move to a LINUX/UNIX/AIX platform, then you will be dealing with the PRINTING problem. Direct printing is no longer available in 10g and the alternatives are not worth looking at (direct print PJC and orarrpt). I am talking here about mission-critical applications.

Second problem is the font problem. Expect major headaches here since your developers will be working on Windows machines and your reports are deployed on a LINUX/UNIX/AIX machine. Fonts are not the same and you will have to work on getting the same fonts on LINUX/UNIX/AIX. Not an easy task.

If you have some special printing requirements like we do and I mention here specifically printing on special papers, special paper sizes, automatic printing on designated printers and duplex printing, then you are in for a surprise and a big one I might add. Those are not possible straight out of the box and you will have to do some really nast setups on your report server.

I have spent about 3 days trying to find solutions on those simple requirements. I am still puzzled that there are almost no mentions about those issues on the OTN forums or anywhere else. Either people are not using IAS on LINUX/UNIX/AIX or I am missing something here. At any rate, I thoroughly searched Metalink for answers and came up almost empty handed.

I managed to work out solutions for those problems but it has been tough. I will document the solutions we implemented in an upcoming post.

Finally, the other major problem deals with all the tweaking you have to perform on the forms and reports server. There are so many small things to watch out for and which will take hours to fix. Now, if you get a firewall in the loop and most likely you will have one, then expect some further tweaking to get everything working.

Anyway, a lot of fun if you move to a LINUX/UNIX/AIX platform.

Based on all of the hassles we went through, I am tempted to say that LINUX/UNIX/AIX is not really a good option if you have some real printing to do through your application. Better to stick with windows 2003 or 2008. At least Microsoft has put in place a platform that works.

Where to get help: OTN, Metalink and double check whenever you suspect that litlle looking parameter in that configuration file ….

P.S: Did I mention that all our reports are in French and that characters with accents are replaced with greek characters when printing using Postscript straight to the printer. What a waste of time just to get that one line somewhere stating that you can’t get those accents unless you convert your postscript output to PDF and then print it using the PDFPrint plugin.

Solving the Oracle Reports 10g fonts problem

0

Posted by Hafed | Posted in Forms, oracle | Posted on 16-10-2008

Finally, we were able to solve the Arial Italic and Bold problems. Using  Metalink Note 261879.1, it was relatively straightforward to add the font.

The steps to follow are:

1) Transfer the Arial fonts (ttf version) from Windows to UNIX. Make note of this directory.

2) Use the open source program ttf2afm to generate Adobe Font Metrics (AFM) files for TrueType (TTF) fonts.

3) Modify reports_path to add the fonts directory.

4) Make sure the AFM file for the italic version does not have the (-) sign for the slant angle.

5) Update the ALI file to add the Arial font in [PDF] section. Check the version of the ALI file mentionned in the Metalink Note 261879.1

6) Restart the reports server.

These steps can be used for any font that you want to add to your reports server setup.

UNIX Fonts and Oracle Report server: a never ending nightmare

5

Posted by Hafed | Posted in Forms, oracle | Posted on 09-10-2008

One of the more frustating experience you can have when migrating to Oracle Forms 10g is the fonts problem.
In Oracle Forms 6i, users are generally standardized on Windows and in this way, they have access to the usual fonts such as Arial, Times Roman, Courrier and Courrier New. When printing reports, either direct or through a PDF, the same fonts are used as is and the output is a true copy of the rdf.

However, on 10g and if the server is UNIX-based, then a whole number of issues will arise. The first one is due to the fact that the usual Windows fonts are no longer available on UNIX. Second, the fonts on UNIX are quite limited and in this case  fonts  such as Arial are outputted as Helvetica (in reports server terminology, this is refered to as subsetting, embedding etc.).

Now, if you really want to have the same fonts you have in your RDF, then you need to install those fonts on UNIX.  This is where it becomes quite nightmarish. In our case, we were able to get either Arial bold or Arial Italic but not both at the same time, at least for the time being.

To solve this font problem, We are  following these Metalink notes:
NOTE:261879.1 Configuration Script to add Common Windows Fonts to Unix 9i, 10g R1 and 10g R2 Reports Server
NOTE:272063.1 Using Reports PDF Subsetting, Font Size and Styles Bold, Italic, Bold-Italic Are Ignored
NOTE:419045.1 Italics are Reversed and No Bolding of Arial Font on Sun 64-bit

Oracle Forms 10g BI Bean

0

Posted by Hafed | Posted in Forms, oracle | Posted on 20-09-2008

Some of our modules made use of Oracle graphics in the 6i version (C/S). We spent some time thinking about installing Graphics on 10g but eventually we opted for the BI bean instead. Why ? very simple because you can easily duplicate what you have in 6i with very nice features from the BI bean.

There might be a slight learning curve here but it really boils down to reading the instructions that come with the BI bean and some testing. That’s all.

Note: make sure you set your classpath to the folder where you have your JARs.