Results 1 to 3 of 3

Thread: Data Reports

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    1

    Data Reports

    1.i have a dataenviroment with the connection set.
    2.1 command added with the required query.. This is the parent command.
    3. I Add a child command to the parent command.Set the query and the relation with the parent.

    eg.
    data enviroment.
    connection
    command1.
    command2

    this is the heirarchy..

    Now @ run time
    i want to change the query for the command 1 and want the relevant data from command2.
    Thus display records on my report.

    How can i achieve this..

  2. #2
    Addicted Member
    Join Date
    Jul 2004
    Location
    Mumbai
    Posts
    236

    Re: Data Reports

    hi,

    Welcome to the Forums !! try this.,
    VB Code:
    1. Set DataReport1.DataSource = DataEnvironment1
    2. If DataEnvironment1.rsCommand1.State Then DataEnvironment1.rsCommand1.Close
    3. DataEnvironment1.Commands!Command1.CommandText = "Your SQL QUERY HERE"
    4. DataEnvironment1.Command1          ' to execute the query ..
    5.  
    6. DataReport1.Show
    7. DataReport1.Refresh

    But first you have to set the datareport in the design mode. and change only the query in runtime.
    --Kishore...

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

    Re: Data Reports

    This might help also.
    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

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