10 Replies - 4091 Views - Last Post: 27 June 2017 - 01:26 AM Rate Topic: -----

#1 jez_chris  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 07-May 12

CR.Action = 1 error

Posted 07 May 2012 - 05:59 AM

Private Sub cmdPrint_Click()

CR.WindowTitle = "List Of Enroled Students"
CR.ReportFileName = App.Path & "\REPORTS\ListOfEnroledStudents.rpt"
CR.SelectionFormula = "{ENROLMENT.schoolyear} = '" & txtSchoolYear.Text & "' And {ENROLMENT.semester} = '" & cboSemester.Text & "' And {ENROLMENT.coursecode} = '" & cboCourseCode.Text & "' And {ENROLMENT.level} = '" & cboLevel.Text & "' "
CR.DiscardSavedData = True
CR.Action = 1


End Sub

Is This A Good Question/Topic? 0
  • +

Replies To: CR.Action = 1 error

#2 BobRodes  Icon User is offline

  • Lovable Curmudgeon
  • member icon

Reputation: 600
  • View blog
  • Posts: 3,069
  • Joined: 19-May 09

Re: CR.Action = 1 error

Posted 07 May 2012 - 06:23 AM

Nice bit of code. What's wrong with it?
Was This Post Helpful? 0
  • +
  • -

#3 jez_chris  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 07-May 12

Re: CR.Action = 1 error

Posted 07 May 2012 - 07:57 AM

View PostBobRodes, on 07 May 2012 - 06:23 AM, said:

Nice bit of code. What's wrong with it?


that is one in my codes. i want to know what is the error in my system i used vb6 and crystal report viewer 8.5, and when i run the system and the error prompt in the CR.Action = 1. i don't know what to do about that. but i think i need to install the crystal report software/application
Was This Post Helpful? 0
  • +
  • -

#4 BobRodes  Icon User is offline

  • Lovable Curmudgeon
  • member icon

Reputation: 600
  • View blog
  • Posts: 3,069
  • Joined: 19-May 09

Re: CR.Action = 1 error

Posted 07 May 2012 - 11:07 AM

Well, I'd like to know what the error is too, if you should ever get around to telling me.
Was This Post Helpful? 0
  • +
  • -

#5 jez_chris  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 07-May 12

Re: CR.Action = 1 error

Posted 08 May 2012 - 06:06 AM

View PostBobRodes, on 07 May 2012 - 11:07 AM, said:

Well, I'd like to know what the error is too, if you should ever get around to telling me.

i want to know what version of crystal report i need for visual basic 6.0? and how to determine the location of the reports?
Was This Post Helpful? 0
  • +
  • -

#6 BobRodes  Icon User is offline

  • Lovable Curmudgeon
  • member icon

Reputation: 600
  • View blog
  • Posts: 3,069
  • Joined: 19-May 09

Re: CR.Action = 1 error

Posted 08 May 2012 - 06:10 AM

Any version you like, AFAIK. I've used the native version (4.6.1) and 8, personally.
Was This Post Helpful? 0
  • +
  • -

#7 jez_chris  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 07-May 12

Re: CR.Action = 1 error

Posted 08 May 2012 - 07:21 AM

View PostBobRodes, on 08 May 2012 - 06:10 AM, said:

Any version you like, AFAIK. I've used the native version (4.6.1) and 8, personally.

really?? it can be any version of crystal report for visual basic 6.0? what is AFAIK? can you help me? what is ur email?
Was This Post Helpful? 0
  • +
  • -

#8 BobRodes  Icon User is offline

  • Lovable Curmudgeon
  • member icon

Reputation: 600
  • View blog
  • Posts: 3,069
  • Joined: 19-May 09

Re: CR.Action = 1 error

Posted 08 May 2012 - 01:28 PM

AFAIK = as far as I know. I've used 4.6.1 and 8. I don't know if I can help you or not. You can't have my email; why should any solution we come up with be private to yourself?
Was This Post Helpful? 0
  • +
  • -

#9 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 328
  • View blog
  • Posts: 1,990
  • Joined: 26-March 09

Re: CR.Action = 1 error

Posted 08 May 2012 - 11:39 PM

A quick google will tell you the versions that are compatible with VB6 as some of the newer ones appear not to be.
Was This Post Helpful? 0
  • +
  • -

#10 BobRodes  Icon User is offline

  • Lovable Curmudgeon
  • member icon

Reputation: 600
  • View blog
  • Posts: 3,069
  • Joined: 19-May 09

Re: CR.Action = 1 error

Posted 09 May 2012 - 06:31 AM

In other words, look it up! :)
Was This Post Helpful? 0
  • +
  • -

#11 AliMam  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-August 07

Re: CR.Action = 1 error

Posted 27 June 2017 - 01:26 AM

    Nothing is wrong with your code except that you are not passing connection string you missed the
    trick by not using connect property i.e.
    CR.connect

       Dim AxCrystalReport2 As New Crystal.CrystalReport

        With AxCrystalReport2
            .ReportFileName = "C:\position1.rpt"
            .Connect = "Dsn = Local;pwd=ledger"
            .DiscardSavedData = True
            .RetrieveDataFiles()
            .ReportSource = 0
            .SQLQuery = "Select * From AccountCode Order By SubCode"
            .ReportTitle = "Position As On 31-05-2017"
            .Destination = Crystal.DestinationConstants.crptToWindow
            .PrintFileType = Crystal.PrintFileTypeConstants.crptCrystal
            .WindowState = Crystal.WindowStateConstants.crptMaximized
            .WindowMaxButton = False
            .WindowMinButton = False
            .WindowShowPrintSetupBtn = True
            .WindowShowGroupTree = True
            .WindowShowSearchBtn = True
            .WindowShowZoomCtl = True
            .Action = 1
            '.CausesValidation = True
        End With

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1