Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

  • Moderators
Posted

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

 

       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

Visit...Bassic Software
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...