一个关于DevExpress ExpressPrinting System Suite 的问题,

nb20022 2002-07-24 07:43:54
一个关于DevExpress ExpressPrinting System Suite 的问题,
代码如下,已经用ADOCOONETION连上数据库,并且在AOOQUERY中写好SQL语句
DATASOURCE指向ADOQUERY,并且在DXDBGRId指向DATASOURCE,
代码如下,但是按下按钮,打印预览出不来,硬盘转几下后没反应,请问如何解决.


unit dy;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev,
StdCtrls, Buttons, dxPSCore, dxPSdxTLLnk, dxPSdxDBCtrlLnk, dxPSdxDBGrLnk,
dxTL, dxDBCtrl, dxDBGrid, DB, ADODB, dxCntner;

type
TForm1 = class(TForm)
ADOConnection1: TADOConnection;
ado_q: TADOQuery;
DataSource1: TDataSource;
Button1: TButton;
dx1: TdxDBGrid;
pr1: TdxComponentPrinter;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);

private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}



procedure TForm1.FormCreate(Sender: TObject);
var
s,i:integer;
begin
ado_q.Active:=true;
s:=ado_q.FieldCount;

for i:=0 to s-1 do begin
with dx1.CreateColumn(tdxdbgridcolumn) as tdxdbgridcolumn do begin
index:=i;
caption:='ewq';
fieldname:=ado_q.FieldDefList[i].Name;
end;

end;
dx1.KeyField:=ado_q.FieldDefList[0].Name;

end;



procedure TForm1.Button1Click(Sender: TObject);
var
// a:integer

link1:tdxdbgridreportlink;
begin

link1:=tdxdbgridreportlink.create(nil);
link1.Component:=dx1;
link1.Active:=true;

pr1.CurrentLink:=link1;
//link1.Active:=true;

pr1.Preview(true,nil);
end;

end.
...全文
50 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
nb20022 2002-07-25
  • 打赏
  • 举报
回复
up
nb20022 2002-07-24
  • 打赏
  • 举报
回复
up
cdimp 2002-07-24
  • 打赏
  • 举报
回复
帮不了你,帮你UP!
The ExpressPrinting System is an advanced data rendering and printing system specifically designed to bring your UI to the printed page. Via its Report Link technology, the ExpressPrinting System allows you to output the contents of VCL controls such as the ExpressQuantumGrid and ExpressMasterView - as well as many others - to paper, while giving you and your users immaculate control over print attributes such as Font, Color, Headers, and Footers. Like all Developer Express technologies, the ExpressPrinting System helps you put control back into the hands of your end-users via a runtime interface that is easy to use, with an astounding level of flexibility. It gives you the power to quickly add unlimited reporting to your programs without designing a single report! When you combine the ExpressPrinting System with the ExpressQuantumGrid or ExpressMasterView, you get the threefold benefit of eliminating the tedium associated with creating traditional banded reports, greatly reducing development time, and putting flexibility back into the hands of your users. No longer will you have to create and re-create reports because of simple changes to your database or requests by users to group/sort data by new columns. No longer will you have to pull your hair out when a user requests a new report that was not in the original spec. By combining the ExpressPrinting System with the QuantumGrid and/or MasterView controls, your end-users can arrange data in any manner they see fit, and then print the contents of the control exactly as it appears on-screen. For more information: http://www.devexpress.com
Embarcadero Delphi & C++Builder 2010--XE10.2 这个资源两个包,资源包名称如下: DevExpress_VCL_16.2.5_Full_Source.part1 DevExpress_VCL_16.2.5_Full_Source.part2 DEVELOPER EXPRESS INC Delphi/C++Builder Controls Copyright (C) 1998-2017 Developer Express Inc. Embarcadero Delphi & C++Builder 2010--XE10.2 这个资源两个包,资源包名称如下: DevExpress_VCL_16.2.5_Full_Source.part1 DevExpress_VCL_16.2.5_Full_Source.part2 DEVELOPER EXPRESS INC Delphi/C++Builder Controls Copyright (C) 1998-2017 Developer Express Inc. ExpressQuantumGrid SUITE SOFTWARE COMPONENT PRODUCT ExpressBars SUITE SOFTWARE COMPONENT PRODUCT ExpressPrinting System SUITE SOFTWARE COMPONENT PRODUCT ExpressScheduler SUITE SOFTWARE COMPONENT PRODUCT ExpressPivotGrid SUITE SOFTWARE COMPONENT PRODUCT ExpressQuantumTreeList SUITE SOFTWARE COMPONENT PRODUCT ExpressVerticalGrid SUITE SOFTWARE COMPONENT PRODUCT ExpressNavBar SUITE SOFTWARE COMPONENT PRODUCT ExpressLayout Control SUITE SOFTWARE COMPONENT PRODUCT ExpressSpellChecker SUITE SOFTWARE COMPONENT PRODUCT ExpressSkins Library SUITE SOFTWARE COMPONENT PRODUCT ExpressSpreadSheet SUITE SOFTWARE COMPONENT PRODUCT ExpressDBTree SUITE SOFTWARE COMPONENT PRODUCT ExpressOrgChart SUITE SOFTWARE COMPONENT PRODUCT ExpressFlowChart SUITE SOFTWARE COMPONENT PRODUCT ExpressTile Control SUITE SOFTWARE COMPONENT PRODUCT ExpressWizard Control SUITE SOFTWARE COMPONENT PRODUCT ExpressMap Control SUITE SOFTWARE COMPONENT PRODUCT ExpressGauge Control SUITE SOFTWARE COMPONENT PRODUCT ExpressRichEdit Control SUITE SOFTWARE COMPONENT PRODUCT ExpressPDFViewer SUITE SOFTWARE COMPONENT PRODUCT

5,928

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