 |
| Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 23rd, 2003, 03:08 AM
|
|
Registered User
|
|
Join Date: Sep 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Crystal R.9 -> ConnectBufferstring read only?
Hi,
When I try to set the ConnectBufferString property, I get the following error:
"this property is currently in a read only state and cannot be modified"
(I'm using Crystal Reports 9)
Any ideas?
Thx,
Kris
Private Sub ConnectReports(ByVal aBuilder As IPreviewBuilder, areportrouter As ReportSourceRouter)
Dim i As Integer
Dim strConnectionBuffer
Dim objDatabaseTable As CRAXDRT.DatabaseTable
On Error GoTo Cleanup
strConnectionBuffer = _
"Server=" & m_conMain.Properties("Data Source").Value & ";;" & _
"User ID=" & m_conMain.Properties("User Name").Value & ";;" & _
"Password=" & m_conMain.Properties("Password").Value
For i = 0 To (aBuilder.ReportCount - 1)
With aBuilder.Report(i).CRReport
.EnableParameterPrompting = False
If .Database.Tables.Count > 0 Then
If Not (aBuilder.Report(i).IsConnected) Then
.Database.LogOnServer CR_ORACLEDLL, _
m_conMain.Properties("Data Source").Value, , _
m_conMain.Properties("User Name").Value, _
m_conMain.Properties("Password").Value
For Each objDatabaseTable In .Database.Tables
objDatabaseTable.ConnectBufferString = strConnectionBuffer:(
Next
End If
End If
End With
areportrouter.AddReport aBuilder.Report(i).CRReport
aBuilder.Report(i).IsConnected = True
Next i
Cleanup:
...
End Sub
|
|

July 9th, 2004, 08:54 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm also getting the same problem.. did you found any solution....
Please help me..
|
|

October 29th, 2004, 04:38 PM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I also am getting the same problem, if you have figured out this problem, I'd appreciate any tips.
This is the only result when I google the error.
Thanks a bunch in advance!!!
Mark Shervey
Quote:
quote:Originally posted by Kris DExelle
Hi,
When I try to set the ConnectBufferString property, I get the following error:
"this property is currently in a read only state and cannot be modified"
(I'm using Crystal Reports 9)
Any ideas?
Thx,
Kris
Private Sub ConnectReports(ByVal aBuilder As IPreviewBuilder, areportrouter As ReportSourceRouter)
Dim i As Integer
Dim strConnectionBuffer
Dim objDatabaseTable As CRAXDRT.DatabaseTable
On Error GoTo Cleanup
strConnectionBuffer = _
"Server=" & m_conMain.Properties("Data Source").Value & ";;" & _
"User ID=" & m_conMain.Properties("User Name").Value & ";;" & _
"Password=" & m_conMain.Properties("Password").Value
For i = 0 To (aBuilder.ReportCount - 1)
With aBuilder.Report(i).CRReport
.EnableParameterPrompting = False
If .Database.Tables.Count > 0 Then
If Not (aBuilder.Report(i).IsConnected) Then
.Database.LogOnServer CR_ORACLEDLL, _
m_conMain.Properties("Data Source").Value, , _
m_conMain.Properties("User Name").Value, _
m_conMain.Properties("Password").Value
For Each objDatabaseTable In .Database.Tables
objDatabaseTable.ConnectBufferString = strConnectionBuffer:(
Next
End If
End If
End With
areportrouter.AddReport aBuilder.Report(i).CRReport
aBuilder.Report(i).IsConnected = True
Next i
Cleanup:
...
End Sub
|
|
|

December 15th, 2004, 04:08 AM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Try this:
For Each objDatabaseTable In .Database.Tables
objDatabaseTable.ConnectionProperties.DeleteAll
objDatabaseTable.ConnectBufferString = strConnectionBuffer
Next
|
|

March 29th, 2005, 09:03 AM
|
|
Registered User
|
|
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I get exacly the same error message although I don't use ConnectBufferString property. Does anybody get any results
on this?
Any help will be greatly appreciated.
|
|

July 18th, 2005, 07:42 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The ConnectBufferString property only needs to be set once; on the first Table in the collection. You will notice the above error will always show up on the second table. This ought to fix the problem.
There is one other workaround; if you're using Crystal 10 you can use the CrystalDesignRuntime.Application instead of the CrystalRuntime.Application... it seems to ignore the problem. Note that this doesn't work on version XI (11)
|
|

August 31st, 2006, 10:52 AM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I had the same problem and found that the easiest/best fix was to just set the ConnectionBufferString every time I opened a report and just caught the exception if it was thrown, and ignored it. That way you don't have to keep track of whether this is the first report opened or second or if they closed one and are opening a new one, etc.
|
|
 |