社区
数据库及相关技术
帖子详情
FastReport 能不能打印角注
jspxnet
2006-05-02 06:53:32
有些化学元素要打印,比如 H2O (小2) 这样的如何打印
...全文
303
9
打赏
收藏
FastReport 能不能打印角注
有些化学元素要打印,比如 H2O (小2) 这样的如何打印
复制链接
扫一扫
分享
举报
写回复
配置赞助广告
用AI写文章
9 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
jspxnet
2006-05-04
打赏
举报
回复
只能放在frxRichObject中吗?我想放在 Cross1 中,
或者能把 Cross1 表格中的内容替换成frxRichObject吗?
jspxnet
2006-05-03
打赏
举报
回复
就是 string 类型
jspxnet
2006-05-03
打赏
举报
回复
在数据库中就是 H2O 不过我想打印的时候替换成我想要的元素符号。
fastreport 3.20
jspxnet
2006-05-03
打赏
举报
回复
up
CACACACACA
2006-05-03
打赏
举报
回复
/************************************************************
如何在FastReport中打印下标 (FastReport3.18)
风归叶
1.建个表.
CREATE TABLE [test]
(
[ID] [int] NULL ,
[hxys] [char] (20)
)
2.测试数据
insert into test values(1,H2O)
insert into test values(2,H2B3D5G3)
insert into test values(3,H2OY7U8OP2)
3.操作过程的简单描述:
双击frxReport1,加上MasterData(主数据项), 在Masterdata上再拖入一个frxMemoView和
RichText Object.
设置好frxMemoView的DataSet及DataField分别为ADOTable1和ID. 而RichText Ojbect不用
设置,但最好把字体设置大一些.(其它的请自行设置).
4. 为了大家(尤其是新手)的方便,请保留文档完整信息.
**************************************************************/
//CPP文件
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include <locale>
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "frxADOComponents"
#pragma link "frxClass"
#pragma link "frxDBSet"
#pragma link "fs_icpp"
#pragma link "fs_iadortti"
#pragma link "fs_ipascal"
#pragma link "frxRich"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
frxReport1->ShowReport(true);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::frxReport1BeforePrint(TfrxReportComponent *Sender)
{
TfrxRichView *r;
r = dynamic_cast<TfrxRichView *>(Sender);
if( r!=NULL )
{
r->RichEdit->Text = ADOTable1->FieldByName("hxys")->AsString;
String s = r->RichEdit->Text.Trim();
if( !s.IsEmpty() && s.Length()>=2 )
for(int i=1; i<s.Length()+1; i++)
{
if( isdigit(s[i]) )
{
r->RichEdit->SelStart = i-1;
r->RichEdit->SelLength = 1;
TCharFormat Format;
Format.cbSize = sizeof(Format);
Format.dwMask = CFM_OFFSET;
Format.yOffset = -90;
r->RichEdit->SelAttributes->Height = 10;
r->RichEdit->Perform( EM_SETCHARFORMAT, SCF_SELECTION, Longint(&Format) );
}
}
}
}
//---------------------------------------------------------------------------
//.H文件
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "frxADOComponents.hpp"
#include "frxClass.hpp"
#include "frxDBSet.hpp"
#include <ADODB.hpp>
#include <DB.hpp>
#include "fs_icpp.hpp"
#include "fs_iadortti.hpp"
#include "fs_ipascal.hpp"
#include "frxRich.hpp"
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TfrxADOComponents *frxADOComponents1;
TfrxDBDataset *frxDBDataset1;
TButton *Button1;
TADOTable *ADOTable1;
TfsCPP *fsCPP1;
TfsPascal *fsPascal1;
TfsADORTTI *fsADORTTI1;
TMemo *Memo1;
TfrxRichObject *frxRichObject1;
TfrxReport *frxReport1;
void __fastcall Button1Click(TObject *Sender);
void __fastcall frxReport1BeforePrint(TfrxReportComponent *Sender);
private:
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
CACACACACA
2006-05-03
打赏
举报
回复
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "frxADOComponents.hpp"
#include "frxClass.hpp"
#include "frxDBSet.hpp"
#include <ADODB.hpp>
#include <DB.hpp>
#include "fs_icpp.hpp"
#include "fs_iadortti.hpp"
#include "fs_ipascal.hpp"
#include "frxRich.hpp"
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TfrxADOComponents *frxADOComponents1;
TfrxDBDataset *frxDBDataset1;
TButton *Button1;
TADOTable *ADOTable1;
TfsCPP *fsCPP1;
TfsPascal *fsPascal1;
TfsADORTTI *fsADORTTI1;
TMemo *Memo1;
TfrxRichObject *frxRichObject1;
TfrxReport *frxReport1;
void __fastcall Button1Click(TObject *Sender);
void __fastcall frxReport1BeforePrint(TfrxReportComponent *Sender);
private:
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
CACACACACA
2006-05-03
打赏
举报
回复
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include <locale>
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "frxADOComponents"
#pragma link "frxClass"
#pragma link "frxDBSet"
#pragma link "fs_icpp"
#pragma link "fs_iadortti"
#pragma link "fs_ipascal"
#pragma link "frxRich"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
frxReport1->ShowReport(true);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::frxReport1BeforePrint(TfrxReportComponent *Sender)
{
TfrxRichView *r;
r = dynamic_cast<TfrxRichView *>(Sender);
if( r!=NULL )
{
String s = r->RichEdit->Text.Trim();
if( !s.IsEmpty() && s.Length()>=2 )
for(int i=1; i<s.Length(); i++)
{
if( isdigit(s[i]) )
{
r->RichEdit->SelStart = i-1;
r->RichEdit->SelLength = 1;
TCharFormat Format;
Format.cbSize = sizeof(Format);
Format.dwMask = CFM_OFFSET;
Format.yOffset = -90;
Format.yHeight = 0;
r->RichEdit->Perform( EM_SETCHARFORMAT, SCF_SELECTION, Longint(&Format) );
}
}
}
}
CACACACACA
2006-05-02
打赏
举报
回复
另外,H2O在数据库是如何存储的. 用CHAR还是别的方式.
CACACACACA
2006-05-02
打赏
举报
回复
fastreport版本?
SpringCloud系列教程(1)——Eureka注册中心
本文环境 springboot2.0.6 spring cloud 版本是Finchley.SR2 Spring Cloud Eureka 是基于NetflixEureka做了2次封装 有2个组件: Eureka Server 注册中心 Eureka Client 服务注册 -=--------------------------------- 目录 eureka s...
SpringCloud学习笔记(一):搭建Eureka服务和集群
环境版本:Springboot:2.1.0 Springcloud:Finchley.SR2 (一)搭建eureka服务注册中心 1、创建springboot项目 创建springboot项目直接在官网https://start.spring.io生成,可以自由添加依赖项,web、eureka等等。 2、将添加web和eureka依赖的...
SpringCloud注册中心Eureka、Consul、Nacos简单对比
Spring Cloud注册中心对比 Eureka: Netflix公司开源的注册中心,分为Eureka Server和Eureka Client,Eureka Server需要单独作为一个服务发布,启动之后可以在浏览器中打开,Eureka Client则是需要注册到Eureka Server上的服务。 Eureka有自我保护机制,Eureka Server 在运行期间会去统计心跳失败比例在 15...
(三)SpringCloud2.0搭建高可用注册中心
SpringCloud2.0搭建高可用注册中心Eureka高可用原理Eureka集群环境搭建1. eureka-server-01配置2. eureka-server-02配置3. 客户端集成Eureka集群4. 服务启动验证 Eureka高可用原理 默认情况下Eureka是让服务注册中心,不注册自己,Eureka高可用实际上将自己作为服务向其他服务注册中心注册自己,这样就可以形成一组相互注册的服...
Gradle+Springcloud构建项目(二)eureka分布式注册中心
eureka分布式注册中心 说到配置中心大家应该已经很熟悉了,我之前在简书上面也用maven搭建过eureka的配置中心。 简书文章地址 https://www.jianshu.com/p/8d0ca88ecef2 因为时代的发展,如今我们也可以利用gradle来构建eurake配置中心 Gradle+Springcloud构建项目(一) https://blog.csdn.n...
数据库及相关技术
1,178
社区成员
18,938
社区内容
发帖
与我相关
我的任务
数据库及相关技术
C++ Builder 数据库及相关技术
复制链接
扫一扫
分享
社区描述
C++ Builder 数据库及相关技术
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章