Another Printing Question...

billy_bob169

Active member
Joined
Jan 30, 2003
Messages
32
Location
Minnesota
I have managed to load a disconnected dataset, which is then used to populate my datagrid, but now I must find a way to print it all. When I say all, it entails multiple user text box inputs, and the datagris/datatable that is derived from those inputs. Is there anyway to write a blank report in crystal, and pass values to formulas within the report from visual basic? Or am I better off writing everything to a text file, then sending that to a printer? I would really like to include a graphic on the printed page, but I am open to suggestions of an kind. Thanks....
 
I tried what Robby recomended, but the code gets pretty ugly, and for some reason, some of the info that shows in the print preview, doesnt print. It is info that is within a loop. Any suggestions or other alternatives?
 
Yeah it is ugly, but it should print whatever you see in the preview, I dont know much more than that.
 
I am looping through a data table to create rows and columns, and they show in the prview window, but they arent printing. I am not quite sure what is going on yet, but I will post again when I figure it out...
 
Hmm, I had previously only prviewed the report, I tried to print it and youre right, it only prints the headings.

Ill play around with it and post back in a few minutes.
 
The idiot that put this sample together (not me) forgot to reset the itm count whent he preview is finished.

Ill fix it in a sec.
 
easy solution... Reset the itm when the preview is finished (as well as the actual print page)

Place the following in your code.
Code:
    Private Sub PrintDocument1_EndPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles PrintDocument1.EndPrint
        itm = 0
    End Sub
 
Back
Top