Click to See Complete Forum and Search --> : crystal report with activex dll


ims
January 10th, 2000, 10:13 PM
using crystal report object reference a activex dll was created.in the class module the following code
is written

Declaration

public withevents rpt1 as report
public withevents wind1 as window
public vie as view
public app1 as application

class initialize()
set app1=createobject("crystal.CRPE.Applicxation")
set rpt1=app1.openreport("c:\x.rpt")

public function display()
set vie=rpt1.preview
set wind1=vie.parent

Now i created standard exe project then refrenced this dll

command1button click
dim x as new dllname.classname
x.display

Now my problem is when ever i click the button the report is actived but it also terminating.

I would like to display the report as long as the user does not click the close button
how should i proceed.

please help me out

January 11th, 2000, 02:07 AM
Hi!

Create a report as Crptrep1.rpt . In the VB form add one command button. Using Ctrl T (components) add one
Crystal Report 7.0 control to your tool box. You can add the same control to the form and set the properties report
filename to Crptrep1.rpt (give the full path) and name as CrystalReport1. Then write the single line code as given below.

Private Sub Command1_Click()
CrystalReport1.Action = 1
End Sub

The whole report will be displayed and unless you cancel it will not be disappeared.
Try this.Perhaps it may work.

Satya
Email : snchandu@hotmail.com