|
-
Oct 16th, 2007, 01:56 AM
#1
Thread Starter
PowerPoster
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.
-
Oct 17th, 2007, 08:20 AM
#2
Re: Weird Crystal Problem with CrystalActiveXViewer
 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?
-
Oct 18th, 2007, 12:48 AM
#3
Thread Starter
PowerPoster
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
-
Oct 30th, 2007, 12:59 AM
#4
Thread Starter
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|