Can anybody teach me how to filter report based on user input in textbox?I'm using vb6.I want to display results from Access database from user with same name.Thanks
Printable View
Can anybody teach me how to filter report based on user input in textbox?I'm using vb6.I want to display results from Access database from user with same name.Thanks
What reporting tool are you using?
I use dataenvironment and datareport to create my report.
You just have to do the filtering on the datasource sql, use a WHERE clause.
I tried using a SELECT query but when i run it,there will be error.The error is:The parameter Text1.text has no default value
What is the sql you are using?
Select * from Data where Name=Text1.text
Thread Moved
You should setup a parameter in the DataEnvironment, check out the attachment.
You can set the parameter at runtime,
Code:deCropbyuser.Commands("Command1_grouping").Parameters("param1").Value = frmUrange!txtStart
deCropbyuser.Commands("Command1_grouping").Parameters("param2").Value = frmUrange!txtEnd
rptCropbyuser.Show vbModal
When working with DataReports you may want to have a look at this MSDN article that discuss it.