473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Crystal in Oracle forms

I am trying to imbed crystal in oracle. I got the following steps from the web.
when i try to run the created from , iget the error frm-41344.

Any suggestions.

Regards,
Zellipa


STEPS TO display the Crystal Report in Oracle Forms 6i:

**NOTE: This assumes that you already have Crystal Reports installed on your machine.

1. Create a new form.
2. Create a control block, name it 'CONTROL'.
3. Create a CONTENT canvas, name it 'REPCAN'.
4. Create an ActiveX control on the canvas, name it 'CrystalReport1'.
5. Create an Image item and name it 'REP'. (Make sure that image item overlaps
the ActiveX control completely; this image item is only used to get the item
handle. Enlarge this object such a way that it will fit the window; the
report gets displayed in this item so the item size should be adeqately
large.
6. Right click on the ActiveX control item and select "Insert Object" from the
menu.
7. From the list select "Crystal Report Control".
8. Select the Program->Import OLE Library Interface Menu in the form.
9. Select Crystal.CrystalReport from the List. (This will list two methods
and one Event. The two methods are CrystalCtrl and IRowCursor, the event is
CrystalReprotEvent).
10. Select all three and click on the OK button to accept. (This will
create the PL/SQL wrapper program units).
11. In the "When-New-Form-Instance" trigger of the form, put the following
code.

DECLARE
charWinHandle VARCHAR2(50);
numWinHandle NUMBER;

BEGIN
Set_Application_Property(Cursor_Style,'BUSY');

charWinHandle := Get_Item_Property('Control.Rep',Window_Handle);
numWinHandle := To_Number(charWinHandle);

:Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowParentHandle
:= numWinHandle;

:Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowState := 2;

:Item('CONTROL.CRYSTALREPORT1').OCX.Crystal.Crysta lReport.Connect
:= 'DSN=;UID=' || Get_Application_Property(UserName) ||
';pwd=' || Get_Application_Property(password) || ';dsq=;';

Crystal_CrystalCtrl.ReportFileName( :Item('Control.CrystalReport1').interface,
'C:\Sample_Rep.Rpt' );

Set_Window_Property( Forms_Mdi_Window, Window_State,Maximize );
Set_Window_Property( 'MAIN', Window_State, Maximize );

:reptitle := 'Report Preview Window';

numWinHandle := Crystal_CrystalCtrl.PrintReport( :Item('Control.CrystalReport1').interface );
Set_Application_Property(Cursor_Style,'DEFAULT');

END;

**NOTE: Change the report name and path according to your required file name and path in
the "Crystal_CrystalCtrl.ReportFileName" method call. Also, the connection string shown
assumes that you will use the current USER and PASSWORD for the Form.

12. To make the above Form generic so that you can run any Crystal report from it, then create
a parameter for the report name and pass it to the Form using CALL_FORM from any other Form.
Then just replace the file name with the passed parameter.

13. Run the Form.
Feb 10 '07 #1
0 5491

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Leo_felix | last post by:
I am trying to integrate the crystal reports v9.02 in my application. The application is developed using oracle forms 6i and the database is oracle 8i. I need to call the crystal reports from my...
2
by: windos | last post by:
Dear all, I am a new in using Crystal Report. I'm trying to add this query in CR : SELECT
13
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
1
by: xtanto | last post by:
Hi All, We need to develope application & report that run on windows accessing Oracle on Linux. and we use Crystal Report as reporting tool. Can Crystal Report on windows access...
4
by: Wayne Baswell | last post by:
I want to pass a date variable to a sql statement from Crystal Reports. The part of the query accepting the variables looks like: "Calendar_Date between To_Date('1-JUN-03','mm/dd/yy') and...
4
by: Azhar Bilgrami | last post by:
Dear Hi: Hope to see u in good health. " I want to migrate a database which is currently running Unix as Operating System and Oracle ver 6 as Database, it is also using oracle froms version 3...
0
by: Max | last post by:
Hi wise people, Has anyone encountered the Crystal Reports problem I describe below? If so, how did you solve it? It seems that every article posted on google regarding CR and logon problems is...
0
by: Big George | last post by:
Hello, I'm working with Visual Studio 2003 .NET and Crystal Reports for .NET. Database: Oracle 10g Develop PC: Windows XP I'm having problems trying to design a Crystal Report connecting to...
0
by: sathyguy | last post by:
when i type the below in my RHEL AS 4's Firefox 1.5 http://appsworld.ncc.com:7777/forms/...&form=test.fmx iam getting the below error... The requested URL /forms/frmservlet was not found on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.