home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.paradox      To crash or not to crash, asks Borland      9,834 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,686 of 9,834   
   Kenneth to jim.giner@suny.edu   
   Re: Report print problem...?   
   06 Apr 09 16:35:28   
   
   From: usenet@soleSPAMLESSassociates.com   
      
   On Mon, 6 Apr 2009 16:10:49 -0400, "Jim Giner"   
    wrote:   
   >   
   >"Kenneth"  wrote in message   
   >news:avikt4pu488t6v0csni1hbap1hekrho493@4ax.com...   
   >> Howdy,   
   >>   
   >> Running P9 with XP   
   >>   
   >> I have a button with several blocks of code on it.   
   >>   
   >> Usually, all works well.   
   >>   
   >> The portion below runs a query, loads a report, and prints   
   >> the report.   
   >>   
   >> Sometimes however, the report fails to print.   
   >>   
   >> It generates no errors, and if it fails to print, and I then   
   >> view the report manually, it looks fine, and manually prints   
   >> properly.   
   >>   
   >> I have had problems with code to print reports in the past,   
   >> and for many of them, have gone to Microsoft Word for the   
   >> actual printing.   
   >>   
   >> I could do that for this purpose, but before I do, thought   
   >> to ask:   
   >>   
   >> Might you see a problem with the code below?   
   >>   
   >>   
   >> qInv = Query   
   >>   
   >> ANSWER: :MONEY:INVOICE.DB   
   >>   
   >> :MONEY:INVOICES.DB | Num   | InvNumber  | Replaces | Last | First  |   
   >> | Check _join1 | Check ~newInvNumber | Check |   
   >> Check as LastNameField  | Check  |   
   >>   
   >> :MONEY:INVOICES.DB | Adr    | Purpose | InvDate | DueDate | DUE    |   
   >> RECEIVED |   
   >> | Check  | Check   | Check   | Check   | Check   
   >> | Check    |   
   >>   
   >> :MONEY:INVOICES.DB | Balance | Tag    | Comment | ReplaceNote |   
   >> | Check   | Check  | Check   | Check       |   
   >>   
   >> ADDRESS.DB | Num    | L7     | L6     | L5     | L4     | L3   
   >> | L2     |   
   >>   | _join1 | Check  | Check  | Check  | Check  | Check   
   >> | Check  |   
   >>   
   >> ADDRESS.DB | L1     | City   | State  | Zip    | Inv  |   
   >>   | Check  | Check  | Check  | Check  | True |   
   >>   
   >> EndQuery   
   >>   
   >> if not executeQBE(qInv) then   
   >> errorShow()   
   >> return   
   >> endIf   
   >>   
   >> if not r.load(":MONEY:Invoice",winStyleHidden) then   
   >> errorShow()   
   >> return   
   >> endIf   
   >>   
   >> r.pastDueText.visible=FALSE   
   >> r.pastDueBox.visible=FALSE   
   >> r.balanceLabel.visible=FALSE   
   >> r.balance.FONT.COLOR=WHITE   
   >> r.receivedLabel.visible=FALSE   
   >> r.received.FONT.COLOR=WHITE   
   >> r.matures.visible=true   
   >> r.line.visible=false   
   >> r.save()   
   >> if not r.close() then   
   >> errorShow()   
   >> return   
   >> endIf   
   >>   
   >> if not r.print(":MONEY:Invoice") then   
   >> errorShow()   
   >> return   
   >> endIf   
   >>   
   >>   
   >> Sincere thanks,   
   >> --   
   >> Kenneth   
   >>   
   >> If you email... Please remove the "SPAMLESS."   
   >   
      
      
   >On the surface (meaning I didn't debug your query or compare your field   
   >names to that query) it looks pretty straight-forward.  You're saying that   
   >the last part (r.print) is the part that fails?  Are you sure that the Print   
   >actually fails, and it's not the fault of the r.close failing and causing a   
   >Return?  I find that errorshow doesn't alway "show" something - I'd insert a   
   >msgstop in addition so that you always see something if it errors out.   
      
   Hi Jim,   
      
   I know that the problem is not with the query because when   
   the printing fails, I can still open (and print) the report   
   manually, and it looks fine.   
      
   I had not thought of the possibility that a failure to close   
   the report could cause the failure of printing. I will look   
   into that.   
      
   Thanks,   
   --   
   Kenneth   
      
   If you email... Please remove the "SPAMLESS."   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca