Quicklinks

Sponsor

Forms wrapper for Oracle data visualization components

Posted by Tobias on March 21st 2009

Updated on December 12th 2010

About

Our company wanted to be able to visualize data in Forms 10 using graphs and gauges. For some time now we have been using the Forms BI Bean Graph Integration Wrapper created by Frank Nimphius. This wrapper enabled the use of BI Beans graphs in Oracle Forms. Since then Oracle has updated the visualization components with additional functionality like displaying data using gauges. To be able to use this functionality in Forms we have heavily modified the BI Beans wrapper to include the Oracle visualization components from version 11g Release 1 (11.1.1.0.1).

Forms wrapper for Oracle data visualization components

Requirements

Since the visualization components are compiled with Java JDK version 1.6, a Java runtime environment (JRE) at version 1.6 or higher is required on the client machine running the Forms application.

Modifications to the original wrapper

There are numerous modifications to the original wrapper created by Frank Nimphius to provide some, but not all, functionality provided by the Oracle Data Visualization Components. Because we were already using the original wrapper we wanted full backwards compatibility so if all requirements are met this updated wrapper is a drop-in replacement for the original wrapper. All components belong to Oracle and the original author Frank Nimphius. The original source code (which have been modified in this bean) is available from this page: http://www.oracle.com/technology/sample_code/products/forms/index.html. The sources from Oracle hasn't been updated since early 2006.

Downloads

Binaries and Sources

Download binaries and sources v1.0.2 (1,16MB)

Binaries

This file contains the FormsGraph.jar file, documentation, a test form for Oracle Forms Builder and a screenshot of the test form at runtime.

Download binaries v1.0.1 (51KB)

Download binaries v1.0.0 (5,38MB)

Sources

The makefile expects JDeveloper in c:\oracle\Middleware. If it is installed elsewhere, update the makefile accordingly.

  1. Copy frmall.jar to the lib directory or change the path in the makefile. The jar should be located in your Oracle Forms installation directory.
  2. Copy the binary version of FormGraph.jar to the bin directory.
  3. Extract all dependency class files to the bin directory OR supply all dependency jar files with your application.
  4. Execute the build by typing "make" without quotes in a console.
  5. Build the jar file by typing "make buildjar" without quotes in a console.

Documentation for oracle.dss.graph and oracle.dss.gauge are located in the file "dvt-faces-javadoc.jar" which you can find in your JDeveloper install directory.

Note: Step 3 is the hard part. You need to find all class files which FormsGraph.jar needs to run or else you will get exceptions at runtime. The binary release of FormsGraph includes these files but you can build FormsGraph without these and supply the jar files with your application.

Download sources v1.0.0 (36KB)

Subversion repository at code.google.com

Deploy using JDeveloper

  1. Download the latest version of JDeveloper (11g release 1 ATTOW).
  2. Install JDeveloper to the default location.
  3. Start JDeveloper using default role.
  4. Create a new ‘Generic Application’, when asked for name use 'FormsGraph' for application and project.
  5. Create a new Java Class, name it ‘FormsGraph’ and use ‘oracle.forms.demos.bigraph’ as package name. We perform this step to create the necessary folders.
  6. Unpack the bigauge and bigraph folders in the FormsGraph_v1.0.0_src.zip file to your project directory replacing the FormsGraph.java file you just created using JDeveloper. You should now have a directory structure similar to: ‘C:\JDeveloper\mywork\FormsGraph\FormsGraph\src\oracle\forms\demos’
  7. In the demos folder you should have two additional folders named bigauge and bigraph containing the source files.
  8. Go back to JDeveloper and refresh your project, it should now contain all relevant source files. If you open up the Overview tab there will be a lot of errors and warnings, don’t worry though, it just can’t find the required libraries.
  9. To add the libraries, go to the Project Properties dialog and choose ‘Libraries and Classpath’. Click ‘Add JAR/Directory’, navigate to ‘C:\Oracle\Middleware\oracle_common\modules\oracle.adf.view_11.1.1’ and select ‘dvt-jclient.jar’. Also add the ‘dvt-utils.jar’ which is located in the same place. Finally we need to add the file ‘frmall.jar’ which is located somewhere in your Oracle Forms installation. After adding these libraries the ‘Overview’ tab should now only display a few warnings.
  10. The final step is to create a deployment profile. Bring up the ‘Project Properties’ dialog again and choose ‘Deployment’. Click ‘New’ and choose ‘JAR File’ as ‘Archive Type’ and ‘FormsGraph’ as ‘Name’. You may use compression if you’d like but all default settings are fine. Now run the deployment by right clicking your project and choose ‘Deploy’.

