1.如何在打开frReport1.Desginer时,加载一个已做好的模板文件。
2.使用报表设计器做完.frf文件后,点击保存如何存在数据库中?(默认是保存成文件),数据库类型用text?image?保存名字如何得到?
3.从数据库中读取又是怎样?高手赐教 。。不胜感激
2.使用报表设计器做完.frf文件后,点击保存如何存在数据库中?(默认是保存成文件),数据库类型用text?image?保存名字如何得到?
3.从数据库中读取又是怎样?高手赐教 。。不胜感激
TfrReport.DesignReport;
2、with ReportEdit do
begin
ReportEdit.FileName:=GV_SysPath+'\PrintFormat\TempRep.frf'; //临时fr文件
if TBlobField(ADOQueryFormat.FieldByName('format')).BlobSize > 10 then //是否有内容
begin
// Clear;
LoadFromBlobField(TBlobField(TField(ADOQueryFormat.FieldByName('format'))));//读取格式内容
end else
Clear;
DesignReport; //设计
if ComponentModified then //设计时有改动
begin
ADOQueryFormat.Edit;
SaveToBlobField(TBlobField(ADOQueryFormat.FieldByName('format')));//保存到数据库
end;
end;
3、同上。
字段类型呢?
谢谢。。
if ComponentModified then //设计时有改动
begin
ADOQueryFormat.Edit;
SaveToBlobField(TBlobField(ADOQueryFormat.FieldByName('format')));//保存到数据库
end;
设计之后啊,不过不是在fr里面写而是在外面写的。
ReportEdit.FileName:=GV_SysPath+'\PrintFormat\TempRep.frf'; //临时fr文件
临时fr文件起了什么作用呢?
1、双击DBGrid的列,如果是格式列,FR设定一个临时的目录和FR文件。
2、创建TBlobField,把格式流读到TBlobField里。
3、FR读取TBlobField的内容,DesignReport。
4、通过FR的ComponentModified 的值来判断格式是否有改动。
5、有的话有SaveToBlobField保存流到格式列里。
TfrReport.DesignReport;没有打开已经在的模板文件呀。。有什么地方还需要设置吗?