Hi everybody and i wish u all a happy new year.
Am working on a project whereby i have to send some informations to a crystal report. Am using Visual Studio 2005. I would like to do some query to the SQL server then do some manipulations with the data and then send some of the data manipulated to report. I can do the query and the manipulation alright but i don't how to send the informations to the text box placed on my report.
Can someone please help?
Thank you.
Dim sDate As New ReportParameter("Report_Parameter_1", CType(DateTimePicker1.Value.ToShortDateString, Date))
Dim eDate As New ReportParameter("Report_Parameter_2", CType(DateTimePicker1.Value.ToShortDateString, Date))
Dim TName As New ReportParameter("Report_Parameter_3", CType(TextBox1.Text, String))
ReportViewer1.LocalReport.SetParameters(New ReportParameter() {sDate, eDate, TName})
ReportViewer1.RefreshReport()
Hi MANNO,
Am having an error with the "ReportParameter" saying the type is not defined. Can u help me on dat?
Plus the scenario is dat:
form1: I will do the data manipulation in the form1 then finally send the information to the form2.
form2: i have a report viewer to load the report file. Informations should be received from form1 by codes onto the report.
Hi MANNO,
Thank you very much for your help. i tried to understand your code but i just couldn't. and it is because i did make myself clear enough. So i'll try explaining better this time, here is the scenario:
I have 3 files: Form1, Form2 and CrytalReport1.rpt(which is the crystal report file)
form1: I will do the data manipulation in the form1 then finally send the information to the form2.
form2: i have a CrystalReportViewer to load the CrystalReport file (CrytalReport1.rpt). Informations should be received from form1 by codes and displayed in the various textbox, placed on the CrytalReport1.rpt .
I hope this one is much clearer. and once again, thank you for helping me.
WaZda
Kleinma,
One more question pls. I have some other print out that should follow the first one. And what am trying to do is,
1.if possible, get to know the printer the user selected then use that printer for the other printings.
2. Freeze the app with some progress bar to wait till the end of all the printings before going back to it.
Thank you for your help. Coz u r really helping me and i appreciate that.