That’s it! You will now have a FormsGraph.jar file in your deploy folder. But hang on a minute... It’s really small! That’s because it doesn’t contain the libraries. You now have two options; deploy ‘dvt-jclient.jar’ and ‘dvt-utils.jar’ using your application server configuration file or use your favorite method to merge all the JARs.

Recent investigations show that the following libraries are required for FormsGraph, the libraries can be located within your JDeveloper installation directory.

  • C:\oracle\Middleware\oracle_common\modules\oracle.adf.view_11.1.1\dvt-jclient.jar
  • C:\oracle\Middleware\oracle_common\modules\oracle.adf.view_11.1.1\dvt-utils.jar
  • C:\oracle\Middleware\jdeveloper\jlib\jewt4.jar
  • C:\oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar

Changelog

v1.0.2

v1.0.1

Test release

v1.0.0

  • style_default.xml: Fixed axis not visible because gridlines was painted over.
  • FormsGraph: Added SET_X_VALUE_FONT.
  • FormsGauge: Added DEBUG.
  • FormsGauge: Added SET_THRESHOLDS_BORDER_COLOR.
  • FormsGauge: Added SET_TICK_LABEL_CONTENT.
  • FormsGauge: Added SET_BOTTOM_LABEL_POS.
  • FormsGauge: Added SET_TOP_LABEL_POS.
  • FormsGauge: Added SET_TOP_LABEL_TEXT.
  • FormsGraph: Fixed EXPLODE_PIESLICE.
  • FormsGauge: Added mouse listener which sends GAUGE_INFO (Label text and current value) back to Forms on click.
  • FormsGauge: Added SET_BOTTOM_LABEL_TEXT.
  • Added GaugeDataStore for storing gauge data.
  • colorCodeRegistry: Made it public so we can use it from FormsGauge.
  • Fixed all compiler warnings.
  • FormsGraph: Added MOUSE_ACTIVE, used to fix light/heavy weight component bug which made the graph render on top of other components.
  • FormsGraph: Added 3D effect when mouse is dragged.
  • FormsGraph: Fixed RESET_GRAPH, did not remove index lines.
  • FormsGraph: setDefaults() now sets all default values except mouse listeners.
  • FormsGraph: Added SET_XML_STYLE to set graph style using an XML string.
  • FormsGraph: SET_STYLE now sets default styles using names. Default styles are located in /oracle/dss/graph/styles.
  • Added style_default.xml.
  • Added SET_STYLE to set graph style from XML string.
  • Removed graph default values, now set using XML style.
  • Added xmlparserv2.jar lib for parsing XML styles.
  • Added SET_X_VALUE_FONT.
  • Added graph title to clipboard exports.
  • Added EXPORT_CLIPBOARD.
  • Fixed crash when double clicking a graph.
  • mViewMouseListener.java - A timer now handles click events.
  • Added SET_Y_DECIMAL_DIGITS and SET_Y2_DECIMAL_DIGITS.
  • Updated reset method to set default decimal digits.
  • Added SET_Y2_LABEL.
  • Fixed bug in HIDE_AXIS, exception was thrown when string argument was null.
  • Added getParamsFromString() to create object array out of comma separated string.
  • Added SET_SERIES_Y_AXIS to set a series to the Y2 axis.
  • Added RESET_GRAPH which will reset some aspects of the graph.
  • Added ENABLE_GRADIENT.
  • SET_X_TITLE now supports font change.
  • SET_Y_TITLE now supports font change.
  • HIDE_AXIS now remembers MajorTick for axis and restores it after setVisible().
  • Added MT_MARKER for SET_SERIES_MARKER_TYPE.
  • Added ENABLE_MARKERTEXT.
  • Antialiasing is now default on for graphics and text.
  • SET_GRAPHIC_ANTIALIASING now also sets text antialiasing.
  • Fixed mouse click not returning primary key in string.
  • Added support for more than 3 reference lines.
  • When showGraphAsSeries = true, getPrimaryKey() now returns correct value.
  • Added support for setting min and max scale for Y2 axis.
  • Updated graphTypeRegistry.java to support new graph types.

