CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    218

    print problem in VB

    Dear All,
    How to print out the specify format in VB? e.g. I have a form to record all students' records, included score, student ID. sex ect. If i select one student and print out his record in specify format like

    Name: XXX sex:M
    student no.: 06XXXX
    address:........
    sujects scords
    Maths 50
    physics 90
    Biology 70
    ...................................................
    How to print it out? Thank you.

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: print problem in VB

    Take a look at Data Reports.

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: print problem in VB

    Much easier to display it in a small form, and then use PrintForm to print the actual form.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Feb 2004
    Posts
    218

    Re: print problem in VB

    Sorry, where is the data reports?
    If the data show in the form and use printform, does it just show what you can see on the screen, but not the all?Thank you.

  5. #5
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: print problem in VB

    Have them hit a DISPLAY RECORD button, which would load your form to be printed, and then include a PRINT or EXIT button for them to print it. (When they hit the PRINT button, you could then HIDE the buttons)

    The form will print out exactly as it appears on screen, which means that it has to be small enough to print out correctly if displayed in a lower resolution.

    You can even move the form around on the page, provided that it isn't too big to appear.

    A report is overkill to print only one record.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  6. #6
    Join Date
    Feb 2004
    Posts
    218

    Re: print problem in VB

    I have a lot of rows in the data grid, printform just can print what be showed on the screen, can I print out all those data out just like the EXCEL in VB Form? means it maybe print out 2 pages or more

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