-
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
-
You can print MsFlexGrid like this:
Code:
Private Sub Command1_Click()
Printer.PaintPicture MSFlexGrid1.Picture, 0, 0
Printer.EndDoc
End Sub
-
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
-
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!
-
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)...
-
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
-
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 ? :confused: