PDA

Click to See Complete Forum and Search --> : filter report


wong
Jan 1st, 2009, 09:20 PM
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

dee-u
Jan 1st, 2009, 09:28 PM
What reporting tool are you using?

wong
Jan 2nd, 2009, 07:28 AM
I use dataenvironment and datareport to create my report.

dee-u
Jan 2nd, 2009, 03:09 PM
You just have to do the filtering on the datasource sql, use a WHERE clause.

wong
Jan 3rd, 2009, 05:47 AM
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

wiz....
Jan 3rd, 2009, 06:04 AM
What is the sql you are using?

wong
Jan 3rd, 2009, 10:16 PM
Select * from Data where Name=Text1.text

RobDog888
Jan 4th, 2009, 04:24 AM
Thread Moved

wes4dbt
Jan 5th, 2009, 02:04 PM
You should setup a parameter in the DataEnvironment, check out the attachment.

You can set the parameter at runtime,

deCropbyuser.Commands("Command1_grouping").Parameters("param1").Value = frmUrange!txtStart
deCropbyuser.Commands("Command1_grouping").Parameters("param2").Value = frmUrange!txtEnd
rptCropbyuser.Show vbModal

dee-u
Jan 5th, 2009, 09:01 PM
When working with DataReports you may want to have a look at this (http://msdn.microsoft.com/en-us/library/aa733655.aspx) MSDN article that discuss it.