Post a comment




Comments
Posted by Tobias on March 23rd 2009 09:59
The FormsGraph.jar file needs to be signed in order to make it work.
Posted by Shekhar on April 3rd 2009 08:28
Does this jar needs any license/ Persmission ?
I would like to know more about owner rights.. Thanks
Posted by Tobias on April 5th 2009 12:35
Shekhar,

if you have a license for Oracle Forms 11g and the original FormsGraph wrapper you should be good to go.
Posted by Narasimha Mothukuri on April 21st 2009 19:50
We would like to use this in our product. To make it more official would you be willing to share code and make it as open source? I am willing to help in making this open source project.
Posted by Tobias on April 21st 2009 23:09
The source code is ready to be posted, I just need a few more days to write a small guide on how to set up a development environment so the code will compile correctly. After that you are free to do what you want with the code but I would appreciate feedback with bug fixes and new features.
Posted by Tobias on April 24th 2009 21:31
The source code has been posted, enjoy!
Posted by Shekhar on May 22nd 2009 11:21
Thanks. Its really a great effort.
Posted by Omama on February 13th 2010 06:19
Can we use this bean wrapper with Oracle 10g Developer suite?
Posted by Tobias on February 15th 2010 14:29
Omama,

It depends on what you mean. If I'm not mistaken, the 10g Developer suite ships with JDK 1.4.2 which is incompatible with this wrapper. Having said that, I'm running Forms Builder 10g + this wrapper on JRE 1.6.0 perfectly fine.

Best regards,
Tobias
Posted by Shankar on May 13th 2010 08:13
Omama,

Can i use this bean wrapper for oracle forms 9i with jdk 1.6 .
Posted by Shankar on May 13th 2010 08:13
Omama,

Can i use this bean wrapper for oracle forms 9i with jdk 1.6 .

Please Advice
Regards,
Sahnkar
Posted by Kulkarni on May 16th 2010 10:22
Tobias,

Can i use this bean wrapper for oracle forms 9i with jdk 1.6 .
Posted by Tobias on May 20th 2010 08:44
"Can i use this bean wrapper for oracle forms 9i with jdk 1.6" - Unfortunately we are not running 9i so I can't answer your question.
Posted by Omama on July 20th 2010 10:26
I have to do some modification in this FormsGraph jar file and want to recompile it again . I have installed jdeveloper 11g and tried to compile it but i think i m missing the libraries to attach can you just tell me the step to compile the source code of this jar file in Jdeveloper 11g.
Posted by Tobias on July 22nd 2010 22:39
Omama,

I'm guessing, by the error messages you specified in your e-mail, you're getting stuck at the addIndexLine() and addReferenceObject() methods. Try commenting those methods and compile again. I have never tried compiling FormsGraph.java using JDeveloper so I don't know how to set up the environment. Check the file make.cmd for clues regarding missing jars.

Also, if the compiler complains about missing createReferenceObject() and destroyReferenceObject() methods it sound like you have the wrong version of dvt-jclient.jar which contains oracle.dss.graph.Graph.

Best,
Tobias
Posted by Tobias on July 22nd 2010 22:59
There is an updated version of the graph component in the latest JDeveloper release which fixes a number of bugs including one I notified Oracle about: zero values at the end of a bar looked like more than zero. Yay! Oracle sometimes listen to request!

