Custom built Forms Migration Assistant
30 May 2005 at 08:56 CEST | In 6i to 10g upgrade, Forms, Oracle |We’re currently migrating from Oracle Forms 6i (deployed using Citrix MetaFrame) to Forms 10g running over the web. For that, we have to migrate about 350 forms, libraries, menus and object libraries. In this blog entry I’ll try to explain why I ended up creating my own Forms Migration Assistant and what changes I’m making to all files during migration.
I started of with the Forms Migration Assistant that comes with Oracle Forms. It’s quite easy to run and it mainly focuses on all the PL/SQL code in your files. It makes some changes to replace obsolete built-ins and it issues some warnings for PL/SQL code that might need changes. In testing the forms, we found that we needed a lot more changes.
I tried to find the source code of the Migration Assistant or a way to extend its classes. Unfortunately that did not work. I then decided to create our own Migration Assistant to run after the one Oracle supplies. With the JDAPI that comes with Oracle Forms it’s not even that difficult. With the JDAPI you can open each module (Forms, Menu, Object Library or PL/SQL library) and get/set each property and add/remove objects.
Over a couple of weeks we tested the migrated application and kept adding more code to my own Migration Assistant to make even more changes to the files. In the end I concluded that there wasn’t much that the Oracle Migration Assistant was changing for me, so I even incorporated those fixes in my own Migration Assistant.
I’m just posting all automated changes I’m making in this blog. Perhaps they are useful to others in the same situation.
Forms, Menus and Object Libraries
- If an object is sub classed from another file, change the filename of this file to lowercase as we’re also moving to a case-sensitive platform (Linux)
- Change the filename of all attached libraries to lowercase
- When a canvas has a background color of “unspecified”, set it to white to keep the old look-and-feel
- When a window has a background color of “unspecified”, set it to white to keep the old look-and-feel
- Set the filename of the Menu property to lowercase
- Add date initialization code (plsql-date-format, builtin-date-format) to the pre-form triggers of older Forms (they originated in SQL*Forms 3.0)
- Set the filename of the icon of a MenuItem to lowercase and remove ICO extension if it is there
- Convert the PL/SQL code of a MenuItem (see below for PL/SQL conversion)
- Set the fill pattern of boilerplate items from transparent to none
- Set the edge fill pattern of boilerplate items from transparent to none
- Set the edge fill pattern of boilerplate items from solid to none
- Decrease the font-size of buttons by 1 to make the text fit in the new rounded Oracle look-and-feel buttons
- Set the filename of the icon of a button to lowercase and remove ICO extension if it is there
- When items have a background color of “unspecified”, set it to white to workaround (non-published) bug 4383847
- Some items had the Required property set to True and the Visible property set to False. Forms 6i did not enforce the required property for such an item, but Forms 10g does. As a dirty fix I clear the Canvas property of these items. That way, Forms 10g also doesn’t enforce the Required property. Do check all these changes carefully. We found some cases were the properties were changed at runtime and the change of the Migration Assistant was undesirable. I hard coded these exceptions in the Migration Assistant.
- Some items had Required=true, Visible=true and Enabled=false. Again, Forms10g enforces this required property whereas our old Forms environment didn’t. For these items I set the Required property to false. Again, check each change. I again made some hard coded exceptions to this rule.
- Forms 10g raises compilation warnings when some properties are set for subordinate (mirror) items. These properties are not uses for subordinate items, hence the warnings. So we cleared all MaximumLength, CopyValueFrom and InitialValue properties of subordinate items.
- Convert the PL/SQL code of all program units (see below for PL/SQL conversion)
- Convert the PL/SQL code of form, block and item level triggers (see below for PL/SQL conversion).
PL/SQL libraries
- Convert the PL/SQL code of all program units (see below for PL/SQL conversion)
- Set the filename of attached libraries to lowercase, because of our move to the case-sensitive Linux.
- Add two new custom build PL/SQL libraries to the core PL/SQL libraries of our application. That way the new custom build libraries are effectively attached to every form in our application. See below for the details of these libraries.
PL/SQL conversion
- Change the use of : PW to get_application_property(password)
- Change the use of BREAK to DEBUG.SUSPEND
- Change the use of CHANGE_ALERT_MESSAGE to Change_Alert_Message.Obsolete from our new custom build library (see below for details)
- Surround the first argument of open_form, call_form, new_form and replace_menu with lower() to handle the new case-sensitive Linux filesystem.
I created a new PL/SQL library to handle all sorts of obsolete calls. In stead of changing all the old PL/SQL code, I just left that code as it was and added some program units to a shared PL/SQL library that is attached to each and every form.
- Change_Alert_Message package. Has two procedures to handle the overloading of both an alert_id and alert_name as first argument.
- Disable_Item, Enable_Item: try to find menu item by the supplied name. If found, enable/disable it
- Exit_Menu, Menu_Help, Previous_Menu, Set_Input_Focus, Show_Menu: completely obsolete built-ins that have just been replace with a null statement.
- Menu_Show_Keys: Just call the built-in show_keys.
I hope this blog entry can be useful for others who are also migrating a Forms application. If your just starting, this might be a helpful pointer of things to consider.
You can download the source code at your own risk. It was my very first Java coding, so looking back at it I’m not too proud of the product. But it might get you started.
137 Comments
Trackback/Pingbacks:
-
OraTransplant » Conversion to webforms 10g completed
[...] We’ll be running the new Forms 10g environment and the old 6i (on Citrix) environment in parallel for two months. This gives our 400 external users some time to switch to Internet Explorer/Java/Acrobat. It also means we’ll have to support both environments for a while. This is why development is still on 6i and the files are converted to 10g during deployment to test/production environments. This means our conversion process has to be repeatable. That’s why I’ve created a java program based on the JDAPI to do this conversion. You can read more details about this program in a past blog entry. [...]
-
YouTube Comments Poster... Discover new methods of product promotion in social media for maximum earnings....
Sorry, the comment form is closed at this time.
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.


