如何实现让用户来调整delphi中报表内容的位置 dephi做的程序,要打印的报表中各项内容的位置要根据实际情况来确定,用户要求能自己调整位置。怎样实现?用哪个报表控件更好?谢谢各位大侠!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以根据用户输入位置值来设定qrdbtext的位置 我用QuickReport做过, QRDBText QRLable 均可,只须改变Top,Left属性即可.用户通过鼠标移动改变QRlable位置, 保存 TOP,Left 信息,打印时读取即可! to: xjh1968 我现在用的就是quickreport,但我不知道在什么状态下使用户通过鼠标来移动改变qrlabel的位置,预览时吗?那是好像没法移动啊?请指教,我对这个很不熟悉。 胡扯,都喜欢把简单的事情复杂化吗,保存位置属性,下次进入又恢复原样了,不至于再保存这些个信息吧用Rave或Fastreport均可,调用报表自身的方法,Design,可调出设计页面 对不起,niccctvcom,来晚了!方法如下:不能在预览时移动,你可先建一个对照,如移动 statictext1 保留.top .left数据预览或打打印赋给 qrlabel1.top,qrlabel1.left鼠标移动控件代码:var MouseDownSpot : TPoint; Capturing : bool;procedure TYiLiaoKangFuForm.StaticText1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin SetCapture(statictext1.Handle); Capturing :=true; MouseDownSpot.X := X; MouseDownSpot.Y := Y;end;procedure TYiLiaoKangFuForm.StaticText1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);begin if Capturing then begin StaticText1.Left := StaticText1.Left - (MouseDownSpot.X-X); StaticText1.Top := StaticText1.Top - (MouseDownSpot.Y-Y); end;end;procedure TYiLiaoKangFuForm.StaticText1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin if Capturing then begin ReleaseCapture; Capturing := False; //移动Panel5当前位置 StaticText1.Left := StaticText1.Left - (MouseDownSpot.X-X); StaticText1.Top := StaticText1.Top - (MouseDownSpot.Y-Y); end;end; 进度条 遇到一个问题 如何将 edit 中的内容赋值给一个数组 问一个函数问题? ado的第一步! ADO异步模式查询问题?请高手帮忙 中秋快乐 大吓指点:关于PopupEdit自动下拉的问题 怎样才能在stringGrid的表格里画图??????????????? 如何在一個form顯示一個非模態窗體﹖ 急!如何预览和打印stringgrid里的内容,能够支持分页 怎么用delphi将一连串jpeg存在一个文件上?
我现在用的就是quickreport,但我不知道在什么状态下使用户通过鼠标来移动改变qrlabel的位置,预览时吗?那是好像没法移动啊?请指教,我对这个很不熟悉。
用Rave或Fastreport均可,调用报表自身的方法,Design,可调出设计页面
Capturing : bool;procedure TYiLiaoKangFuForm.StaticText1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
SetCapture(statictext1.Handle);
Capturing :=true;
MouseDownSpot.X := X;
MouseDownSpot.Y := Y;
end;procedure TYiLiaoKangFuForm.StaticText1MouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
begin
if Capturing then
begin
StaticText1.Left := StaticText1.Left - (MouseDownSpot.X-X);
StaticText1.Top := StaticText1.Top - (MouseDownSpot.Y-Y);
end;
end;procedure TYiLiaoKangFuForm.StaticText1MouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if Capturing then
begin
ReleaseCapture;
Capturing := False;
//移动Panel5当前位置
StaticText1.Left := StaticText1.Left - (MouseDownSpot.X-X);
StaticText1.Top := StaticText1.Top - (MouseDownSpot.Y-Y);
end;
end;