Give me a few days and I'll compile a new version of FormsGraph using JDeveloper. I'll post all steps on this page.

Best,
Tobias
Posted by Jacob on August 3rd 2010 05:59
Looking forward to your Jdeveloper project files for formsgraph. I tried but after creating a new formsgraph.jar it will always hit classnotfound error. Using the original jar file, unsigned, works. Even signing the original jar file returned classnotfound error.
Posted by Tobias on August 11th 2010 22:15
I've just posted how to compile the sources using JDeveloper, scroll up and enjoy! Best of all, using this method you'll end up with the new version of the graph component.

Best,
Tobias
Posted by PeterGriffin on November 19th 2010 12:53
I just came accross this. we already use the original one in our forms environment.

I got the formsGraph.Jar
rebuilt and signed in our environement then used the JAR. But i get
xception in thread "AWT-EventQueue-3" java.lang.NoSuchMethodError: oracle.dss.graph.Graph.getVersion()Ljava/lang/String;

any ideas?

We dont use Jdeveloper, only Forms Builder?
Posted by Tobias on November 19th 2010 21:13
Mr. Griffin,

I would need more information about your environment to do a proper analysis. If I would guess then maybe you're not running this on JRE 1.6? Also, you mention that you "rebuilt", what exactly do you mean by that?

Best
Posted by PeterGriffin on November 22nd 2010 12:24
we are running 10.1.2.3 app server with JRE 1.6 yes.

I rebuilt the Jar and signed it via JAR Signer metalink doc (jar -cvf) but i also just tried using the test fmb u provided and formsgraph.jar and got same error.

Wondering if one of the other JARs (i.e. frmall?) may be referenced and they are too old perhaps?

thanks
Posted by Tobias on November 22nd 2010 22:34
I have tested the binaries posted here with Forms 10.1.2.3 and it worked.

The exception you're getting says that the getVersion() method is missing from the Graph class which makes no sense. The only call to getVersion() in FormsGraph is in the constructor which prints the version of the graph component.

I've posted updated binaries if you want to try them out. These newly compiled binaries omits the calls to getVersion() and are also linked against your Forms version. Unfortunately, I haven't included the required libraries so you will have to find them yourself within the JDeveloper installation directory. I've listed the required jars above. Find them and copy them to your forms\java directory, then include them in formsweb.cfg.

The final step is to sign FormsGraph.jar and all the required libraries, otherwise you'll get security exceptions at runtime.

Best
Posted by PeterGriffin on December 1st 2010 13:02
Tobias, Thanks for all your hard work.

Im currently away from the office which is why im not able to test this, but as soon as i get back ill update you with how it goes (just letting you know im not ignoring it) Thanks
Posted by Omama on December 3rd 2010 06:42
Tobias
I have tried recompiling Jdeveloper and attached all the jar files but it still gives these errors.
Error(490,57): cannot find method createReferenceObject()
Error(497,62): cannot find variable RO_FRONT
Error(533,78): cannot find variable RO_AREA
Error(692,24): cannot find method destroyReferenceObjects(int)
Error(1855,83): cannot find variable GS_AUTOMATIC
Error(1861,83): cannot find variable GS_NONE
Please suggest how can i solve this . I am using Jdeveloper Studio Edition Version 11.1.1.3.0.

Regards
Omama
Posted by Tobias on December 3rd 2010 08:18
Omama,

I think you are referencing an old 'dvt-jclient.jar'. Bring up the 'Project Properties' dialog and click 'Libraries and Classpath'. I have the following jars in the 'Classpath Entries' list: dvt-jclient.jar, dvt-utils.jar and frmall.jar. Nothing more and nothing less.

Best
Posted by Omama on December 7th 2010 06:20
Tobias
I have compiled the code successfully but it gives few warnings.
Warning(966,24): setDataRowShownAsASeries(boolean) in oracle.dss.graph.Graph has been deprecated
.
.
Warning(2553,33): finally clause cannot complete normally
Moreover I have tried the properties, some of them are not working e.g.
SET_PLOT_AREA_COLOR for PIE Graphs type
SET_FRAME crashes the form
SET_SCROLLBAR it shows nothing

