Results 1 to 6 of 6

Thread: Filter reports by date

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    49

    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

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Filter reports by date

    If your database is Access then could you try this?
    Code:
    DataEnvironment1.rsDailySales_Grouping.Filter = "Date = #" & frmInvoice.lblDate.Caption & "#"
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    49

    Re: Filter reports by date

    No its still not working.

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Filter reports by date

    Does it still raise the error?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    49

    Re: Filter reports by date

    Yes it gives the same error.

  6. #6
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,513

    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
  •  



Click Here to Expand Forum to Full Width