Smithy1001
Programmer
I have a win32 app in D2005 and I have managed to use the RDC using a variant call etc. My problem is getting the CRViewer into the WIN32 component palette. I have created a unit from it called CRVIEWERLib_Tlb which I can create an instance of the componentat runtime, but I cannot interact with this programmatically (for instance "Showlastpage" just gets ignored) and i can only call its functions from within the procedure that the CRViewer is created in.
I've tried importing the Activex component in win32 but it never appears in the tool palette. How can I get it in there? If i can't get it in there, how can i stop crviewer from ignoring me?
My code is below:
var
Crystal,CRReport : olevariant
obj : TCrViewer //references the CRVIEWERLIB_TLB unit
Handle : HWND
begin
Handle := Findwindow(nil,Stok enquiry');
crystal := createoleobject('CrystalRuntime.application');
obj := TCRViewer.create(fStockEnquiry);
obj.parent := fStockEnquiry;
obj.parentwindow := handle;
obj.name := 'viewer';
obj.showlastpage //THIS GETS IGNORED!?
OBJ.BRINGTOFRONT;
obj.reportsource := crreport;
obj.viewreport;
I've tried importing the Activex component in win32 but it never appears in the tool palette. How can I get it in there? If i can't get it in there, how can i stop crviewer from ignoring me?
My code is below:
var
Crystal,CRReport : olevariant
obj : TCrViewer //references the CRVIEWERLIB_TLB unit
Handle : HWND
begin
Handle := Findwindow(nil,Stok enquiry');
crystal := createoleobject('CrystalRuntime.application');
obj := TCRViewer.create(fStockEnquiry);
obj.parent := fStockEnquiry;
obj.parentwindow := handle;
obj.name := 'viewer';
obj.showlastpage //THIS GETS IGNORED!?
OBJ.BRINGTOFRONT;
obj.reportsource := crreport;
obj.viewreport;