Results 1 to 3 of 3

Thread: Filter records in child command of heirarcheical commands in data environment.

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    6

    Filter records in child command of heirarcheical commands in data environment.

    Good day!

    I need help with doing my data report. Its data source is a dataenvironment and I am using a heirarcheical commands. I have one command and it has one child command. Now I want to filter the records returned in the child command on runtime based on two range of dates. My table are Customers (idno, lastname,firstname) and orders (idno, product_no, price).

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Filter records in child command of heirarcheical commands in data environment.

    Moved To Reporting

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

    Re: Filter records in child command of heirarcheical commands in data environment.

    You may not need a child command. In the SQL section of the Command use a "join".
    Code:
    select * from orders inner join customers on orders.idno=customers.idno where datefield >= ? and datefield <= ?
    Then at runtime
    Code:
    de1.Commands("Command1").Parameters("param1").value = somedate1
    de1.Commands("Command1").Parameters("param2").value = somedate2
    this is just an example, you will have to adjust it for your needs.

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