Hello Friends,

My problem is I want to accept value from user which I am nt storing in databasse. I am using inputbox to get value from user and then I want to print the same value in the crystal report. I am not using crystal report viewer, but I've used crstyal report's ocx and from there i am opening report by using printreport method of the crystal report's ocx control. plz help me.

below is my code which i m using to print report


VB Code:
  1. With crStudList
  2.         .Connect = strConn
  3.         .ReportFileName = App.Path & "\reports\StudentList.rpt"
  4.         .ReportTitle = "Student List"
  5.         .WindowTitle = "Student List"
  6.         '.SelectionFormula = "{tblStudent.RegistrationDate}>= DateValue (" & dtpFrom.Value & ") and {tblStudent.RegistrationDate}<= DateValue(" & dtpTo.Value & ")"
  7.         .SelectionFormula = "{tblStudent.RegistrationDate}>=#" & Format(dStartDate, "dd/MM/yyyy") & "# and {tblStudent.RegistrationDate}<=#" & dEndDate & "#"
  8.                 .Destination = crptToPrinter
  9.         .PrintReport
  10.  
  11.     End With

where crStudList the name of ocx control of crystal report

thanks