Results 1 to 5 of 5

Thread: Property is write-only

  1. #1

    Thread Starter
    Hyperactive Member yousufkhan's Avatar
    Join Date
    Jan 2002
    Location
    India
    Posts
    492

    Property is write-only

    when calling crystal report from vb6 i am getting this error
    property is write -only

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Property is write-only

    What property and what version of CR? Can you post your code?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Hyperactive Member yousufkhan's Avatar
    Join Date
    Jan 2002
    Location
    India
    Posts
    492

    Re: Property is write-only

    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

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Property is write-only

    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.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5
    New Member
    Join Date
    May 2010
    Posts
    1

    Re: Property is write-only

    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.

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