Can you help for this .
Posted by Tobias on December 7th 2010 22:02
Omama,

I've tested SET_PLOT_AREA_COLOR for a pie graph and you're right; it doesn't work. It does work for other types of graphs though. A pie graph doesn't have a "plot area" in the same sense as say a bar graph. If you're trying to manipulate the way the graph looks you should really look into the xml styles.

There are no SET_FRAME or SET_SCROLLBAR properties, where have you seen this?

Best
Posted by Omama on December 8th 2010 07:03
I was telling about SCROLLBAR property
set_custom_property('block1.BeanArea1',1,'SCROLLBAR','true');
and about SHOW_FRAME and settings of FRAME like FRAME_POS,SET_FRAME_HEIGHT_WIDTH. SHOW_FRAME dont work in my case it crashes the form.

Regards
Omama Khurshid

Posted by Omama on December 8th 2010 07:11
Sorry ,Its actually HIDE_FRAME that break the form
set_custom_property(Bean, 1, 'HIDE_FRAME', '' ) ;

Reagards
Omama Khurshid
Posted by Tobias on December 8th 2010 22:18
Omama,

I'm not sure how the SCROLLBAR property works. It seems to only add scrollbars when needed.

The SHOW_GRAPH_IN_FRAME property isn't anything I've looked at previously but when looking at it now I realize the implementation is horrible. You need to set one property for the window size then another for initializing the window then a third property for actually showing the window. We can do better!

*Code removed, browse it here: http://code.google.com/p/forms-dvc-wrapper/source/browse/trunk/src/oracle/forms/demos/bigraph/FormsGraph.java - line 1143*

Or you can wait until I have the time to post an updated version of the source code. If you do change these two methods you can create the external window from Forms like this:
Set_Custom_Property( 'BLOCK1.BEAN_AREA1', 1, 'SHOW_GRAPH_IN_FRAME', 'myWindowTitle|800x600' );

When closing the window the graph will automatically return to your form.

Best
Posted by Omama on March 8th 2011 19:05
Tobias ,
I am facing one problem while recompiling the source code with Jdeveloper Studio 11.1.1.3.0 and 11.1.1.4.0. The ROTATE_X_LABEL property is not working when i recompile the same code . I dont understand why is it so . the java console debug shows that rotation is successful but the screen shows no rotation of X label.
Posted by Tobias on March 9th 2011 09:47

The ROTATE_X_LABEL seems to work as expected. I'm using Set_Custom_Property('BLOCK.BEAN_AREA', 1, 'ROTATE_X_LABEL', '90'); where valid values include 0, 90 and 270.

Having said that, you may not see your own expected results depending on which type of graph you are using. Have a look at the rotateXLabel() method (which you btw can do directly by browsing the Google subversion repository, scroll up for the URL), notice that we are using a method called getO1TickLabel() to rotate the labels. So, what's an O1-axis you ask? The docs say the following:

"The ordinal axis on a line, bar, area, scatter, bubble, or stock market graph. The ordinal axis usually represents a dimension, and has dimension members along it, such as January 2000, February 2000, and so on. On most graphs, it is a horizontal axis. On horizontal graphs, it is a vertical axis. A graph can have either an ordinal axis or an X1-axis, never both."

I hope you can get a better understanding of this and are able to solve your problem.

Best,
Tobias
Posted by Omama on March 11th 2011 06:37
Tobias

I want to send you the jar file which i am using and the source code alongwith the form. Can u please give me your email address. My email id is *address removed*
Posted by Tobias on March 21st 2011 17:25
Hi Omama,

