Forms45 and Crystal Reports 5.0

From: Kathy Vineyard <kathy.vineyard_at_tek.com>
Date: 1997/04/14
Message-ID: <3352C2F5.1480_at_tek.com>#1/1


I'm trying to call Crystal Reports 5.0 from Oracle Forms4.5 using the ole2 built-in Packages. Has anybody successfully done this? My code just silently doesn't work and after struggling mercifully for weeks, I can't figure out what I'm doing wrong. As a test case, I'm using one of the Crystal supplied demo reports which does not require a connection string to Oracle. Basically, the following code seems like it should work:

DECLARE
lArgs OLE2.LIST_TYPE;
ActionArgs OLE2.LIST_TYPE;
hCrystal OLE2.OBJ_TYPE;
BEGIN
        hCrystal := ole2.Create_Obj('Crystal.CrystalReport');

	lArgs := Ole2.Create_ArgList;
	Ole2.Add_Arg(lArgs,'C:\temp\rpttst.rpt');
	Ole2.Invoke(hCrystal,'ReportFileName',lArgs);

	ActionArgs := Ole2.Create_ArgList;
	Ole2.Add_Arg(ActionArgs,'1');
	Ole2.Invoke(hCrystal,'Action',ActionArgs);
END; Thanks for any help you can send my way.

Kathy Vineyard
IMG inc.
email: kathyv_at_img-oregon.com --or-- kathy.vineyard_at_tek.com Received on Mon Apr 14 1997 - 00:00:00 CEST

Original text of this message