MishenkovKS
Programmer
I can not pass parameters to crystal report (activex)
< sample code >
Declare
uid Varchar2(50);
pwd Varchar2(50);
par Varchar2(2000);
return_err number;
reportfile varchar2(100);
a_value_chosen BOOLEAN;
formula varchar2(2000);
dd ole2.obj_type;
dummy_var NUMBER;
begin
dd := ole2.create_obj('Crystal.CrystalReport');
Crystal_CrystalCtrl.reportfilename(dd,'c:\report\otr1.rpt');
Crystal_CrystalCtrl.ole_Connect(dd,'DSN=ora;UID=master;PWD=super');
Crystal_CrystalCtrl.DiscardSavedData(dd,1);
Crystal_CrystalCtrl.Destination(dd, 0);
--CRYSTAL_CRYSTALCTRL.SelectionFormula(dd, '{OWEN_SOTR.SOT_KOD}=''68''');
Crystal_CrystalCtrl.ParameterFields(dd,0,'pname;111;True');
CRYSTAL_CRYSTALCTRL.Action(dd, 1);
--return_err:= Crystal_CrystalCtrl.PrintReport(dd);
end;
Crystal_CrystalCtrl.ParameterFields - return error
< An ole error accurred: 0x80020003 >
But SelectionFormula work good!!!!!!
Help me please !!!!
< sample code >
Declare
uid Varchar2(50);
pwd Varchar2(50);
par Varchar2(2000);
return_err number;
reportfile varchar2(100);
a_value_chosen BOOLEAN;
formula varchar2(2000);
dd ole2.obj_type;
dummy_var NUMBER;
begin
dd := ole2.create_obj('Crystal.CrystalReport');
Crystal_CrystalCtrl.reportfilename(dd,'c:\report\otr1.rpt');
Crystal_CrystalCtrl.ole_Connect(dd,'DSN=ora;UID=master;PWD=super');
Crystal_CrystalCtrl.DiscardSavedData(dd,1);
Crystal_CrystalCtrl.Destination(dd, 0);
--CRYSTAL_CRYSTALCTRL.SelectionFormula(dd, '{OWEN_SOTR.SOT_KOD}=''68''');
Crystal_CrystalCtrl.ParameterFields(dd,0,'pname;111;True');
CRYSTAL_CRYSTALCTRL.Action(dd, 1);
--return_err:= Crystal_CrystalCtrl.PrintReport(dd);
end;
Crystal_CrystalCtrl.ParameterFields - return error
< An ole error accurred: 0x80020003 >
But SelectionFormula work good!!!!!!
Help me please !!!!