I make a program using vb6, and link the database using adodc connection, I make also a report using the DataReport and DataEnvironment . When I print my report for the first time, It works very fine, but when i print it again using another entry the last report will be printed. I have to restart my program so that I can print another entry. Can anyone give me a solution to this prob. any help will be highly appreciated.
VB6 Report problem, need help
Collapse
X
-
Tags: None
-
Hi
I'm not sure to say.
But try this. Check whether u are loading the new report screen on each button click. There may be chances for your previous dataenvironment report existence. Unload the previous one and print it.
-soamskarthic
Originally posted by dalejasperI make a program using vb6, and link the database using adodc connection, I make also a report using the DataReport and DataEnvironment . When I print my report for the first time, It works very fine, but when i print it again using another entry the last report will be printed. I have to restart my program so that I can print another entry. Can anyone give me a solution to this prob. any help will be highly appreciated. -
Originally posted by somaskarthicHi
I'm not sure to say.
But try this. Check whether u are loading the new report screen on each button click. There may be chances for your previous dataenvironment report existence. Unload the previous one and print it.
-soamskarthic
Hi
try this
myreport.refres h........
myreport.show
unload myreport
I guess it should work...cause it worked for me...Comment
-
u can use the foloowing code before the print command of datareport
DataEnvironment 1.rsCommand1.Op en
DataEnvironment 1.rsCommand1.Re query
DataEnvironment 1.rsCommand1.Cl ose
if ur command is command1 then u have to use rscommand1
if the above will not work then
open the table from which u r taking printout and make use requery command and then close it using record setComment
Comment