Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Crystal report with developer

Posted on 2003-03-30
6
Medium Priority
?
404 Views
Last Modified: 2012-06-21
Can i generate report in "crystal report" from Developer 6i. That is besides report builder do the form builder support crystal report? if yes then how?
0
Comment
Question by:fakrul_alam
  • 2
4 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 8235040
WHat is Developer 6i?

mlmcc
0
 
LVL 1

Expert Comment

by:iaminit
ID: 8236451
Why not just write the report using Developer?  It's vastly better than Crystal.  Or do you only have the forms builder?

-- mlmcc -- Developer 6i is an old version of Oracle's report writer/forms builder.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8236874
I suspected that but wasn't sure.

mlmcc
0
 
LVL 22

Accepted Solution

by:
Helena Marková earned 80 total points
ID: 11478787
It can be done - Note:220957.1 from Metalink - I hope this will help you:

How to Print a Crystal Report from Oracle Forms

Solution
1)  In the layout editor, create a new data block and name it OCXBLOCK
2)  In the property palette for the OCXBLOCK set Records -> Single Record to Yes and Database -> Database Data Block to No
3)  Create a new ActiveX control in the OCXBLOCK data block
4)  Right-click on the ActiveX control and click Insert Object
5)  Select Crystal Report Control from Insert Object dialog and click OK
6)  In Object Navigator, double-click the new ActiveX object to display the Property Palette
7)  Change General -> Name to CRYSOCX and Database -> Database Item to No and Physical -> Visible to No
8)  On Program menu select Import OLE Library Interfaces
9)  Select Crystal.CrystalReport from Import OLE dialog, select (highlight) all methods and properties, click OK
10) Enter code into the KEY-PRINT trigger on the form similar to the following:

/* Invoke Crystal Report Control to perform the print function for this form. */
DECLARE
    sReportName            VARCHAR2(64);
    sReportDesc            VARCHAR2(50);
    sReportTable           VARCHAR2(64);
    sReportPath            VARCHAR2(64);
    sUserName              VARCHAR2(16);
    sPassWord              VARCHAR2(16);
    sDataBase              VARCHAR2(64);
    sConnect               VARCHAR2(96);
    sWhere                 VARCHAR2(64);
BEGIN
-- Retrieve the Log in information.
 sUserName := GET_APPLICATION_PROPERTY (USERNAME);
 sPassWord := GET_APPLICATION_PROPERTY (PASSWORD);
 sDataBase := GET_APPLICATION_PROPERTY (CONNECT_STRING);
 sConnect := 'DSN=' || sDataBase || ';
 UID=' || sUserName || ';
 PWD=' || sPassWord || ';
 DSQ=';
-- Retrieve the report information
 SELECT RPT_PATH, RPT_FILENAME, RPT_DESC, RPT_TABLE_NAME INTO sReportPath, sReportName, sReportDesc, sReportTable FROM RPT_LIST WHERE RPT_NBR = Num;
  /* Where Num is a number*/
-- Set the OCX up to execute
 CRYSTAL_CRYSTALCTRL.ReportFileName(:item('OCXBLOCK.CRYSOCX').interface, sReportPath || sReportName); CRYSTAL_CRYSTALCTRL.WindowTitle(:item('OCXBLOCK.CRYSOCX').interface, sReportDesc);
 CRYSTAL_CRYSTALCTRL.WindowState(:item('OCXBLOCK.CRYSOCX').interface,CRYSTAL_CONSTANTS.crptMaximized);
 CRYSTAL_CRYSTALCTRL.ole_Connect(:item('OCXBLOCK.CRYSOCX').interface, sConnect);

-- Load the arguments - this section should be set to be specific to each form
  sWhere := '{' || sReportTable || '.CHAIN_NBR}=' || TO_CHAR(:SLSCHAINPF.Chain_Nbr);
 CRYSTAL_CRYSTALCTRL.SelectionFormula(:item('OCXBLOCK.CRYSOCX').interface, sWhere);

-- Execute the report!
 CRYSTAL_CRYSTALCTRL.Action(:item('OCXBLOCK.CRYSOCX').interface, 1);

  EXCEPTION
    WHEN OTHERS THEN
         MESSAGE ('An Error has occurred. ');
  END;
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question