Click here to Skip to main content
15,879,844 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello my friends

how can i filter data from data grid view into my report???

i use table in my report, and i set parameters, by using this code i can show one of my data
(in my data grid view we can search, but if data be a one , or tow or more, this code only show one of them.)

i want to placed this searched data in my data grid view in to my report

thanks a lot

VB
'Dim param(0) As ReportParameter
       Dim name(0) As ReportParameter
       Dim fname(0) As ReportParameter
       Dim level(0) As ReportParameter
       Dim from(0) As ReportParameter
       Dim too(0) As ReportParameter
       Dim dur(0) As ReportParameter
       Dim score(0) As ReportParameter
       Dim iss(0) As ReportParameter

       '  param(0) = New ReportParameter("txt", txtrpt.Text)

       name(0) = New ReportParameter("name", TextBox1.Text)
       fname(0) = New ReportParameter("fname", TextBox2.Text)
       level(0) = New ReportParameter("level", TextBox3.Text)
       from(0) = New ReportParameter("from", TextBox4.Text)

       too(0) = New ReportParameter("to", TextBox5.Text)
       dur(0) = New ReportParameter("dur", TextBox6.Text)
       score(0) = New ReportParameter("score", TextBox7.Text)
       iss(0) = New ReportParameter("iss", TextBox8.Text)

       ' Me.rpt3.LocalReport.SetParameters(param)
       Me.rpt3.LocalReport.SetParameters(name)
       Me.rpt3.LocalReport.SetParameters(fname)
       Me.rpt3.LocalReport.SetParameters(level)
       Me.rpt3.LocalReport.SetParameters(from)
       Me.rpt3.LocalReport.SetParameters(too)
       Me.rpt3.LocalReport.SetParameters(dur)
       Me.rpt3.LocalReport.SetParameters(score)
       Me.rpt3.LocalReport.SetParameters(iss)
       Me.rpt3.RefreshReport()
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900