when calling crystal report from vb6 i am getting this error
property is write -only
Printable View
when calling crystal report from vb6 i am getting this error
property is write -only
What property and what version of CR? Can you post your code?
report ver is 8.5
data object is dao
this report was desgined earlier ver of crystal report
sscmdprint.Enabled = False
Dim rrrr As String
rrrr = "{patientdata.lab_no} = " & hlabno
crpttest.Password = "prince"
If StrHisto = "HISTOPATHOLOGY" Or StrHisto = "CYTOLOGY" Then
crpttest.ReportFileName = App.Path & "\RptHisto.rpt"
Else
crpttest.ReportFileName = App.Path & "\testrpt1.rpt"
End If
crpttest.SelectionFormula = rrrr
crpttest.WindowState = crptMaximized
crpttest.Action = 0----- here it shows proper is write only
in vb it gives error incorrect session parameter
I take it that "crpttest" is the Report object? If so then the .Action property should be set only after the reports .Connect has been established.
I had this happen to me with code that had been working for years. The Action property is not the problem. I changed a report and went to test it, but I had not synchronized the report to the test database. Use "Set Location" in "Database" menu to set your crystal report to the same data that you are logging in to and connecting to in the code.
Hope that helps anyone who might have wasted two hours with this error and not found any answers in web searches. ;)