如何动态设定纸张方向?横 or 纵

来源:互联网  时间:2016/7/18 14:27:57

关于网友提出的“ 如何动态设定纸张方向?横 or 纵”问题疑问,本网通过在网上对“ 如何动态设定纸张方向?横 or 纵”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题: 如何动态设定纸张方向?横 or 纵
描述:

我用frprintgrid打印dbgrid;
在form上加了两个button1,button2
代码如下:
procedure TForm_print_change.Button4Click(Sender: TObject);
begin
  form_print_change.frPrintGrid1.Orientation := poLandscape;
end;
procedure TForm_print_change.Button5Click(Sender: TObject);
begin
  form_print_change.frPrintGrid1.Orientation := poPortrait;
end;
但是运行时保错,为什么,请指教!!


解决方案1:

(Sender as TBaseReport).Orientation:=poLandScape;
poLandScape
poDefault
poPortrait

解决方案2:

uses printers
代码无问题

上一篇如何编程实现获得SQL Server 服务器的服务器名和用户名,有相应的函数吗?
下一篇程序出现Access violation at address 00428C12
明星图片
相关文章
《 如何动态设定纸张方向?横 or 纵》由码蚁之家搜集整理于网络,
联系邮箱:mxgf168#qq.com(#改为@)