CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2000
    Posts
    2

    crystal report with activex dll

    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





  2. #2
    Guest

    Re: crystal report with activex dll

    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 : [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured