Results 1 to 4 of 4

Thread: Weird Crystal Problem with CrystalActiveXViewer

  1. #1

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Weird Crystal Problem with CrystalActiveXViewer

    Hi all,

    I have the following code to populate the CrystalActiveXViewer everytime I click on a listview item.

    this is the command for the recordselection formula:

    Code:
    Call GetNoteContents("({Command.noteid} = " & SNId & ")")
    Code:
    Sub GetNoteContents(FilterSql)
    On Error GoTo LoadReport_Error
    
    
        lvwOldNotes.Enabled = False
        
        'Set oApp = CreateObject("CrystalRuntime.Application.11")
        Set oReport = New CrystalReport2
        oReport.EnableParameterPrompting = False
        oReport.DiscardSavedData
        oReport.FormulaSyntax = 0
        oReport.RecordSelectionFormula = FilterSql
        'oReport.PaperOrientation = crPortrait
           
        CrystalActiveXReportViewer1.ReportSource = oReport
        'CrystalActiveXReportViewer1.Refresh
        'CrystalActiveXReportViewer1.RefreshEx (True)
        CrystalActiveXReportViewer1.ViewReport
        
            
        Delay 1 'give report time to load otherwise it fails if user clicks on combo twice while reportviewer is loading
    
      
       lvwOldNotes.Enabled = True
       
       'Set oApp = Nothing
       'Set oReport = Nothing
    
    Exit Sub
    
    LoadReport_Error:
        errmsg "The following Exception occured : " & ERR.Description & ",  " & ERR.Source & "", "Exception occured in frmItemManager.LoadReport()"
    
    End Sub
    Problem is everytime I click on the listview the data for that goods delivery note should come up. I have a command inside my designer to select the desired fields.

    One of the fields display - "Goods Delivery Note" or "Goods Received Note"

    When I click on the listview to bring up the contents of the selected note, sometimes the entire text "Goods Delivery note" appears correctly, other time just a "g" appears in that textbox.

    What could be the problem here. Please help me.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Weird Crystal Problem with CrystalActiveXViewer

    Quote Originally Posted by Nitesh
    When I click on the listview to bring up the contents of the selected note, sometimes the entire text "Goods Delivery note" appears correctly, other time just a "g" appears in that textbox.
    Have you been able to determine any consistency (such as a particular item or row or column or something of that nature) in when just the "g" shows up?

  3. #3

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Weird Crystal Problem with CrystalActiveXViewer

    HI Hack,

    Unfortunately it happens randomly. It's driving me insane.
    In one project I used the same code and everything works great. In this project I am having a problem

  4. #4

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Weird Crystal Problem with CrystalActiveXViewer

    Hi Guys,

    Turns out it was the ODBC 5 connector causing the problem. when I switched to ODBC 3.51 everything is working perfectly.

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