文档半岛外围网上直营>>FastReport中文文档>>传递自定义 SQL
传递自定义 SQL
报告可能包含使用数据向导(通过 "数据|添加数据源... "菜单)添加的数据源。有时需要从应用程序中向该数据源传递自定义 SQL。为此,请使用以下代码:
using FastReport.Data;
report1.Load(...);
// do it after loading the report, before running it
// find the table by its alias
TableDataSource table = report1.GetDataSource("MyTable") as TableDataSource;
table.SelectCommand = "new SQL text";
report1.Show();
点击复制
如需下载fastreport最新试用版,请点产品名跳转产品下载页>>

QQ交谈
在线咨询

渝公网安备
50010702500608号

客服热线