Problem with printreport

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kutsaratinidor
    New Member
    • Aug 2007
    • 3

    #1

    Problem with printreport

    hi to all

    im currently having problems with datareport in vb6..i assigned a recordset as a datareport's datasource..and telling it to be printed once a button is clicked..my problem is that when the report is printed,there seems to be a thread that is left running even if i already closed the main window of my program.

    the code i used is below

    Dim freturn As Long
    Set PaySlip.DataSou rce = adoPrimaryRS
    freturn = PaySlip.PrintRe port(True, rptRangeFromTo, 1, 1)

    these lines of codes are inside the click event of button...

    i even tried building the exe file of my program..and when i tried it..task manager indicates that the program is still running even if all the windows are already closed.my vb6 ide shows the same scenario...with the start button unclickable even if the windows were already closed..

    thanks for your help
  • pureenhanoi
    New Member
    • Mar 2007
    • 175

    #2
    Originally posted by kutsaratinidor
    hi to all

    im currently having problems with datareport in vb6..i assigned a recordset as a datareport's datasource..and telling it to be printed once a button is clicked..my problem is that when the report is printed,there seems to be a thread that is left running even if i already closed the main window of my program.

    the code i used is below

    Dim freturn As Long
    Set PaySlip.DataSou rce = adoPrimaryRS
    freturn = PaySlip.PrintRe port(True, rptRangeFromTo, 1, 1)

    these lines of codes are inside the click event of button...

    i even tried building the exe file of my program..and when i tried it..task manager indicates that the program is still running even if all the windows are already closed.my vb6 ide shows the same scenario...with the start button unclickable even if the windows were already closed..

    thanks for your help
    Thats caused by some code that hide one or more form from your project. Try replacing someForm.Hide or Me.Hide by Unload someForm or Unload Me.
    If this does not take effect, insert End statement into Form_Unload event of Main Form.

    Comment

    • kutsaratinidor
      New Member
      • Aug 2007
      • 3

      #3
      Originally posted by pureenhanoi
      Thats caused by some code that hide one or more form from your project. Try replacing someForm.Hide or Me.Hide by Unload someForm or Unload Me.
      If this does not take effect, insert End statement into Form_Unload event of Main Form.
      thanks pureenhanoi =)
      i did what you advised me and that did the job...thanks a lot..

      Comment

      Working...