sorry for the late reply, been real busy. I ran your test form using your compiled FormsGraph.jar and the rotation doesn't work. So, something has gone wrong with your jar file and I'm not sure what. I'm guessing you followed the "Sources" section when creating your jar and I would recommend you to try the "Deploy using JDeveloper" section instead. You may have compiled your sources against the new version of the graph component but are running it with the old version and that's what's wrong. By supplying the original jar files from Oracle you get a much better setup, ie, you only need to replace the Oracle jars when new versions arrive and you never need to copy classes to the FormsGraph.jar file.

Best
Posted by James on August 10th 2011 03:19
I have a working Forms 11g development and runtime installation (Windows 7 64bit) which runs my own Forms 11g app perfectly and also runs the Oracle Forms 11g Demo BIGraph perfectly. I have incorporated the Demo Forms 11g FormsGraph jar file into my app and have been able to produce graphs.

I would like to use this latest version of FormsGraph but I simply cannot get the demo to work - it just doesn't appear with no error messages or other clues that I can find - can you please tell me which jar files I have to have to make this work or any other idea please. I have read all the documentation I can find but am unable to get any further....
Posted by Tobias on August 11th 2011 20:21
James,

the 4 required library files are listed above. If the graph doesn't work then you should have an error message in the java console. Are you able to run the test form included in the 1.0.2 package?

best
Posted by James on August 12th 2011 03:26
Thanks for your response Tobias - No I can't get the test form to run at all - I can get the Oracle demo form to run and can incorporate it's FormsGraph.jar into my apps okay and get graphs up there - I have set up a separate section in my formsweb.cfg file for this test form in the same manner as I have done for the Oracle Demo and copied the above jar files and the new FormsGraph.jar file into the forms/java folder exactly as for the Oracle demo - I have recompiled the test.fmb into Forms 11g - everything I can think of - I have turned the java console on but I just get nothing at all - the formsweb.cfg section is located, the session gets set up but then nothing..... I am really stuck....
Posted by James on August 12th 2011 07:54
Tobias,
Further testing has found the following;
I can run up the test.fmb from the 1.0.2 package when I use the Oracle forms demo FormsGraph jar file - that is it appears but doesn't do anything (as I expected).
I didn't have JDeveloper installed on my PC so I did this and couldn't find the 4 jar files mentioned above there at all. I returned to using those I had found in for Forms installation perviously.
I extracted everything from the Oracle forms demo FormsGraph jar file and then extracted everything from the 1.0.2 FormsGraph jar file and rebuilt a new FormsGraph file. It seems okay except I am unsure about the signing... Bit this doesn't work either - the test.fmb appears but doesn't run... Can you tell me what I am doing wrong please?
Posted by Tobias on August 15th 2011 22:24
James,

Sorry, I overlooked the fact that you are running 11g. I will get another dev environment with 11g and test it asap.

best
Posted by James on August 22nd 2011 07:41
Tobias,

Can I email you an error listing from my java console - it might give some ideas?
Posted by Tobias on August 24th 2011 21:47
James,

sure, my box is tobias(at)bincsoft.com.

I'm currently having some problems with my own 11g dev environment. I did get a ClassNotFoundException at one point which would indicate that weblogic can't find FormsGraph.jar.

I'll keep you posted once I get this up and running.

Best
Posted by Tobias on August 25th 2011 21:50
Just to let everyone know, James received a java.security.AccessControlException on startup and this was resolved by signing all jar files (FormsGraph.jar, dvt-jclient.jar, dvt-utils.jar, jewt4.jar and xmlparserv2.jar), clearing the client java cache using the Java control panel and finally restarting the weblogic server.

Best
Posted by Marco on October 8th 2011 00:49
Donde puedo bajar el formsgraph para la oracle forms 10.1.2.3
Posted by Tobias on October 8th 2011 12:14
Version 1.0.2 which is available at the top of this article contains a compiled version for Forms 10.1.2.3.

Best
Posted by Edward Novillo on November 17th 2011 17:09
Is there a way to print the Graphic??... Maybe PDF??...
Posted by Tobias on November 17th 2011 19:46
The only way to export the graphs is the EXPORT_CLIPBOARD property which will... well, export the graph to the clipboard so you can paste it somewhere else.

Best