Select Statement in Crystal Report

vellaima

Well-known member
Joined
Jan 29, 2003
Messages
109
Can anyone tell me whether we can use "Select Statement" while creating Crystal Report. If so, how?

For example:
I would like to display the details of the customer which the end user selects.

Can this be achieved? Please help me out.
 
Try this...

dtpFrom is a DateTimePicker
cboDoctor is a Combo
ArchivedByCriteria is a Crystal Report
ReportViewer is the form which contains a CrystalViewer
CrystalReportViewer1 is the viewer on the ReportViewer form

Code:
        Try
            Dim rpt As New ArchivedByCriteria()
            Dim frm As New ReportViewer() 

            rpt.RecordSelectionFormula = " {Archived.Completed} = Yes  AND
 {Archived.Doctor} = " & cboDoctor.Text & " AND 
{Archived.Dates} >= Date(" & dtpFrom.Value.ToShortDateString & ")  AND 
{Archived.Dates} <= Date(" & dtpTo.Value.ToShortDateString & ") "

            With frm
                .Text = "Archived Appointments by Criteria"
                .CrystalReportViewer1.ReportSource = rpt
                .ShowDialog(Me)
            End With

        Catch ex As Exception
            MessageBox.Show(ex.ToString)
        End Try
 
Thanks Robby for helping me out. I would also like to display some fields in Uppercase. Can this be achieved via Formula Edition. Please help me out as i am desperate to solve it.
 
Back
Top