|
-
Jan 8th, 2009, 09:04 AM
#1
Thread Starter
Member
Filter reports by date
Hi,
Im using DataEnvironment to create reports. Ive used command named DailySales_Grouping which is grouped by Bill Number. The following is the code to filter data is placed in the cmdShowReport click event. The problem is that it displays error saying Failed getting rowset from the current datasource. Could someone help me with this?
Code:
DataEnvironment1.rsDailySales_Grouping.Filter = "Date = " & frmInvoice.lblDate.Caption & ""
rptDailySales.Refresh
If rptDailySales.Visible = False Then rptDailySales.Show
-
Jan 8th, 2009, 09:18 AM
#2
Re: Filter reports by date
If your database is Access then could you try this?
Code:
DataEnvironment1.rsDailySales_Grouping.Filter = "Date = #" & frmInvoice.lblDate.Caption & "#"
-
Jan 8th, 2009, 09:45 AM
#3
Thread Starter
Member
Re: Filter reports by date
No its still not working.
-
Jan 8th, 2009, 09:47 AM
#4
Re: Filter reports by date
Does it still raise the error?
-
Jan 8th, 2009, 10:00 AM
#5
Thread Starter
Member
Re: Filter reports by date
Yes it gives the same error.
-
Jan 9th, 2009, 03:51 PM
#6
Re: Filter reports by date
See what happens when you try this,
Code:
msgbox frmInvoice.lblDate.Caption
It looks like the code in post 2 should work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|