Results 1 to 7 of 7

Thread: printing a form with msflexi grid control on it

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 1999
    Location
    Sunnyvale,CA,USA
    Posts
    2

    Post

    Hi all,
    I want to print a form using printform method.
    I've msflex grid control with data(from sql query) on it.I could print the whole form except flexgrid control with its contents.

    Instead of printing flex grid control with data in it,i'm getting empty flexgrid control with black color on it.even column titles are also not visible.

    what's the solution.appreciate earliest reply.

    Thanks
    Ajay

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    You can print MsFlexGrid like this:

    Code:
    Private Sub Command1_Click()
        Printer.PaintPicture MSFlexGrid1.Picture, 0, 0
        Printer.EndDoc
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 1999
    Location
    Sunnyvale,CA,USA
    Posts
    2

    Post

    Hi Serge,
    Thanks for the reply.

    But MsFlex grid control is one control on the form.
    I want to print the entire form including Msflex grid control contents with PrintForm method.

    I'am able to print everything except contents of flexgrid control.

    How to go about this

    Ajay

  4. #4
    Addicted Member brookema's Avatar
    Join Date
    Jul 2002
    Location
    Washington DC
    Posts
    161
    I am having the same problem. Does anyone know a solution? I've tried to change all the properties related to color to = vbWhite before printing, but it still prints solid black.

    Thanks!

  5. #5
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    My suggestion is to loop thru all the rows and print the grid manually... this is what I do. (I never could get the picture thing to work either)...
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  6. #6
    Addicted Member brookema's Avatar
    Join Date
    Jul 2002
    Location
    Washington DC
    Posts
    161
    There is a bug with VB 6 and MS Flex grid. There is a simple solution though -> use the MSHFlexGrid ctrl instead

    http://support.microsoft.com/default...S;Q237816&FR=1

    I just did this today and it works great with almost no recoding

  7. #7
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    OK say this does work. What if there are more rows in the grid than waht is being displayed? Then it prints on the image, not the fiull contents of the grid, right ?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

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