使用TQuickRep时报错! 求救!(200分)

  • 主题发起人 主题发起人 fenetdyh
  • 开始时间 开始时间
F

fenetdyh

Unregistered / Unconfirmed
GUEST, unregistred user!
程序实现:
主表
QRBand (rbdetail)

从表一
QRBand (rbGroupHeader)
QRSubDetail
QRBand (rbGroupFooter)

从表二
QRBand (rbGroupHeader)
QRSubDetail
QRBand (rbGroupFooter)

运行程序时【一部分数据A】在被先打印的情况下会报错:
'主程序.exe 应用程序错误'
'应用程序发生异常 未知的软件异常(OxOeedfade),位置为 Ox77e6f142.'
导致只打印了从表一的数据而未打印出从表二的数据。
用sql monitor跟踪程序报错时的运行(数据库用informix):
258 17:37:45 SQL Stmt: Fetch
259 17:37:45 SQL Stmt: EOF
260 17:37:45 SQL Stmt: Reset
261 17:37:45 SQL Stmt: Close
262 17:37:47 SQL Stmt: Fetch
263 17:37:47 SQL Error: The cursor or statement is not
available.
264 17:37:47 SQL Error: Unmapped SQL Error Code: -404
265 17:37:47 SQL Stmt: ERROR
266 17:37:47 SQL Stmt: Reset
,若先打印【部分不会报错的数据B】再打印上述数据A,则打印数据A时不报错。
用delphi单步调试【一部分数据A】未曾报过错。

informix 错误解释:
-404
The cursor or statement is not available.

You probably used a statement that names a cursor that was released with the FREE
statement. Review the program logic and check that the cursor specified is declared
and opened, but not freed, prior to reaching this statement.

If the error occurred on a command that specifies a variable rather than a cursor, the
statement was not prepared before you tried to execute it.

This error can also occur if the cursor or statement is not available because the
connection to the serverdo
es not exist or was lost.



-404 A NULL control block has been passed as an argument.

Review the way the program constructs the sqlda and related data structures;
somehow
it is setting up a null pointer. If the program is in INFORMIX-4GL or another language
in which the sqlda is not constructed directly by the program, or if this statement
only refers to host variables by name, this error should not occur. Contact Informix
Technical Support.

Only Version 4.1 and earlier database servers return this error code with the meaning
shown.
 
为什么不先把二个从表的数据先生成一个中间表,然后动态调用这些字段来打印呢?
 
谢谢答复。
我通过在打印前使用
RegisterPreviewClass(TQRMDIPreviewInterface);
则打印时不再出现上述报错了。
 
多人接受答案了。
 

Similar threads

后退
顶部