关键字:

常见问题

更多>>

最受欢迎的文章

更多>>

最新文章

更多>>

文章存档

  • 2012年06月(6)
  • 2012年07月(83)
  • 2012年08月(62)
  • 2012年09月(30)
  • 2012年10月(8)
  • 2012年11月(11)
  • 2012年12月(9)
  • 2013年01月(7)
  • 2013年02月(1)
  • 2013年03月(1)
  • 2013年04月(1)
  • 2013年05月(2)
  • 2013年06月(1)
  • 2013年07月(2)
  • 2013年08月(4)
  • 2013年09月(4)
  • 2013年10月(3)
  • 2013年11月(2)
  • 2013年12月(1)
  • 2014年01月(1)
  • 2014年03月(1)
  • 2015年06月(2)
  • 2015年10月(1)
  • 2015年11月(9)
  • 2015年12月(2)
  • 2016年02月(1)
  • 2016年04月(1)
  • 2016年05月(16)
  • 2016年07月(4)

热门Tag标签

FastReport.Net v2016.6 FastScript安装 安装 VCL mvc FastReport.Net 报表 FastReport.Net v2016.2 TeeChart,图表开发 FastReport FMX 2.3 FastReport.Net v2016.1 FastReport.Net更新 FastCube VCL v2.5 FastReport VCL FastReport Online Designer教程 FastReport Online Designer组件 FastReport在线报表设计器:组件简介 FastReport在线报表设计器:界面结构简介 FastReport在线报表设计器:工作原理 FastReport Online Designer简介 FastReport Online Designer促销 FastReport Online Designer FastReport.Net授权促销 数据库查询构建 使用技巧 fastreport,报表 脚本引擎 FastScript FastScript, 脚本引擎  OLAP控件 

FastReport用户手册(十二)脚本

作者:zhuhm    来源:本站原创    浏览:Loading...      日期:2012-12-07

虽然脚本的结果取决于所使用的语言,但也有一些共同元素,如脚本的标题,正文,主要程序,这些都会在报表运行的时候执行。本文例举了FastReport所支持的所有语言的脚本例子:

PascalScript结构:

#language PascalScript // optional
program MyProgram; // optional
// the “uses” chapter should be located before any other chapter
uses 'unit1.pas', 'unit2.pas';
var // the “variables” chapter can be placed anywhere
i, j: Integer;
const // “constants” chapter
pi = 3.14159;
procedure p1; // procedures and functions
var
i: Integer;
procedure p2; // nested procedure
begin
end;
begin
end;
begin // main procedure.
end.

C++Script结构:

#language C++Script // optional
// the “include” chapter should be placed before any other chapter
#include "unit1.cpp", "unit2.cpp"
int i, j = 0; // the “variables” chapter can be placed anywhere
#DEFINE pi = 3.14159 // “constants” chapter
void p1() // functions
{ // no nested procedures
}
{ // main procedure.
}

JScript结构:

#language JScript // optionally
// the “import” chapter should be before any other chapter
import "unit1.js", "unit2.js"
var i, j = 0; // the “variables” chapter can be located
anywhere
function p1() // functions
{ //
}
// main procedure.
p1();
for (i = 0; i < 10; i++) j++;

BasicScript结构:

#language BasicScript ' optionally
' the “imports” chapter should be located before Any other chapter
imports "unit1.vb", "unit2.vb"
Dim i, j = 0 ' the “variables” chapter can be placed anywhere
Function p1() ' functions
{ '
}
' main procedure.
For i = 0 To 10
p1()
Next

Tag标签:FastReportVCL 

上一篇: FastReport用户手册(十一)使用子报表的限制事项

下一篇: FastReport用户手册(十三)创建"Hello, World!" 脚本


下载试用 | 技术指南 | 常见问题 | 联系方式 | 法律顾问:欣力律师事务所

慧都科技旗下网站-FastReport中文网版权所有 Copyright 2012

FastReport,报表控件,FastReport报表,VCL报表,.NET报表,COM/ActiveX报表,OLAP控件,联机分析处理