shirishdawane,
Sorry, I am sleepy. Here is the correct code.
VB Code:
[B]CRreport.DiscardSavedData[/B] frmreport.CRreport.Connect = DE.Connection1 frmreport.CRreport.ReportFileName = App.Path + "\rptprescription.rpt" str = "{presciption.dateofvisit} = '" & DTPicker1.Value & "' and {presciption.pname} = '" & cmbpatientname.Text & "'" frmreport.CRreport.Destination = crptToWindow frmreport.CRreport.WindowParentHandle = frmreport.hWnd frmreport.CRreport.SelectionFormula = str Screen.MousePointer = Default frmreport.CRreport.Action = 1




Reply With Quote