大家好:
现在我遇到这样一个问题,请高手帮忙解决!问题如下:
我现在用FastReport (版本是 2.51)做报表。使用checkbox 控件。数据表中有一个字段,性别栏!字段结构是 nvarhchar(2).
设计要达到的要求是:
当字段值是“男”时,与其对应的CheckBox要打勾,当字段值是“女”时,与其对应的CheckBox要打勾.
但我在运行报表的时候会出现这样的错误:
An error occured during calclating[ADOInfo."lc10"]
Report:fradoinfo
Object:Check1
Could not convert variant of type (OleStr) into type (Double).
已经想了半天了,也没有弄出来。请高手帮忙一下解决。
在此感谢了。
现在我遇到这样一个问题,请高手帮忙解决!问题如下:
我现在用FastReport (版本是 2.51)做报表。使用checkbox 控件。数据表中有一个字段,性别栏!字段结构是 nvarhchar(2).
设计要达到的要求是:
当字段值是“男”时,与其对应的CheckBox要打勾,当字段值是“女”时,与其对应的CheckBox要打勾.
但我在运行报表的时候会出现这样的错误:
An error occured during calclating[ADOInfo."lc10"]
Report:fradoinfo
Object:Check1
Could not convert variant of type (OleStr) into type (Double).
已经想了半天了,也没有弄出来。请高手帮忙一下解决。
在此感谢了。
解决方案 »
- indy10 服务端如何向客户端发送数据
- 高分求《Delphi 6企业级解决方案及应用剖析》或《Delphi 5企业级解决方案及应用剖析》电子版!
- 大家有没有遇到有时候按件按Del根本删除不掉
- 请问SameText()函数具体含义是什么?
- 怎样获得windows的密码(存于.pwl中)?
- 请问如何让 DBGRID 中光标所在的哪行记录上显示颜色?
- "messagedlg的原型"是怎么回事!
- 怎样把TreeView中的数据保存成XML格式的文档
- vclskin 无法对dbgrideh改变皮肤
- QuickReport的问题:如何实现370x250mm这样的报表打印?
- 请问一下,如果使用indy10.2.3的Tidmappedporttcp来开发端口映射工具,性能如何?
- createprocessW应该怎么调用?
直接在frReport 的onBeforPrint 事件写以下代码就可以了。
procedure Tfrmpalc.fradoinfoBeforePrint(Memo: TStringList; View: TfrView);
begin
inherited;
if adoinfo.FieldByName('lc09').AsString ='已婚' then
begin
if View.Name= 'Check6' then Memo.Text := 'True';
if View.Name= 'Check7' then Memo.Text := 'False';
end; if adoinfo.FieldByName('lc09').AsString ='未婚' then
begin
if View.Name= 'Check6' then Memo.Text := 'False';
if View.Name= 'Check7' then Memo.Text := 'True';
end; if adoinfo.FieldByName('lc10').AsString ='男' then
begin
if View.Name= 'Check4' then Memo.Text := 'True';
if View.Name= 'Check5' then Memo.Text := 'False';
end; if adoinfo.FieldByName('lc10').AsString ='女' then
begin
if View.Name= 'Check4' then Memo.Text := 'False';
if View.Name= 'Check5' then Memo.Text := 'True';
end;
end;