We’ve gone through a preliminary upgrade from Forms 6i to 10g (9.0.4) as you have. We’re on Solaris 2.8 and use Mozilla as our browser. I found your list after we performed our migration, but still found it useful.
The 3 main issues we encountered were;
1) identifying which Sun Java plug-in to use with a Mozilla/Solaris client. going with 1.4.2_06 for now…
2) On some of our application Forms the Items, Canvases and/or Buttons would come out black.
3) Mapping to Java fonts is a real pain!!
Could you give me more info on the Non-Published Bug 4383847. Is this why #2 is occuring with us?
Regarding #3, Java Font Mapping.
When mapping to a Java Font, is there a way to also set the Font Size for a particular mapping?
I only saw a Font Size for the default Font.
Thank-you again for posting your migration experience and hints.
Comment by Armando Cabrera — 7 July 2005 #
Armando,
Please note that Oracle certified Sun JPI v1.4.2 for several platforms with the release of Forms 9.0.4.2.0 (see http://www.oratransplant.nl/2005/06/30/forms-10g-certified-with-sun-jpi/ )
See http://www.oratransplant.nl/2005/07/08/background-of-textitems-black-or-pink/ for more information on our findings with the changing of background colors (bug 4383847).
We didn’t have to change anything with the font mappings, since all our forms only used the very basic fonts. I’m afraid I can’t help you there.
Comment by Wilfred — 8 July 2005 #
this document seems to be quite helpful.however would it be possbile for u to publish the document/code that u used to automate the transformation of forms in 10g.
i m leading a massive project of F6i > 10g migration over AIX based app servers. the solutions over the net are not useful given that our forms are pretty complex in design so we have opted for our own migration utility like urs.
would appreciate ur help hugely.
Comment by Salim — 13 February 2006 #
Salim,
I’ll contact you by email to exchange the code
Comment by Wilfred — 13 February 2006 #
I’m a developer for a college over here in Montreal, Canada and we’re currently migrating from an OpenVMS flatfile system (written mainly in COBOL) to Oracle Forms. Ideally, I’d rather move to Java because the front-end side of things that we use, a product called Powerhouse, is parsable and the code should be use to generate the required forms with little difficulty. Would it be possible to get a look at that code of yours? I’m planning on writing something but before I can convince anyone to use Java, I have to be able to show that what some of our developers are doing in forms can be done directly. Not only that, but it would offer a whole lot more flexibility. Thanks.
- Chris
Comment by Christopher — 20 February 2006 #
Please send the code to my address too. We will be doing a forms migration from 6i to 10g soon for a client.
Regards
Anand
Comment by Anand — 24 February 2006 #
I’ve send the code by email to Christopher and Anand
Comment by Wilfred — 24 February 2006 #
would you please send the code to my address too? i need to migrate from 6i to 10g. thanks in advance
til
Comment by til — 2 March 2006 #
The company I work for wants to hire consultants to do migration from forms6i (chars) to 10g. Since the forms are rather complicated I want to challenge them with an in house converter using JDAPI. For sure I’d like to have a look at your code to get me started… Thanks,
Charles
Comment by Charles — 2 March 2006 #
I’ve put up the Forms converter for download at http://www.oratransplant.nl/files/convforms.zip
It all started out as a very small (hacked) project and grew over time. It grew much larger than I anticipated. This also means it is poorly structured and much more a 3GL procedural program than a properly OO designed one.
It could really need some refactoring. On the other hand; it does get the job done.
There are some very specific hacks in there. For example some changes are not applied to Forms starting with the letter ‘B’, since that is a special category at our site. Also, some migrations are not done when a particular library is attached. Again, this is to single out a certain set of Forms.
It should be enough to get you going with your own Forms converter.
Comment by Wilfred — 3 March 2006 #
Hi Wilfred,
Thanks for posting the code for EVERYONE. I am sure this will be a big help to anyone who is thinking of doing the migration.
It will certainly be great starting point for others (including me).
Comment by Abhijeet — 27 April 2006 #
Hi!
I’m a Oracle developer for a company in Brasil.
would you please send the code to my address? i need to migrate from 6i to 10g. thanks in advance
Comment by carlos — 9 May 2006 #
Carlos,
Look two comments up and you’ll find the download link.
Comment by Wilfred — 9 May 2006 #
I was interested to hear you are using Citrix Metraframe. Of course, Oracle have always refused to support this configuration although I can’t think of any reason it shouldn’t work. We certainly have not had trouble with it. I wonder whether you are still going to use it with web deployed forms ? We have deployed our remote 10g R2 users via metaframe and it seems to perform slightly better than our local users with browsers on the client. Oracle will say you don’t need metaframe with webforms, but the users will be using it anyway for office applications, so why not use it ?
Comment by kevin clarke — 12 May 2006 #
One of the problems with using Citrix via the Internet (over VPN) we had was that it relies on so much software and techniques. A user has to have a VPN client, Citrix Client and firewall access to open a VPN tunnel from their desktop to our server over the internet.
With hundreds of remote users in hospitals throughout Europe, this isn’t very practical. Their sysadmins had a lot of work to do when someone moves to a new workstation.
With Webforms running over the internet, our remote users can now access the application from any workstation at their hospital and even at other locations (e.g. their home). With Organ transplantation you really need 24×7 access to our systems from as many locations as possible.
PS. Cutting out Citrix also had means a cost reduction
Comment by Wilfred — 13 May 2006 #
Wilfred, thanks for posting the code and for the OpenSource spirit!
We are also getting involved in a forms migration exersize and will be needing all the help we can get.
Comment by Stefan Mahs — 26 May 2006 #
i have problem to migrate from oracle forms 6i to 10g.
when i open the .fmb in 10g and try to compile them i got this error : Identifier Show_menu must be declared
thanks in advance
Comment by khouma — 6 June 2006 #
Hi khouma,
Show_menu was intended for use with the old full screen menus in SQL*Forms 3.0 before we had a grahpical user interface. This is one of the obsolete built-ins that have been dropped from Forms 10g.
You can read all about it in the migration guide.
We also had some occurances of the show_menu built in in our forms. As you might see from the source code of my migration utility, I attach a PLL library obsolete_webforms.pll to each and every Form. This library has procedures defined for these obsolete built-ins. For example, a procedure SHOW_MENU exists that does absolutely nothing.This assured I did not have to change any existing Forms. I could just leave the calls to SHOW_MENU and they would now be calls to this obsolete_webforms library.
Comment by Wilfred — 7 June 2006 #
hello Wilfred ,
i understand but i dont know what to do it
i replace in my code show_menu by get_application_property(password) or not.
can you tell me what to do please
Comment by khouma — 8 June 2006 #
show_menu is a built-in that no longer exists in Forms 10.1.2. You have two options; either you remove the calls to show_menu or your create a program unit of your own named show_menu that doesn’t do anything. We choice for the last option as this required the least code changes.
get_application_property(password) is the replacement for the obsolete :PW variable that was supported in the older versions and returned the password the user logged on with.
Comment by Wilfred — 8 June 2006 #
thanks a lot Wilfred for your help.i appreciated a lot.Now i know what to do. thanks again
Comment by khouma — 8 June 2006 #
I have managed to successfully convert our Forms 3.0 Application (char) to Forms 10g through a 100% automated process. In fact, our developers are still developing in Forms 3.0 today and we deploy to 4.5 (char), 6i (char) and 10g GUI from the same source.
I used the Oracle converter and mainly Perl scripts, massaging the XML. I also created a kind of definition file to allow developers to move fields around the GUI screen and change certain attributes. This file is XML based and has tags which do “move this boiler plate text 12 pixels to the right” type things. These are applied automatically during the conversion and ensures our GUI screen look good, after the auto conversion from character mode.
I presented a Paper on this at the Australia Oracle User Group Conference in 2005. Let me know if anyone wants more info and I’ll post my paper somewhere and also provide the code (although it is tailored for our own requirements at the moment, but it does convert our 650 Forms OK).
I also had to write my own rpt / rpf parser (SQL*Report) in python to allow our new release to run on Linux. The python code convert .rpt statments into PL/SQL statements and also formats the output.
Tim.
Comment by Tim Daniell — 12 June 2006 #
btw, here’s my paper (PowerPoint) as mentioned above: http://users.tpg.com.au/timbo_oz/Forms_3.0_to_10g_in_30_Seconds.pps
Tim.
Comment by Tim Daniell — 13 June 2006 #
hello,
i am in migrate from forms 6i to 10g and i have this warning error.i have a solution to resolve it but i am not sure. it would be very good if someone can help me.
FRM-30188: No initial value given, and other values are not allowed .
Comment by khouma — 13 June 2006 #
i have again another warning message and i am asking if the best solution is to remove the WHEN-VALIDATE-ITEM trigger in the subordinate item.thanks in advance for your help.
FRM-30438: Warning: WHEN-VALIDATE-ITEM trigger ignored for subordinate mirror item BLK_TTP0206.BASE_PRICE_FOREIGN.
Comment by khouma — 13 June 2006 #
Khouma,
I think the errors/warnings are quite self explanatory.
The FRM-30188 indicates you have an item with a limited set of allowed values (probably a list item) and no initial value set. This contradicts each other. If you have a limited set of allowed values you should also specify an initial value for the item which is in that list.
The FRM-30438 just warns you that the defined WHEN-VALIDATE-ITEM trigger will not fire for a subordinate item. Here’s the official explanation from the Help in Forms:
Comment by Wilfred — 14 June 2006 #
@Tim,
Very interesting presentation. We did something very simular where we needed a repeatable process of converting from 6i to 10g. We kept development at 6i while deploying both 6i and 10g in production.
We took another approach using a Java program and the JDAPI to open and change the Forms. But I guess it gives the same end result as you approach by which you convert to XML, then alter the XML and convert back to FMB.
Keep up the good work!
Comment by Wilfred — 14 June 2006 #
FRM-30457: Warning: Maximum Length ignored for character-datatype subordinate mirror item BLK_TTP1226.DSP_KEY_PROD_LINE_HD.
Is there any alternative method for this ?
How to solve this problem?
Comment by khouma — 15 June 2006 #
The FRN-30457 warning is just telling you that the MaximumLength restriction is not enforced on a subordinate mirror item. That’s pretty logical since the user cannot enter data directly in the mirror item. If you want to enforce a maximum length restriction you should set the property on the master item, not the mirror item.
Comment by Wilfred — 15 June 2006 #
Hello Wilfred,
thanks a lot for your help.
I hope all i have to do here is to delete the WHEN-VALIDATE-ITEM trigger in the mirror item because the user have not to enter data directly in the mirror item. So no need to have an trigger in this item.
Comment by khouma — 16 June 2006 #
i got this error when i comiple my forms in unix. Before moved it in unix i compiled the forms in windows and i had no error. If you have an idea, it would be so good to have some help from you . thank you for your cooperation.
Khouma
Comment by khouma — 20 June 2006 #
Khouma,
I’m in Washington visiting ODTUG so I don’t have access to my workstation to try things out. Could it be that these are subclassed items from some other form and the filename of the form to subclass from is case sensitive on Linux whilst it is not on Windows.
Have a look at the items to see if they are subclassed and if the filename mentioned for the reference form is correct.
Comment by Wilfred — 20 June 2006 #
Have you ever tried to attach a library with a forced-uppercase filename?
I have adapted your ConvForms code to include the following in the process for Attached Libraries:
AttachedLibrary newLib = new AttachedLibrary((FormModule)attachedLibrary.getOwner(), libName.toUpperCase());
But that produces an error:
Exception in thread main
java.lang.NullPointerException
at oracle.forms.jdapi.BaseAPI._jni_attach_lib(Native Method)
at oracle.forms.jdapi.AttachedLibrary.(Unknown Source)
at nl.eurotransplant.convforms.client.convForms.process(convForms.java:1682)
at nl.eurotransplant.convforms.client.convForms.process(convForms.java:2543)
at nl.eurotransplant.convforms.client.convForms.loopOwnedObjects(convForms.java:2679)
at nl.eurotransplant.convforms.client.convForms.loopOwnedObjects(convForms.java:2689)
at nl.eurotransplant.convforms.client.convForms.(convForms.java:583)
at nl.eurotransplant.convforms.client.convForms.main(convForms.java:2714)
Replacing the toUpperCase with a toLowerCase fixes it, but I would really like to have everything referenced in uppercase.
Any suggestions?
Comment by Marc — 10 July 2006 #
Which OS are you running? If it is Linux (or any other case sensitive filesystem) did you make sure the PLL files actually exist in uppercase filenames on the filesystem?
Comment by Wilfred — 10 July 2006 #
Am running in Windows 2k, and I have made sure the libraries are in uppercase.
I have tried to substitute it with plain text, so the code reads:
AttachedLibrary newLib = new AttachedLibrary((FormModule)attachedLibrary.getOwner(), "DOC");
But that doesn’t work either.
I then tried to load the PLL module to see if wasn’t finding it for some reason, but the code:
JdapiModule modLib = JdapiModule.openModule("DOC.PLL");
worked fine.
Seems to only have a problem trying to attach the PLL to the form if it is uppercase - if I then use that
modLibvariable in the attachment code:AttachedLibrary newLib = new AttachedLibrary((FormModule)attachedLibrary.getOwner(), modLib.getName());
it also fails with the same error as above.
Have you successfully attached a PLL with an uppercase filename? Or do you think it is related to my environment setup?
Comment by Marc — 11 July 2006 #
I found a work-around for the problem I encountered.
Instead of detaching then re-attaching the required PLL, I am now simply setting the LibraryLocation property with an uppercase setting:
attachedLibrary.setStringProperty(JdapiTypes.LIBRARY_LOCATION_PTID,attachedLibrary.getName().toUpperCase());
Cheers,
Marc.
Comment by Marc — 11 July 2006 #
If that works, I wouldn’t bother finding out why my initial solution doesn’t.
Good luck with the rest of your upgrade.
Comment by Wilfred — 11 July 2006 #
Have you noticed a problem where multi line prompts or multi line text on the canvas has extra spacing between the wording during runtime. I have a long prompt that I need to spread over three lines and I do this by placing a return after each word. On the canvas within forms builder everything looks fine, as it does in forms 5.0, however on executing this form on windows there is extra spacing between each line pushing the top line out of view.
Comment by Leighton — 11 July 2006 #
The only thing I can think of is that you’re using a font that is not supported by the Java applet. The font is than mapped to something that is supported and resembles the requested font. This can lead to alignment issues.
Can you check if that’s the case?
Comment by Wilfred — 11 July 2006 #
Sorry if I sound a bit off topic but if you are looking at converting oracle forms to pure Java, jsps, swing or ejb 3.0 instead of PL/SQL etc. Are there any thoughts, tools, scripts you could suggest along this line?
Comment by Sib — 26 July 2006 #
Yes Sib, have a look at http://www.in2j.com.
The in2j tool supports a migration from Forms to pure Java based on Swing (it will also migrate your server side PL/SQL objects into Java). Hope this helps.
Comment by EB — 27 July 2006 #
Mr. Wilfred,
Could U kindly email me your conversion code/exe?
I sincerely appreciate your help.
Thank U.
408-472-3102
Comment by Subu Mysore — 6 September 2006 #
Subu,
The link to the source code was a number of comments up. I’ve now also added it to the original article to get people started.
Comment by Wilfred — 15 September 2006 #
Hi I was new to this migration process and just want to know exactly how to use this “Migration Assistant” of yours? I mean how to run this one…thanks
Comment by jen — 19 September 2006 #
Set your CLASSPATH to include the .jar file from the converter and the frmjdapi.jar from Oracle.
Then just run
java nl.eurotransplant.convforms.client.convForms
and follow the instructions.
Comment by Wilfred — 21 September 2006 #
I cant see the .jar file from the converter. what is its filename?
Comment by jen — 26 September 2006 #
The ZIP file contains a JDeveloper project, which you can open and build from JDeveloper. If that’s something you’ve never done before you should really take a look at JDeveloper, before you’re trying to create/alter your own Forms converter
Comment by Wilfred — 26 September 2006 #
Does that mean if we were using the Oracle Developer Suite 10g (10.1.2.0.2) version and not the Oracle JDeveloper 10g (10.1.2.1) version, I cant use your own migration assistant? Im sorry if this sounded so stupid, as ive said i am new to this migration process, never done this before. Thanks.
Comment by jen — 27 September 2006 #
hello,
We are migrating from forms 6i to 10g and we need to reference the visual attributes
of the modules to another module by their properties;
but our problem is that we want to do this by programming, without opening then module,
and we don’t know if this is possible,
We want to know which is the solution to resolve it.
it would be very good if someone can help us.
thankyou.
Comment by Inma — 28 September 2006 #
Yes Inma, it looks like this is perfect job for the JDAPI. The JDAPI gives you a Java API to all the nodes and properties you normally see in the Forms Builder.
It’s the same API that was implemented in C in the older Forms versions. You can write your own Java program to do this. You could start off with customizing my converter, or you can write your own. Any way, you can start with the JDAPI documentation on OTN.
Comment by Wilfred — 6 October 2006 #
Hi Jen,
Yes, you need Oracle JDeveloper to compile my project. I’m also 100% sure you need to modify it to your own situation as some of the conversions I’m doing are very specific to our situation.
But the Java I’m using is very low tech, so I guess you could use any JDeveloper version to compile and run it. Probably also the JDev version that came with your developer suite.
Comment by Wilfred — 6 October 2006 #
hello guys,
I have problem with my migration from 6i to 10g.
I have required field in 10g and i change them to false.and now i can query and save but when i load my form the first time and i clik in the icon ENTER QUERY i got the forms alert “Do you want to save the change you have made ?”.
If anyone know how to solve this probleme please let me know and thanks in advance for your help.
Comment by khouma — 11 October 2006 #
Hi,
Is it possible to convert fmx file to fmb file?
Or is there any other way we can achieve this?
thanks!
Comment by amol — 12 October 2006 #
Khouma,
You’re probably changing some field in the record in a startup trigger (e.g. When-New-Forms-Instance or When-Create-Record). By assigning a value to the item, your also marking it as changed. This is why Forms asks you if you want to save the changes when you try to discard the record.
You can prevent this, by assigning a default value with the DefaultValue property and not by using PL/SQL. If you do need to do it from PL/SQL, be sure to reset the record status to its original. Search the Forms online help for more info on the record status and how to set it.
Comment by Wilfred — 12 October 2006 #
Amol,
As far as I know, there is no way to convert/reverse engineer a FMX back to a FMB. You might ask around on the OTN Forums
Comment by Wilfred — 12 October 2006 #
hi wilfred i dont saw the DEFAULTVALUE proerty .
it is the initial value property ?
thanks a lot for your help.
Comment by khouma — 12 October 2006 #
Hello Wilfred,
i have required field in my 10g FORM and when i compile i got this message FRM-30188: No initial value given, and other values are not allowed (item BlOC_01.CODE_LIST_01).
i Dont want to give initial value and i am asking if any other method exist to correct this. I just want to avoid this warning message.
Thanks for your help.
Comment by khouma — 12 October 2006 #
Sorry, I didn’t have access to Oracle Forms when I was posting my original reply. I just checked and it is InitialValue in stead of DefaultValue.
The FRM-30188 is quite self explanatory. You specified a limited list of initial values. Your Initial Value has to be an allowed value. If you do not specify the InitialValue property, the initial value will be NULL and that’s probably not in your AllowedValues.
I guess your implementing a ListItem. If so, you could also have a look at the MappingOfOtherValues property. This specifies which value to display if the current value of the item is not in the list of allowed values.
You could also include a “Select One” item in the list as first item and set that one as InitialValue. Then implement a check to verify the “Select One” value is not selected when you save the record.
Comment by Wilfred — 13 October 2006 #
Thanks Wilfred !
I have one more question for you.
We are doing the migration of application from forms 4.5 to 6i to 10G.The first phase is to convert fmbs from 4.5 to 6i.
So i am trying to open 4.5 fmb and connecting to database using jdapi.
But not able to connect to database.Got the follwoing error:
Exception in thread “main” oracle.forms.jdapi.JdapiStatusException: _jni_connect
failed
at oracle.forms.jdapi.BaseAPI._jni_connect(Native Method)
at oracle.forms.jdapi.Jdapi.connectToDatabase(Unknown Source)
at Corefmb.main(Corefmb.java:10)
Could you please help me to sove this?
Thnaks!
Amol
Comment by amol — 16 October 2006 #
It looks like the Java program is unable to resolve your TNS alias. That’s specified in your tnsnames.ora. Be sure to set ORACLE_HOME to the appropriate value before starting your Java program or otherwise set the value of TNS_ADMIN to the directory where your tnsnames.ora is.
Comment by Wilfred — 18 October 2006 #
Wilfred,
It seems that the problem with oracle database version.Here i am trying to connect to oracle 8.
When connecting with 10g,it’s working fine.
tnsora entries are there in place.
Is frmjdapi compatible with oracle8 databse?
Comment by amol — 19 October 2006 #
Hello Wilfred,
Hope you feel good.
I have a probleme about my migration from 6i to 10g. The fonts in forms 6i is different in forms 10g. I have the correct fonts in forms 6i but not in 10g. It would appreciate if you can help me. Thank you in advance.
Comment by khouma — 25 October 2006 #
Hello,
Could you send me he code please.
Comment by Torkia — 18 November 2006 #
Torkia,
Please read the post before you comment. There is a download link in the article itself and the same link is mentioned twice in the comments
Comment by Wilfred — 20 November 2006 #
Wilfred,
Sorry I didn’t see it, thanks for your help!!!
Comment by Torkia — 20 November 2006 #
Hi All,
I am working on a project which involves forms 6i. Currently our database is oracle 8i, which we are upgrading to Oracle 10g. Our forms which are compiled connecting to oracle 8i are working fine even with oracle 10g, but when we recompile them connecting to oracle 10g, they are not. When compiled with oracle 10g, all forms are losing their fonts, colors, back ground. All these setting are in a plsql library and are dynamic in our application.
How can I solve this problem?
Please help me out.
Thanks in Advance,
Jagadeesh.
Comment by Jagadeesh — 28 November 2006 #
Dear Tim Daniell,
Was really looking forward to looking at the code snippet from you since that is quite close to the task that we have taken up.
Many Thanks,
Agnyeya @Planet Earth
Comment by Agnyeya — 7 December 2006 #
Hi Wilfred,
We are doing migration from Forms6i to Forms10G.
But we are facing one problem.
We are subclassing some objects from template.fmb to all the forms.
But when we open any form in 10G Form Builder,all the subclassed object refernces remain missing.
I have put all the objects,PLLs in the FORMS_PATH.
But still the problem is there.
One more thing…For Forms6i conversion we have used CITRIX.But we are doing 10G migration locally.
For Form6i…PLLs and template.fmb are stored in the database.
So do we need to store this objects in the 10G database? Is it possible?
Please advise!
Thanks!
Amol
Comment by amol — 12 January 2007 #
Oracle Forms 10g does no longer support the storage of “files” in the database. You will have to take your old version of Oracle Forms and open the objects from the database, then save them to the file system and change the references for subclasses to point to the file on the file system. Then you can convert the forms to 10g.
Comment by wilfred — 13 January 2007 #
Hi Wilfred,
I hope you doing fine and good .
We have Banking application developed by Developer 6i, we are now planning to migrate it be web enabled application , we are palnning to cuaptur the design using Oracle10g desinger ,and then to generate the application to Oracle10g forms or Jdeveloper .
Please could you advise us, and if you have any links ,or books can helps on this please let us know it.
Thanks for your great help
Suliman
Comment by Suliman — 17 January 2007 #
Why would you go through all the trouble of reverse engineering it to Designer and then generate it back to Forms 10g.
What’s wrong with just converting/upgrading your 6i FMB files to version 10g. I’m not sure that Designer will 100% capture the design of the Form and re-generate it. If not, you might be introducing more problems than you are solving. And even if it is successful it will probably retain all of your trigger PL/SQL code and just put it back in the 10g Form. You then still have the upgrade issues you would have when directly upgrading the FMB from 6i to 10g. As you can see in my blog there are a number of issues with deprecated PL/SQL builtins, deprecated properties and other issues. It’s very unlikely that Designer will handle these issues for you.
Comment by wilfred — 19 January 2007 #
We have a application on Forms/reports 5.0 and would like to lingrate to form 10g . What is the the best way to migrate this application without much of the manual coding.
Are there any tools which can do this ?
Comment by Manoj — 24 January 2007 #
We opted for the solution I described in this blog article. It just opens the Form with the newest Forms version and uses the JDAPI to make some changes to the forms and PL/SQL code that are required for the upgrade. Most of these changes either came from deprecated built-ins or from issues we encountered during testing of the 10g upgraded application.
There are also commercial tools that can do the upgrade for you, but as far as I can see they are similar to our solution. However, they are likely to cover a whole lot more possible issues out-of-the-box, whereas my solution was specific to our organization and application.
Comment by wilfred — 24 January 2007 #
Hi Wilfred,
We are doing Forms Migartion from 6i to 10G.
As 6i compiled forms have subclassed object references from the database and 10GForms doesn’t support storing forms objects in the database,
we are removing those references and reattaching them trough JDAPI programming.
But when we open the 6i compiled form and subclass the objects through JDAPI,all the text items on the forms get converted into User Areas.
we need to change them back to text items,then it looks fine.
what we can do to avoid this?
Thanks!
Amol
Comment by amol — 27 January 2007 #
Doesn’t sound familiar to me. We only had very few subclassed items from the database and I changed them to file based subclassing in 6i before migrating to 10g. I don’t think 6i has a JDAPI to automate this, so you have to do this by hand or use the C API.
You could also ask around on the OTN Forum, search Metalink or ask Oracle Support.
Comment by wilfred — 28 January 2007 #
Hello! I need that lanze trigger when-validate-item in an item not required, since in that validation calculates the value to me for other fields. When the item not required changes by he himself value, it does not send validation to me and, therefore, the dependent fields are not recalculan of this. What changes I have to do in 10g so that one behaves as one behaved in 6?
Comment by sara — 2 February 2007 #
Sara, I’m sorry but I cannot understand your question. It seems you used some sort of auto-translator on the web to translate a question from your own language to English. It resulted in something I cannot understand.
Perhaps you can have someone translate the question for you?
Comment by wilfred — 2 February 2007 #
Hi Wilfred,
i am migrating 6i forms to 10G using JDAPI.
when any form has the checkbox or radio buttons objects of data type NUMBER and it’s initial valus are set to either 0 or 1.Then the initial value gets cleared off after migration.
This problem is not happened when the data type is CHAR.
So do i need to explicitly set the initial value
or there is any solution to this problem?
Please advise!
Thanks!
Amol
Comment by amol — 2 February 2007 #
Sorry Amol, we didn’t have this problem. We also have numerous radio buttons and checkboxes but never encountered this issue. Perhaps you’re best of if you contact Oracle Support and have them investigate.
Comment by wilfred — 3 February 2007 #
Hello! I need to send trigger when-validate-item from an item whose property required is to false (thus he is defin gone in the data base). In the validation of item “B” other data calculate (for example value of item “C” and “D”); that is to say, whenever item “B” changes of value, the new value for “C” and “D” calculates. But it is that if field “B” contains value 100 and I change it to 100(P.E.), before does not send the validation to me (in developer 10g) and (in 6g) it was sent. I have forced the validation, adding a trigger key-next-item and doing “: B”: = ‘: B’;, but I would like to know if there is some better solution (without having to put the required property of item “B” to true)
Greetings, Sara
Comment by Sara — 5 February 2007 #
Sara,
Your English is very very hard to understand. It looks like you have a when-validate-item trigger on item B that does not fire when you change the value “100″ to “100(P.E.)”.
Have you checked what the form property “Validation Unit” is set to? This states at which moment/level you want to do the validation triggers (item, record, block or form).
You seem to indicate that the setting Required item property makes a difference. I don’t see how changing “100″ to “100(P.E.)” would be treated any differently for required or optional items. But you could have a look at the form property “Defer Required Enforcement” which can instruct Forms to postpone the required item check until record validation.
Comment by wilfred — 5 February 2007 #
Hi
We are in the process of upgrading from Forms 6i to Forms 10g (10.1.2.0.2). I was looking at utilizing JDAPI to do most of the conversion. We are moving from a Windows (Citrix) Environment to a Linux (App Server) environment.
What I need help with is in deleting a specific Object Group and subclassing another Object Group from a Reference Form. Do you have any code snippet for subclassing a new Object Group.
thanks in advance.
Comment by Anup Vijayaraghavan — 22 February 2007 #
Anup,
Have a look at the JDAPI documentation at http://www.oratransplant.nl/1012jdapiDoc/
I haven’t tested this myself, but my guest guess is you can create a subclassed ObjectGroup by calling the construction of an ObjectGroup with three parameters: the FormsModule that needs to house the new ObjectGroup, a String with the name of the object group and an ObjectGroup that will be the “superclass” of the new object group. So you need to open the reference form first, get a handle to the object group and then create a new object group in the actual form.
Otherwise you probably have to use the createSubclassedChild method of the “superclass” object group to create a subclass in another Form.
Comment by wilfred — 24 February 2007 #
Thanks Wilfred..
I got the stuff working. It was pretty easy in the end… Here is the code snippet
//open the form to be updated
FormModule updForm=FormModule.open(”updform.fmb”);
//open reference form
FormModule refForm=FormModule.open(”refform.fmb”);
// search for the object group to be referenced
ObjectGroup objRefer = ObjectGroup.find(refForm,”OG_REFER”);
//subclass the objectgroup
ObjectGroup og = new ObjectGroup(updForm, objRefer.getName(), (ObjectGroup) objRefer);
//save the updated form
updForm.save(updForm.getAbsolutePath());
//…
updForm.destroy();
refForm.destroy();
Comment by Anup — 25 February 2007 #
how to migrate from forms 4.5 to 6i . what are the tool used . can u tell me in steps wise converting from forms 4.5 to 6i
thanks
Leela
Comment by leelaprasad — 2 April 2007 #
i have problem to migrate from oracle forms 5 to 10g.
i have a large menu more than 20 entries. When i run my application the menu displays only the fisrt 10 entries, plus a horizontally scrollbar on the rigth corner, to display the rest entries. How i do to display menu entries in two lines?
thanks in advance
Comment by Ariel — 5 April 2007 #
we are also migrating from 6i to 10g please send me code and guidelines
Thanks and regards,
Arvind shinde
Comment by Arvind shinde — 11 April 2007 #
Hello All,
I am migrating from forms 6i to 10g, and when i compiled the form it’s giving me the following error:
PDE-PSD001 Could not resolved reference to While loading procedure body.
Can you please help me to find out what is the problem.
Thanks in advance.
Comment by Happy World — 13 April 2007 #
Hello !
I will start a process in order to migrate our currently Forms/Reports 4.5 application to Oracle 10g (Forms 10g). I need to know in order to begin this process.
For example: What Oracle Application Server my customers needs to buy ? and about licenses that they need to have ? And Related Information.
Can You HELP me.
Tank you
Comment by Aniruddha — 24 April 2007 #
I am java developer.
I want connect java to forms 6i(fmx file).
Please send me jar file for this connectivity.
And also how to download jar file .
And sample code that suggest me that how to connect to java to fmx file.
Comment by pRAFUL naGPURE — 4 May 2007 #
Hi Praful,
I have no idea what you mean by connecting Java to a FMX file, let alone I have a JAR file to do that.
Comment by wilfred — 4 May 2007 #
Aniruddha,
You can buy the Forms/Reports standalone product which is a trimmed down application server. You could also buy the Application Server Enterprise Edition which includes Forms/Reports. For more detailed questions contact your Oracle account manager. I’m no licensing specialist.
Comment by wilfred — 4 May 2007 #
When I run the convforms program I get the following error?
$JAVA_HOME/bin/java nl.eurotransplant.convforms.client.convForms
Exception in thread “main” oracle.forms.jdapi.JdapiStatusException: _jni_initialize: Failed to create new forms context
at oracle.forms.jdapi.BaseAPI._jni_initialize(Native Method)
at oracle.forms.jdapi.Jdapi.initialize(Unknown Source)
at oracle.forms.jdapi.Jdapi.getContextPointer(Unknown Source)
at oracle.forms.jdapi.Jdapi.connectToDatabase(Unknown Source)
at nl.eurotransplant.convforms.client.convForms.(convForms.java:342)
at nl.eurotransplant.convforms.client.convForms.main(convForms.java:2148)
When I looked in the convforms.zip file I found convforms/Client/src/nl/eurotransplant/convforms/client/convForms.java, which looks like a straight Java program rather then a Jdeveloper program. So I decided to compile and execute it. Is that what’s intended or will work?
I found frmjdapi.jar in a lib32 directory in my Oracle Home which makes me think it might be for a 32 bit machine and I am runinng on a 64 bit machine. Do you think that has something to do with it?
Comment by Dan Hartman — 8 May 2007 #
Dan,
It looks like JDAPI is unable to connect to the database. Please check that your ORACLE_HOME\bin is in the PATH setting and be sure to set the ORACLE_HOME environment variable itself.
What’s the difference between a Java and JDeveloper program? The ZIP file contains a full JDeveloper workspace, but this workspace only contains a single Java class (the one you found). It’s up to you to use JDeveloper to compile/run or use the java compiler from the command line. Both should work.
I’ve only tested in on 32-bit Windows. In my installation the frmjdapi.jar is in ORACLE_HOME/forms/server and I would be surprised if it is in a different location on a 64-bit install.
If you’re on Unix/Linux you might have to look at the LD_LIBRARY_PATH
Comment by wilfred — 8 May 2007 #
In response to Dan Hartman’s error.
I had this problem when the DISPLAY environment is not set properly.
Set the DISPLAY environment variable to a valid value (You might need a window manager running).
Even frmcmp the forms compile utility needs a valid DISPLAY.
Anup
Comment by Anup — 8 May 2007 #
Ok, We got by the:
Exception in thread “main” oracle.forms.jdapi.JdapiStatusException: _jni_initialize: Failed to create new forms context
We found our ORACLE_HOME was not set.
Now it looks like I am having problems with attach libraries (pll). I got:
FormModule GQ19PART: Adding parameter listname$$internal$$ AttachedLibrary GQ19LIBR: Re-attaching library with lowercase name (gq19libr) Exception in thread “main” oracle.forms.jdapi.JdapiStatusException: _jni_attach_lib failed
at oracle.forms.jdapi.BaseAPI._jni_attach_lib(Native Method)
at oracle.forms.jdapi.AttachedLibrary.(Unknown Source)
at nl.eurotransplant.convforms.client.convForms.process(convForms.java:1364)
at nl.eurotransplant.convforms.client.convForms.process(convForms.java:2052)
at nl.eurotransplant.convforms.client.convForms.loopOwnedObjects(convForms.java:2128)
at nl.eurotransplant.convforms.client.convForms.loopOwnedObjects(convForms.java:2138)
at nl.eurotransplant.convforms.client.convForms.(convForms.java:525)
at nl.eurotransplant.convforms.client.convForms.main(convForms.java:2148)
gq19libr is a pll in our library. It is actually GQ19LIBR.pll. It looks like you built it to make all attached libraries lower case. Here they have the module names in upper case, so I removed the toLowerCase() in statement 1364.
new AttachedLibrary((FormModule)attachedLibrary.getOwner(), libName.toLowerCase());
Now I am getting:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xFF2B0DB0 Function=strlen+0×50
Library=/lib/libc.so.1
Current Java thread:
at oracle.forms.jdapi.BaseAPI._jni_attach_lib(Native Method)
at oracle.forms.jdapi.AttachedLibrary.(Unknown Source)
at nl.eurotransplant.convforms.client.convForms.process(convForms.java:1364)
at nl.eurotransplant.convforms.client.convForms.process(convForms.java:2052)
at nl.eurotransplant.convforms.client.convForms.loopOwnedObjects(convForms.java:2128)
at nl.eurotransplant.convforms.client.convForms.loopOwnedObjects(convForms.java:2138)
at nl.eurotransplant.convforms.client.convForms.(convForms.java:525)
at nl.eurotransplant.convforms.client.convForms.main(convForms.java:2148)
Sorry, I am new working with Java. Can you be any help?
Also, I assume the attached library modules need to be in the same directory as the fmb. Is that correct?
Comment by Dan Hartman — 8 May 2007 #
Anup,
Does this program (conForms) use the terminal display?
I looks to me like it was working on opening a attached library.
Comment by Dan Hartman — 8 May 2007 #
Hi Dan
I am not using the convForms on its own but have my own JDAPI programs to do what we need. Everything works fine at our end.
But if we unset DISPLAY, I get exactly the same error that you were getting originally. Looks like Oracle’s JDAPI utilities need a proper DISPLAY to work.
I do this before calling the java program
export ORAENV_ASK=NO
export ORACLE_SID=10gds #replace this with your
#Developer Suite SID
#in /etc/oratab
. oraenv
export ORAENV_ASK=YES
export PATH=$ORACLE_HOME/jdk/bin:$PATH
export CLASSPATH=$ORACLE_HOME/forms/java/frmjdapi.jar:/home/oracle/jdapi:$CLASSPATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jlib:$ORACLE_HOME/jdk/jre/lib/i386/server:$ORACLE_HOME/jdk/jre/lib/i386/native_threads:$ORACLE_HOME/jdk/jre/lib/i386:$LD_LIBRARY_PATH
…
set the DISPLAY
export DISPLAY=localhost:49.0
java
Anup
Comment by Anup — 8 May 2007 #
Dan,
You probably need to take the convForms source code and adjust it to your own needs. There are some conversions in there that are very specific to our situation. Changes are they do not apply to you and you probably want to add other conversions. You really need some basic Java skills to do this.
You’re right that convForms is trying to re-attach all PLL libraries with there lowercase filename. If you’re not migrating from a case-insensitive platform (like Windows) to a case-sensitive platform (like Linux), then you can safely remove the entire step, or supply “lowersuper=no lowerlib=no lowermenu=no lowermenuicons=no lowerbuttonicons=no” as command line arguments.
Run convForms without any parameters or just with userid=user/ps@db to see a list of valid parameters (or inspect the source code)
Comment by wilfred — 9 May 2007 #
Thanks I got the convert to run. I will inspect the results today.
Thanks Anup and Wilfred.
Comment by Dan Hartman — 9 May 2007 #
I’m totally new to Forms. I’ve been assigned a task to upgrade our Forms6i application to Forms10g. Am using your convforms to convert the code. Please can you send me your obsolete_webforms.pll so that i can see in what way you have got around the obsolete items. The documentation from Oracle as to what is Obsolete and what is not seems rather inadequate for me to read and get this information.
Do you have a list of the obsolete items and a possible way to get around them.
Thanks in advance for any help you can provide.
Comment by Arif — 25 June 2007 #
The code of the program units is below. Be sure to create each procedure, function, package spec and package body as individual program units.
package Change_Alert_Message is procedure Obsolete ( p_alert_name in varchar2 , p_text in varchar2 ); procedure Obsolete ( p_alert_id in alert , p_text in varchar2 ); end Change_Alert_Message; package body Change_Alert_Message is /*********************************************************\ Package with two overloaded procedures to replace the obsolete built-in CHANGE_ALERT_MESSAGE. The procedures have to be placed in a package to be able to use the overloading mechanism for the name or ID of an alert \*********************************************************/ procedure Obsolete ( p_alert_name in varchar2 , p_text in varchar2 ) is begin Obsolete(find_alert(p_alert_name), p_text); end Obsolete; procedure Obsolete ( p_alert_id in alert , p_text in varchar2 ) is begin set_alert_property(p_alert_id, alert_message_text, p_text); end Obsolete; end Change_Alert_Message; procedure disable_item ( p_menuName in varchar2 , p_menuItemName in varchar2 ) is v_menuItem menuitem; begin v_menuItem := find_menu_item(p_menuName||'.'|| p_menuItemName); if (not id_null(v_menuItem)) and (get_menu_item_property(v_menuItem,visible) = 'TRUE') then set_menu_item_property(v_menuItem, enabled, property_false); end if; end; procedure enable_item ( p_menuName in varchar2 , p_menuItemName in varchar2 ) is v_menuItem menuitem; begin v_menuItem := find_menu_item(p_menuName||'.'|| p_menuItemName); if (not id_null(v_menuItem)) and (get_menu_item_property(v_menuItem,visible) = 'TRUE') then set_menu_item_property(v_menuItem, enabled, property_true); end if; end; procedure exit_menu is begin -- do nothing: replaces obsolete built-in from Forms 6i null; end; procedure menu_help is begin -- do nothing: replaces obsolete built-in from Forms 6i null; end; procedure Menu_Show_Keys is begin -- just call the built-in show_keys. show_keys; end; procedure previous_menu is begin -- do nothing: replaces obsolete built-in from Forms 6i null; end; procedure set_input_focus (p_dummy in varchar2) is begin -- do nothing: replaces obsolete built-in from Forms 6i null; end; procedure show_menu is begin -- do nothing: replaces obsolete built-in from Forms 6i null; end;Comment by wilfred — 25 June 2007 #
HI! I am given a daunting task of converting Forms 6i to 10g. They want to use internal resource to complete.
I read about Oracle Migration Assistant. Can you let me know if we just use this and convert will it be safe ? How many changes do we have to go in and make manually ?
Any advise on the approach is greatly appreciated.
Regards
Ani
Comment by Anil — 5 July 2007 #
Anil,
It’s up to you if the Oracle Migration Assistant that comes with Forms 10g is enough for you. Read the above post to see the things we needed to change to our Forms.
If I’m correct only the changing op :pw and break are also handled by the Migration Assistant. But there are other things the Migration Assistant handles which is not handled by my converter since these things where not encountered in our Forms. Read the documentation to see what the Migration Assistant handles.
It’s up to you to decide what changes from my list you also want and if you want to add others. It’s a matter of getting your Forms 10gR2 to compile and then test them. See what you run into and add this to the upgrade process and repeat the cycle.
Comment by wilfred — 6 July 2007 #
Hello, i’m using the JDAPI to list the objects of my .fmb file. I can see all the objects except the attached libraries. When i open the .fmb in FormsBuilder i can see the attached library.
Has someone an idea of what i do wrong?
Thanks
Comment by John Peters — 11 July 2007 #
John,
Be sure that the JDAPI program is able to find your PLL files, otherwise the attachments might be removed as soon as you open the Form. Set the FORMS_PATH environment variable in the DOS box before starting the JDApi program. The FORMS_PATH variable should include the directory where the PLL’s are.
I’m not sure if the JDAPI program will pick up the normal settings in your Windows registry. It could be that you always have to set them as environment variables.
Comment by wilfred — 11 July 2007 #
Thanks Wilfred, now it works!!
Comment by John Peters — 12 July 2007 #
Hello!!!
I am in front of a problem in which I did not find solutions, I hope to be able to find there here.
I have make the migration of forms 5 forms verses 10G but it is not really made a success since I cannot call report, instruction Run_Product_Object (which replaced Run_Product do not work
So what can I do to resolve this big Problème
thinks in advance
Comment by tusna — 4 August 2007 #
Hello!!!
I am in front of a problem in which I did not find solutions, I hope to be able to find there here.
I have make the migration of forms 5 forms verses 10G but it is not really made a success since I cannot call report, instruction Run_Product_Object (which replaced Run_Product do not walk(work) So what to do to resolve this big probleme
Thanks in advance
Comment by tusna — 4 August 2007 #
Hello Tusna
The client server mode of invoking reports using RUN_PRODUCT is not available in Forms 10g. To invoke a report in forms 10g, you need to send the request to run the report to a reports server.
This is what you need to do to invoke a report from a form in 10g.
Create a Report Object in the form (e.g. genericreport. This is the name of the report object expected by the program unit below)
The following procedure accepts a report name and a parameter list and will run the report. The parameter list is already populated by the report parameters including DESTYPE and DESNAME.
PROCEDURE call_report10g(
p_report_name IN VARCHAR2
,p_paramlist_name IN VARCHAR2)
IS
l_report_id REPORT_OBJECT;
l_report_return VARCHAR2(100);
l_report_status VARCHAR2(20);
– these need to be set to your site’s values
l_reports_servlet VARCHAR2(2000)
:= ‘http://:port>/reports/rwservlet’;
l_reports_server VARCHAR2(2000)
:= ”;
–
l_destype VARCHAR2(50);
l_desname VARCHAR2(100);
l_pl_id ParamList;
l_type NUMBER;
l_default_printer VARCHAR2(100);
BEGIN
l_pl_id := get_parameter_list(p_paramlist_name);
IF id_null(l_pl_Id) THEN
message(’ERROR - No parameters passed to report’);
RAISE Form_Trigger_Failure;
END IF;
l_report_id := find_report_object(’genericreport’);
set_report_object_property(l_report_id, REPORT_COMM_MODE,SYNCHRONOUS);
set_report_object_property(l_report_id, REPORT_FILENAME, p_report_name);
set_report_object_property(l_report_id,REPORT_SERVER, l_reports_server);
get_parameter_attr(l_pl_id, ‘DESTYPE’, l_type, l_destype);
–
— If the destype is printer, the form should
— subclass the webutil object group.
–
IF l_destype = ‘PRINTER’
THEN
set_report_object_property(l_report_id,REPORT_DESTYPE, PRINTER);
–this is the code to get the users default
–printer at our site. You would need to change
–it. Also webutil provided by Oracle needs to be
–used for the
–client_win_api_environment.read_registry
–function
l_desname:= client_win_api_environment.read_registry(’HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows’,'Device’,true);
l_default_printer := substr(replace(l_desname,’\\wlgprint\’),1,instr(replace(l_desname,’\\wlgprint\’),’,winspool’) -1);
set_report_object_property(l_report_id,REPORT_DESNAME,l_default_printer);
ELSIF l_destype = ‘FILE’
THEN
set_report_object_property(l_report_id,REPORT_DESTYPE, FILE);
get_parameter_attr(l_pl_id,’DESNAME’,l_type,l_desname);
set_report_object_property(l_report_id,REPORT_DESNAME,l_desname );
ELSE
set_report_object_property(l_report_id,REPORT_DESTYPE, CACHE);
END IF;
— in the case of a delimited text report,
— pick the DESFORMAT what is set in the report
— else use PDF.
IF p_report_name != ‘delimitreport’
THEN
set_report_object_property(l_report_id,REPORT_DESFORMAT,’pdf’);
END IF;
l_report_return := run_report_object(l_report_id,p_paramlist_name);
l_report_status := report_object_status(l_report_return);
WHILE l_report_status in (’RUNNING’,'OPENING_REPORT’,'ENQUEUED’) LOOP
l_report_status := report_object_status(l_report_return);
END LOOP;
IF l_report_status = ‘FINISHED’ then
IF l_destype = ‘PRINTER’
THEN
message(’Report printed successfully’);
ELSIF l_destype IN (’PREVIEW’, ‘CACHE’)
THEN
/*Display report in the browser*/
web.show_document(l_reports_servlet ||
‘/getjobid’||substr(l_report_return,instr(l_report_return,’_',-1)+1)||’?'||’server=’|| l_reports_server,’_blank’);
END IF;
ELSE
message(’Error when running report ‘);– || p_report_name || ‘ with the parameters ‘ || p_other_params);
END IF;
END;
The above will fire a report request to the reports server, check for the status of the running of the report, if the destype = preview, it will also display the report output using web.show_document.
regards
Anup
Comment by Anup — 5 August 2007 #
hello,
I am recompiling fmbs on unix, earlier I compiled on windows it worked fine now when I try to compile on unix it is giving error.
FRM-18108: Failed to load the following objects
first screen is compiling fine… it means first FMB is compiling fine.. but other fmbs are giving the above error…
can you tell me whats the problem & how to resolve it.
please answer with examples….
thanks in advance….
Comment by samad — 25 August 2007 #
Samad,
Please remember that Unix is a case sensitive platform. This means all filenames are case-sensitive. You need to make sure that attached libraries, reference forms, menu names, etc. all have the same use of lower/uppercase as the actual filenames on the filesystem.
Comment by wilfred — 26 August 2007 #
Hello Wilfred,
Very First i would like to congurates you on your all achievement.
I am writing you with having lots of hope in my heart .
We have a application which is developed in Forms6i,Reports6i and database is oracle 9.2.0.1 on solaris platform
( basically a 2 tier application)
Now we want to upgrade it to 10gAS , so that every one can use it through web .
My prblems i am stating follows.
1. When i surf on net to download 10gAS through Oracle site(,i do lost which thing i should download so that i can at-least start the job—-http://www.oracle.com/technology/software/products/ias/index.html).please tell me what i have to download to make a oracle 10gAS installion that supports all the functionality of form6i.
2. As my database will be on Solaris , On which platform ( windows, linux) i should make my Application Server.
3. What are the limitations of upgardation from 6i to 10gAS (what will be the side effects on Forms and Reports)
And please pass me the best practise which you must have wrote for upgrading 6i to 10gAS.
I hope you must got my problem , if i am unclear on any point please let me know.
Any one which has already done ( 6i to 10g) , please send me the details on amit.saini@rediffmail.com.
Any Advise, Help will be highly appericiated.
Thanks
Amit
Comment by Amit — 4 September 2007 #
It was very useful for me. We are planning to migrate to 10g. Please provide some more pointers on the same
Comment by Kika — 4 September 2007 #
This is in response to Amit Saini’s query.
You need to download Oracle Application Server 10.1.2.0.2 available from this page..
http://www.oracle.com/technology/software/products/ias/htdocs/101202.html
For forms and reports all you really need is the ” Forms & Reports Services Standalone” install. You will have to download the relevant patches from the Oracle metalink site. (We are currently on 10.1.2.2.0 version.)
You would also need to download the Developer Suite 10g from http://www.oracle.com/technology/software/products/ids/index.html
About the server where you install the Application Server, I guess it depends on what platform your firm has expertise in. We are in the process of upgrading to 10g (couple of apps already in production) and Linux is the deployment platform. Cannot really comment about the Windows install as we had no experience of doing that. The download for Solaris is also available on the page.
There are a few things that are different or not available in forms 10g. It really depends on what functionality is used by your application. With respect to the reports, the client/server mode of invoking reports using RUN_PRODUCT is no longer available. You need to have a reports server running to run reports from forms (use run_report_object). Oracle graphics is no longer available in 10g (I think you can still call your 6i graphs). You can get graphics functionality using an Oracle supplied JavaBean formsgraph.jar.
There are lots of forms documentation available on this page..
http://www.oracle.com/technology/products/forms/index.html
regards
Anup
Comment by Anup — 6 September 2007 #
Hello Anup,
Many thanks for your reply . and extremmly sorry for being late on message borad , just stuck with some other stuff
I am explaining you what i understand from your mail ( please see am i right ?)
I had gone to the link
http://www.oracle.com/technology/software/products/ias/htdocs/101202.html
and found that i need to install this ( as i want to do it on windows)
Application Server Microsoft Windows
10g Release 2 x86: 1.8 GB
CD1, CD2, CD3
For forms and reports all you really need is the ” Forms & Reports Services Standalone” install.
this i could not understand ( from where i will get it ?).
You will have to download the relevant patches from the Oracle metalink site. (We are currently on 10.1.2.2.0 version.)
i can get it from link .
You would also need to download the Developer Suite 10g from http://www.oracle.com/technology/software/products/ids/index.html
i had gone there and the following i found so i think i need to go to the option one ( am i right ?).
Oracle Developer Suite 10g (10.1.2.0.2)
What’s included Platforms
Oracle Developer Suite 10g (10.1.2.0.2) Linux, Windows, Solaris
Oracle Business Intelligence Tools 10g (10.1.2.0.2) Windows
Oracle JDeveloper 10g (10.1.2.1) Windows, Linux, Solaris, HP-UX, Mac
Oracle Developer Suite 10g (10.1.2) Documentation All
For reports i am really not worried as we r having some differnt tools to check it , my first concern is to dispaly forms .
please advise .
Thanks & Regards
Amit
Comment by Amit — 20 September 2007 #
Hello Amit
“For forms and reports all you really need is the ” Forms & Reports Services Standalone” install.”
What it means is that for deploying Oracle Forms and reports, you just need to download the software in the 5th row of the table on the page “http://www.oracle.com/technology/software/products/ias/htdocs/101202.html”. The first column of the row says “Forms & Reports Services Standalone”.
You do not need to download the links in the first row “Application Server
10g Release 2″ unless you want to use Single sign on functionality integrated with the Oracle Internet Directory. But an Oracle representative will be able to advise you on that.
For the developer suite download, you are right.. You need to go for option 1 (obviously the windows download link for you).
regards
Anup
Comment by Anup — 20 September 2007 #
PLEASE FRIENDS,I GOT A PROBLEM WHILE INSTALLING ORACLE 6i forms and reports on a client machine.The problem is that my client can see the server but can not open the oracle forms.As soon as I log in to the Oracle form,It appear the form is opening ,then it disappears.friends what could be the solution to that problem?
Comment by ssozi — 18 October 2007 #
We have to migrate an forms 6i application to forma 10g. i tried that using Forms migration assistant provided by oracle, but i am not able to connect to database. TNS service and all are working fine. I am able to connect to database using form builder.
what to do?
Thanks
Vijay
Comment by vijay — 2 November 2007 #
please help me for create a graph in forms 10g
or
if i migrate forms containing graph to forms 10g
after that no graph seen in the run time form.
I want to see that graph at run time What step i follow for this but without use of javabeans.
with regards.
monika
Comment by monika gupta — 7 November 2007 #
Monika: I have no experience with Oracle Graphics. You’re probably better of asking this at the OTN Forums.
Comment by wilfred — 7 November 2007 #
Hi Wilfred!
First i would like to thank you for all expalantions you put on the forum!
I want to migrate towords forms10g, thing which I made but with problems (obsolete instructions, not generation of reports). I started to search forum in in the hope of finding resolutions to my problems but for nothing, most part recommend to pass by 6i before 10g. After installation of 6i I see that he does not have helper of migration as 10g, the migration towards 6i wants to tell open forms only (ancient versions) under 6i in suite to use the helper (in that case it is not easy of the seen whole the number of forms and report which I have under the ancient version. by reading all your interventions I see that you make the adequat tool of migration, which was of use for quite a lot of others as me.
So,Help will be highly appericiated.
thanks in advance….
Comment by tusna — 2 December 2007 #
Hi Wilfred,
We upgrade an application from 6i to 10g (10.1.2.0.2). On the first form of the application when-new-form-instance trigger is not fired. We are using standart menu. We have tabular canvas on the startup page. Did you meet similar situation.
Thanks in advance,
Cem
Comment by Cem — 23 February 2008 #
We are in a process of migrating our Forms6i application to 10g. We are quite late in doing so due to some reasons. We have identified the changes required in our application. I read this forum, downloaded your convertor, compiled and run it from cmd, but it did not run successfully and generated error
Exception in thread “main” java.lang.NoClassDefFoundError: nl/eurotransplant/convforms/client/convForms
I think I made some mistake while declaring classpath of frmjdapi and the other jar file (which jar file did you talk about, the one named convForms.deploy?????)
I have no background of java and have not worked in JDeveloper. Can you please suggest me, where should I start from?
Besides I do not have much time and have to complete it as soon as possible.
Looking forward to your reply. I would really appreciate your support in this regard.
Thanks
Comment by Asma — 13 March 2008 #
Hi,
I am in a process to migrate forms 6i character based application to forms 10g.
But the problem is the reports are built in pro*c.
They use to get called from forms by HOST command.
But i don’t know how to run the mon web.
I installed WEBUTIL and changed every occurence of HOST with CLIENT_HOST in the forms pl/sql code.
but no success.
Can you guys guide me as to how could i make proc reports run on web?
Thanks
Comment by ora_user — 2 April 2008 #
Hi,
I’m doing the migration of forms 6i to 10g. Can you please send me the code which you have used to migrate?
Thanks,
Ajay
Comment by Ajay — 29 October 2008 #
Hi, I’m an Oracle programmer and I trying to use your asistant for our migration, I’m using Oracle JDeveloper version 10.1.2.1.0 to compile your code but I get this error:
C:\DevSuiteHome_1\jdk\bin\javaw.exe -ojvm -classpath C:\DevSuiteHome_1\jdev\mywork\miconvertor\Project1\classes;C:\Documents and Settings\Administrador\Mis documentos\Paradigma\Turner\migration tips\converter\convforms\Client\src;C:\DevSuiteHome_1\forms\java\frmjdapi.jar;C:\DevSuiteHome_1\jdev\lib\ext\frmjdev_pjc.jar -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts=localhost mypackage1.client.convform
Exception in thread main
java.lang.UnsatisfiedLinkError: no frmjapi in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at oracle.forms.jdapi.Jdapi.(Unknown Source)
at mypackage1.client.convform.(convform.java:342)
at mypackage1.client.convform.main(convform.java:2148)
Process exited with exit code 1.
Could be possible there I got this error because I’m usign this version of JDeveloper?
Thanks very much for your help Wilfred!
Mariana
Comment by Mariana — 30 October 2008 #
Hi, I am doing the migration of forms 6i to 10g.
While running your source code on windowsXP, I had encountered following exception. Can you please suggest me what the cause is and how can I get it done?
Exception in thread “main” Java.lang.UnsatisfiedLinkError: no ftd2xx.dll in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at Jd2xxTest.main(Jd2xxTest.java:4)
Thanks!!!!
Basavaraj Hiremath
Comment by Basavaraj Hiremath — 19 November 2008 #
I am having the same issue as Vijay here, in that Forms builder is connectign with my credentials, but Migration assistant says it cannot connect. Did anyone come up with a solution??
—-
We have to migrate an forms 6i application to forms 10g. i tried that using Forms migration assistant provided by oracle, but i am not able to connect to database. TNS service and all are working fine. I am able to connect to database using form builder.
what to do?
Thanks
Vijay
Comment by Bruce Moore — 20 March 2009 #
we are doing a 6i to 10g conversion, looking at your code to automate this, it references a package DoNotUse_WebReports, is the code for this available?
Comment by Paddy — 17 May 2009 #
I am trying to use this tool for migration but getting the below error
oracle.forms.jdapi.JdapiStatusException: _jni_connect failed at oracle.forms.jdapi.BaseAPI._jni_connect(Native Method) at oracle.forms.jdapi.Jdapi.connectToDatabase(Unknown Source) at nl.eurotransplant.convforms.client.convForms.(convForms.java:342) at nl.eurotransplant.convforms.client.convForms.main(convForms.java:2148)
Exception in thread “main” Process exited with exit code 1.
Can you please help me in resolving the issue
Comment by Narasimha — 7 July 2009 #
I resolved the issue.
First I set the classpath
Next, I supplied the arguments for the below command and it worked fine from the command prompt.
java nl.eurotransplant.convforms.client.convForms directory=D:\test_conv filetype=fmb userid=un/pw@cs log=d:\test_conv\log\convforms.log
The same worked fine when I tried from Jdeveloper 10.1.3 by setting the run->Manage run configuartions->default->edit->program arguments with some arguments like
directory=D:\test_conv filetype=fmb userid=un/pw@cs log=d:\test_conv\log\convforms.log
Comment by Narasimha — 9 July 2009 #
I am also looking for a migration from Oracle 8i to 10g and Forms6i to 10g.
Any friends in United Arab Emirates can help me to do this.
Thank you
Daniel
Comment by Daniel — 9 August 2009 #
When I try to convForms I got the following error. What am I doing wrong? Can anyone please help me out?
E:\FormsApps\convforms\Client\src\nl\eurotransplant\convforms\client>java nl.eur
otransplant.convforms.client.convForms directory=e:\FormsApps filetype=fmb useri
d=shaikj/firefly69@mars log=d:\test_conv\log\convforms.log
Exception in thread "main" java.lang.NoClassDefFoundError: nl/eurotransplant/con
vforms/client/convForms
E:\FormsApps\convforms\Client\src\nl\eurotransplant\convforms\client>
Comment by Jeelani — 30 August 2009 #
Hi Wilfred,
I am involved in a very similar conversion and am wondering how many hours it took to write the tool and convert 350 forms, libraries, menus and object libraries.
Thanks,
Bastiaan DeJong
Comment by Bastiaan DeJong — 22 September 2009 #
@ Tim,
We are migrating oracle froms from 4.5 to 6i both based on window and character mode.
We have successfully migrated all the form to 6i on Linux and it is running fine.
The problem is that the menus were setup with a Menu Style of "Full Screen" in 4.5. But when run in 6i, the menu's are displayed as a single row across the top of the screen.
Client is bit rigid to retain their menu style in character mode after migration to 6i without going for Web solution.
I want to know, whether we can achive the full screen menu at all or not in 6i and if we can achieve then how?
Thanks in advance.
Comment by srivatsa — 9 November 2009 #
Hi Srivatsa,
We use a Form for our menu in GUI as we did in Character mode. We ended up re-writing our menu Form in GUI. It automatically displays 1, 2 or 3 columns depending on the number of options in each sub-menu. The menu system was driven from a database table with another set of tables managing security. We used the Forms menu and toolbar for basic commands only such as enter-query, clear-block etc.
This solution is working well for us as most of our clients use the keyboard most of the time and they prefer to be able to jump directly to a menu eg option 2A, 35B, 9F etc rather than reaching for the mouse each time.
Cheers,
Tim.
Comment by Tim Daniell — 10 November 2009 #