Results 1 to 5 of 5

Thread: Crystal Reports Excel Format Option Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2008
    Posts
    2

    Crystal Reports Excel Format Option Problem

    Hi guys, I am developing an application where i am using vb6 and crystal reports. Crystal reports has this export functionality to any format particularly excel. Can somebody help me if i could set the default excel format options and not showing the dialog box to the user? I only want them to see the 'save as' dialog box for excel file. Thank you in advance

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Crystal Reports Excel Format Option Problem

    ........
    Last edited by jggtz; Nov 25th, 2008 at 12:50 PM.

  3. #3
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Crystal Reports Excel Format Option Problem

    Post Crystal Reports version and how are You calling the Crystal Reports engine in VB ( OCX or RDC or API ? )
    But , yes, it can be solve with VB code...

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2008
    Posts
    2

    Re: Crystal Reports Excel Format Option Problem

    Hi, Thanks for replying. I am using Crystal Report version 10. In my VB code, i used CrystalActiveXReportViewer. This is my code to generate the report:

    Dim oApp As CRAXDRT.Application
    Dim oReport As CRAXDRT.Report
    Dim oRs As New ADODB.Recordset

    oRs.Open "myTable", ConnectionManager.DBConnection, adOpenForwardOnly, adLockReadOnly, adCmdTable
    Set oApp = New CRAXDRT.Application
    Set oReport = oApp.OpenReport(strReportPath & "\myReport.rpt", 1)
    oReport.Database.SetDataSource oRs, 3, 1
    crvMyCRViewer.ReportSource = oReport
    crvMyCRViewer.ViewReport


    Thanks...

  5. #5
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Crystal Reports Excel Format Option Problem

    Try a little with :
    Code:
        With oReport.ExportOptions
            .DestinationType = crEDTApplication
            .FormatType = crEFTExcel97
            .DiskFileName = "SomeFileName.xls"
        End With
        oReport.Export False
    It's not neccesary to preview the report.
    There are more properties, methods and events related inside .ExportOptions

    Good luck

    JG
    Last edited by jggtz; Nov 25th, 2008 at 10:16 PM.

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