Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2004
    Posts
    5

    Unanswered: Strang error in VB6 with Crystal reports

    When I'm trying to add parameter information, I'm getting the following error:

    Run-time error '-2147189553 (80047ccf)':

    The value or range you are adding has already existed.

    Has anyone ever seen this error before. Help just tells you that it's an automation error, with no other explanations, which is absolutely no help at all. I've been graffling with this all day and getting nowhere fast. I've created a similiar application in the past that uses the same commands to load parameter data and it works just fine, which leads me to think that there's possibly something in the report, but when I compare the two, I do not see anything that should be causeing this error. However, if I reference the other report, I do not get the above error. What gives?

    Example of the line of code that's causing the error: The bold line is where it dies.

    Dim CrxApp As New CRAXDRT.Application 'Acknowledge report library
    Set CrxApp = New CRAXDRT.Application
    Dim CrxRpt As CRAXDRT.Report
    Dim StrJobNum As String, StrReport As String
    Dim dStartDate As Date, dEndDate As Date
    'If user has not chosen a report, set a default
    If Len(LTrim(RTrim(strslectedreport))) = 0 Then
    StrReport = "PubReg.rpt"
    Else
    StrReport = StrSelectedReport
    End If
    StrReport = App.Path & "\" & StrReport
    Set CrxRpt = CrxApp.OpenReport(StrReport)
    CRViewer91.ReportSource = CrxRpt
    'Test 11/11/04
    dStartDate = Format(FrmMain.MskStartDate, "mm-dd-yyyy")
    dEndDate = Format(FrmMain.MskEndDate, "mm-dd-yyyy")
    CrxRpt.ParameterFields(1).AddCurrentValue (dStartDate)

  2. #2
    Join Date
    Jan 2005
    Posts
    2

    Did you get an answer to this?

    I have been getting the same error 2147189553 value already existed and I CANNOT figure it out.

  3. #3
    Join Date
    Jan 2005
    Posts
    2

    I think I have found the problem I was having maybe this will help someone else

    In Crystal Reports if you change a db, sp etc in database expert the fields in the report disappear. If you forget one or (for some reason) don't readd the field from the fields list you will get this error.

  4. #4
    Join Date
    Feb 2005
    Posts
    1

    value or range you are adding has already existed

    In your Crystal report, do not save the data with the report.

  5. #5
    Join Date
    Oct 2003
    Posts
    357
    Check verify Database and Set Location. UnCheck save Data with report option

    Madhivanan
    Last edited by Madhivanan; 02-18-05 at 06:25.

  6. #6
    Join Date
    Aug 2007
    Posts
    5
    I've been getting the same error. Nothing wrong with the codes.
    If you supply the parameters for the first round,no problem but if you give the same parameters for the second time the error comes.
    I don't know what should be done on the codes.
    Anyone to assist.

  7. #7
    Join Date
    Nov 2011
    Posts
    1

    Strange error in VB6 with Crystal reports

    Sorry - waking the dead, but someone may find this useful...

    Try setting the Prompt Text property on the parameter when it is created in the report.

    I have found that if this is left blank you will receive the reported error.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •