×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Basic Crystal Questions

Basic Crystal Questions

Basic Crystal Questions

(OP)
I have been asked to create a few reports using Crystal with the data source being Access. I don't have any experience with Crystal, but I have created reports in Access, FoxPro, and SQL Reporting Services. The requested reports are fairly basic with the usual type of filters, date ranges, type of record (from a list), user (from a list), etc. I've found a lot of information on the web and was wondering if someone could point to a few of their favorite resources for basic Crystal education. This seems kind of dumb, but after I create these reports, do I need to develop some kind of front end (.net or other) so the users can run the reports? I hope these questions aren't too basic for this forum. Thanks in advance.

Auguy
Northwest Ohio

RE: Basic Crystal Questions

The users can run the report within the crystal report designer itself, or you can buy a crystal report viewer.  These are very cheap, datalink viewer from Millet Software is my favorite.  www.milletsoftware.com

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports.  Check out our Macola tools:
www.gainfocus.biz/exceladdin.html

RE: Basic Crystal Questions

Check out www.crystalreportsbook.com.  To get access to the full set of books, it's a fairly minimal monthly fee and Brian's books are very good.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.

RE: Basic Crystal Questions

(OP)
Thanks to both of you, those look like great resources.

Auguy
Northwest Ohio

RE: Basic Crystal Questions

You also might want to download copies of our Crystal Clear newsletter.  Some useful hints and techniques there.

Editor and Publisher of Crystal Clear
www.chelseatech.co.nz/pubs.htm

RE: Basic Crystal Questions

I am trying to pass a date parameter to a CR using VB6 and CR 8.5 but am getting an invalid parameter value error? Any suggestions?

Dim strSQL As String
Dim dtStartDate As Date
Dim dtEndDate As Date

Dim strStartDate As Date
Dim strEndDate As Date

Dim dtMonth As Integer
Dim dtYear As Integer

Private Sub Command1_Click()
    
    'clear out old data
    Me.CrystalReport1.DiscardSavedData = True
    Me.CrystalReport1.Reset
    
    'reset all good params
    Me.CrystalReport1.ReportFileName = "N:\Tims\REPORTS\Audit Report - Deleted Entries.rpt"
    Me.CrystalReport1.Connect = "uid=tims;pwd=tims;"
    Me.CrystalReport1.PrintFileType = crptRecord
    Me.CrystalReport1.ReportSource = crptReport
    Me.CrystalReport1.ReportTitle = "Audit Report - Deleted Entries"
    Me.CrystalReport1.WindowTitle = "Reports: Audit Report - Deleted Entries"
    
    'get the start and stop date for the report
    GetDates Trim(str(Me.cboMonth.ListIndex + 1)), Trim(Me.cboYear.Text)
        
    Me.CrystalReport1.ParameterFields(0) = "startdate;" & dtStartDate & ";false"
    Me.CrystalReport1.ParameterFields(1) = "enddate;" & dtEndDate & ";false"
    
    'MsgBox Me.CrystalReport1.ParameterFields(0) & " " & Me.CrystalReport1.ParameterFields(1)
    Me.CrystalReport1.WindowState = crptMaximized
    Me.CrystalReport1.Action = 1
       
End Sub

Private Sub Form_Load()

Dim strEndDay As String
Dim startYear As Integer
Dim endYear As Integer

Dim strMonth(1 To 12) As String
Dim i As Integer

strMonth(1) = "January"
strMonth(2) = "February"
strMonth(3) = "March"
strMonth(4) = "April"
strMonth(5) = "May"
strMonth(6) = "June"
strMonth(7) = "July"
strMonth(8) = "August"
strMonth(9) = "September"
strMonth(10) = "October"
strMonth(11) = "November"
strMonth(12) = "December"

'fill the combo box with the string array
For i = 1 To 12
    Me.cboMonth.AddItem (strMonth(i))
    Me.cboMonth.ItemData(Me.cboMonth.NewIndex) = i
Next

'get today's date month and year
dtMonth = DatePart("m", DateTime.Now) - 1
dtYear = DatePart("yyyy", DateTime.Now)

endYear = dtYear
startYear = endYear - 10

'set the display to the current month
Me.cboMonth.ListIndex = dtMonth

'fill the year combo box
For i = startYear To endYear
    Me.cboYear.AddItem (str(i))
    Me.cboYear.ItemData(Me.cboYear.NewIndex) = i
Next

'set the display to the current year
Me.cboYear.ListIndex = 10

End Sub

Function CheckForLeapYear(intYear As Integer)

    'if the current year is completely divisible by 4 with no remainder then
    'it is a leap year
    If (intYear Mod 4 = 0) Then
        CheckForLeapYear = True
    Else 'not a leap year
        CheckForLeapYear = False
    End If
   
End Function

Sub GetDates(strMonth As String, strYear As String)

    Dim isLeapYear As Boolean
    Dim strEndDay As String
    
    'get the starting date for the current request
    Select Case cboMonth.ListIndex + 1
        Case 1, 3, 5, 7, 8, 10, 12
            strEndDay = "31"
        Case 2
            isLeapYear = CheckForLeapYear(dtYear)
            If isLeapYear = True Then
                strEndDay = "29"
            Else
                strEndDay = "28"
            End If
        Case Else
            strEndDay = "30"
    End Select
    
    'strStartDate = strMonth & "/1/" & strYear & " 00:00:00AM"
    'strEndDate = str(strMonth) & "/" + Trim(strEndDay) + strYear + " 23:59:59PM"

    strStartDate = strMonth & "/1/" & strYear & " 00:00:00AM"
    strEndDate = strMonth & "/" & strEndDay & "/" & strYear & " 23:59:59PM"
    
    dtStartDate = CDate(strStartDate)
    dtEndDate = CDate(strEndDate)
    
    'MsgBox strStartDate & Chr(12) & Chr(13) & strEndDate
    MsgBox dtStartDate & Chr(12) & Chr(13) & dtEndDate
    
    'MsgBox strStartDate & " " & strEndDate

End Sub
 

RE: Basic Crystal Questions

Scottke,

You'll get a better response on this if you create a new thread.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.

RE: Basic Crystal Questions

I did, thanks. See one below this one...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close