How to filter the data ?
Hello,
I am looking for the solution how to display the data in the underlying tables only for the selected topic via combobox or data selector.
I have hierarchical structure in my database.
Design of the report: also in hierarchical databands
data1
data2
data3 etc.
To display the report I have a button with this code:
Report4.RegisterData(Me.OperaDS, "operaDS")
Try
Dim db1 As FastReport.DataBand = DirectCast(Report4.FindObject("Data1"), FastReport.DataBand)
db1.DataSource = Report4.GetDataSource("projet")
Dim db2 As FastReport.DataBand = DirectCast(Report4.FindObject("Data2"), FastReport.DataBand)
db2.DataSource = Report4.GetDataSource("chapCCTPpro")
Dim db3 As FastReport.DataBand = DirectCast(Report4.FindObject("Data3"), FastReport.DataBand)
db3.DataSource = Report4.GetDataSource("CCTPCatpro")
Dim db4 As FastReport.DataBand = DirectCast(Report4.FindObject("Data4"), FastReport.DataBand)
db4.DataSource = Report4.GetDataSource("CCTPPrestpro")
Report4.Dictionary.UpdateRelations()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
Me.Report4.Show()
End Try
Me.Report4.Dispose()
The report shows all the data . I need to display only the data for the selected project.
Using the combobox or the data selector changes only the name of the project , but not the data in the next tables.
Thanks
I am looking for the solution how to display the data in the underlying tables only for the selected topic via combobox or data selector.
I have hierarchical structure in my database.
Design of the report: also in hierarchical databands
data1
data2
data3 etc.
To display the report I have a button with this code:
Report4.RegisterData(Me.OperaDS, "operaDS")
Try
Dim db1 As FastReport.DataBand = DirectCast(Report4.FindObject("Data1"), FastReport.DataBand)
db1.DataSource = Report4.GetDataSource("projet")
Dim db2 As FastReport.DataBand = DirectCast(Report4.FindObject("Data2"), FastReport.DataBand)
db2.DataSource = Report4.GetDataSource("chapCCTPpro")
Dim db3 As FastReport.DataBand = DirectCast(Report4.FindObject("Data3"), FastReport.DataBand)
db3.DataSource = Report4.GetDataSource("CCTPCatpro")
Dim db4 As FastReport.DataBand = DirectCast(Report4.FindObject("Data4"), FastReport.DataBand)
db4.DataSource = Report4.GetDataSource("CCTPPrestpro")
Report4.Dictionary.UpdateRelations()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
Me.Report4.Show()
End Try
Me.Report4.Dispose()
The report shows all the data . I need to display only the data for the selected project.
Using the combobox or the data selector changes only the name of the project , but not the data in the next tables.
Thanks
Comments
Could you attach your report file (.frx) here (or send it to tz@fast-report.com)?
I am able to select my data via the data selector.
Now I can see my data only one time, if I want to change the name of the project 2th time
I have an error " Object reference not set to an instance of an object" and in Visual Studio "System.NullReferenceException".
I will attach the report file later ( The upload is not working)
I like the fast report and I hope you will help me to fix this little problem.