Skip to Content
0
Former Member
Jan 12, 2009 at 09:02 PM

Issue: Hosting Crystal Report Viewer in a VFP SCreen

151 Views

I'm currently trying to host a Crystal Report viewer instance in the background screen of a VFP Application. I Host the Crystal Report Viewer in a contanier object and then add that to the screen. That appears to work fine. The issue I'm Running into is that when i start processing keystrokes on any other forms, the enter key is lost to me. If I do the same thing in the VFP IDE The enter key is also lost.

the Screen is a considered a VFP Form.

is the code i run to add the object to the form

_screen.AddObject("fred","crContainer")

In the Init of crCOntainer I have the following code

local oReport, oCrystal

oCrystal = CREATEOBJECT("CrystalRuntime.Application")

oReport = oCrystal.OpenReport(This.Reportname)

this.CRV.ReportSource = oReport

This.Crv.Anchor = 15

this.crv.ViewReport()

CRV is an istance of OLECOntrol that hosts an instance of CrystalReports12.ActiveXReportViewer.1

All other keys appear to be handled by my event handlers in vfp except the enter key. Any suggestions, clues or comments

I have searched, with Google and MSDN for a solution and nothing seems to pop to hand.

Edited by: Joe Gori on Jan 12, 2009 10:25 PM