?
Solved

Crystal report with developer

Posted on 2003-03-30
6
Medium Priority
?
402 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

752 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