CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2010
    Posts
    4

    HOW TO: Passing a Value from a Form, to a Report.

    Here is my problem in pictures and the best decription i can give.

    This is Form 1 - it has data bound from a local database created in SQL server.

    http://i22.photobucket.com/albums/b3...s050/form1.jpg

    And this is my report

    http://i22.photobucket.com/albums/b3...050/report.jpg

    What i want to do is, through the button on form 1, take whatever data is chosen by the user in the textboxes, through to the report that opens on form 2. So it looks like the below:

    http://i22.photobucket.com/albums/b3.../processed.jpg

    How do i do this?

    Much thanks in advance.

  2. #2
    Join Date
    Sep 2010
    Posts
    5

    Re: HOW TO: Passing a Value from a Form, to a Report.

    Sorry, your pictures do not seem to work.

  3. #3
    Join Date
    Sep 2010
    Posts
    4

    Re: HOW TO: Passing a Value from a Form, to a Report.

    Oh Sorry.

    Basically there was a form, with 3 databound textboxes from my database.
    Then a button.

    I want to make this button, open up a form that has a report in this form.

    The button should be able to pass whatever values are in the textboxes, over to the corresponding textboxes on the form.

    My question is how? Is ther code that has to go under the report load? or do you have to make parameters and pass them, and how?

    Much thanks in advance,
    Stergios.

  4. #4
    Join Date
    Sep 2010
    Posts
    5

    Re: HOW TO: Passing a Value from a Form, to a Report.

    This may help you:

    http://www.vcskicks.com/data-between-forms.php

    I'll shortly try to post a ZIP containing a project that demonstrates this.

  5. #5
    Join Date
    Sep 2010
    Posts
    5

    Re: HOW TO: Passing a Value from a Form, to a Report.

    A VS2008 solution is attached to this message demonstrating passing values between windows forms. Not sure if this will help.
    Attached Files Attached Files
    Last edited by carlsaiyed; September 23rd, 2010 at 11:01 PM.

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

Featured