This below code I am using to call report of prescription. I am using crystal report 8.0 & database is ACCESS 2000.
but my problem is that when I add one more record into database it unable to display that record. I mean it only shows the data which is saved with that report. I tried with removing tick from "saved data with report" option but that give another error that "cannot connect SQL Server".
In short my report is not "Refreshing" whenever I call that report so plz tell me is there any procedure to refresh that report at run time.
VB Code:
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