Solved

How to use crystle report 8.5 to print reports?

Posted on 2004-10-30
135 Views
Last Modified: 2011-09-20
I used the crystle report v. 4.5. I can pritn the report using the command crp.action=1 or crp.printreport.
when I install the vesion 8.5, I found problem to print the report. I know that it's a simple thing, but id didn't know how..
any solution??

OmarMallat
0
Question by:omarmallat
    4 Comments
     
    LVL 14

    Expert Comment

    by:sudhakar_koundinya
    follow the steps suggested  at following thread

    http://www.vbcode.com/asp/showsn.asp?theID=4675
    0
     
    LVL 14

    Accepted Solution

    by:

    Option Explicit
    Dim CRXApplication As CRAXDDRT.Application
    Dim CRXReport As CRAXDDRT.Report
    Dim CRXDatabase As CRAXDDRT.Database

    Private Sub Form_Load()
        Me.WindowState = 2 'Maximized
    End Sub

    Private Sub Form_Resize()
        rptCRViewer.Top = 0
        rptCRViewer.Left = 0
        rptCRViewer.Height = ScaleHeight
        rptCRViewer.Width = ScaleWidth
    End Sub

    Public Sub InitializeForm(rs As ADODB.Recordset, Path As String)
        Set CRXApplication = New CRAXDDRT.Application
        Set CRXReport = New CRAXDDRT.Report
        Set CRXDatabase = CRXReport.Database

        Set CRXReport = CRXApplication.OpenReport(Path, 1)
        CRXDatabase.SetDataSource rs, 3, 1

        CRViewer1.ReportSource = CRXReport
        CRViewer1.ViewReport
        Me.Show
    End Sub
    0
     
    LVL 27

    Expert Comment

    by:Dabas
    Hi omarmallat:
    I also have had CR5 converted to later versions ans did not have a problem with crp.action=1
    Maybe if you let us know exactly what the problem was to print the report, it will be easier to answer!

    Dabas
    0
     

    Author Comment

    by:omarmallat
    thank you every body, but the solution was not same as I want. when i used the previous version of crystal report, I did not use the crystal viewer and put it in a form. all I do, I call the report, and the control load a new form containing the report.
    can I use now in the new version the same idea. I didn't like to create a form and put in it a crystal viewer. I want to call the report and let it do all things.\
    thanks
    Omar Mallat
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Lean Six Sigma Project Manager Certification

    There are many schools of thought around successful project management, but few as highly regarded as the Six Sigma and Lean methods. With 37 hours of learning, this training will explain concrete processes for increasing efficiency and limiting wasted time and effort.

    I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    934 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now