永发信息网

Fastreport3.studio 如何对其预览中的按钮进行隐藏

答案:1  悬赏:80  手机版
解决时间 2021-01-31 06:43
  • 提问者网友:眉目添风霜
  • 2021-01-30 21:23
Fastreport3.studio 如何对其预览中的按钮进行隐藏我使用的是VS2005想隐藏导出等功能,不知道有什么办法!!
最佳答案
  • 五星知识达人网友:未来江山和你
  • 2021-01-30 22:43
procedure ReportOnStartReport(Sender: TfrxComponent);
begin
//全部
//Report.PreviewOptions.Buttons :=pbEdit+pbExport+pbFind+pbLoad+pbNavigator+pbPageSetup+pbPrint+pbSave+pbTools+pbZoom;
//不显示导出
Report.PreviewOptions.Buttons :=pbEdit+pbFind+pbPageSetup+pbPrint+pbSave+pbTools+pbZoom;
end;
使用.net调用 using System;
using System.Data;
using System.Windows.Forms;
using FastReport;
using FRInterop;

namespace FRDemo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen;
FastReportService service = FastReportService.Instance;
service.CustomRegSvr = true;
service.InitializeService();
Application.ThreadExit += new EventHandler(Application_ThreadExit);

}

void Application_ThreadExit(object sender, EventArgs e)
{
FastReportService.Instance.UnloadService();
}

static DataSet GetDataSource()
{
DataSet ds = new DataSet();
ds.ReadXml(String.Format("{0}\\customer.xml", Application.StartupPath));
return ds;
}
private void button1_Click(object sender, EventArgs e)
{
FastReportService.Instance.ShowDesigner(delegate(TfrxReport report) { report.MainWindowHandle = (int)this.Handle; },
null, GetDataSource(), null, String.Format("{0}\\Simple list.fr3", Application.StartupPath), null);
}
private void button2_Click(object sender, EventArgs e)
{
FastReportService.Instance.ShowReport(null, null, GetDataSource(), true, false, null,
String.Format("{0}\\Simple list.fr3", Application.StartupPath));
}

private void button3_Click(object sender, EventArgs e)
{
FastReportService.Instance.ShowDesigner((int)this.Handle, GetDataSource());
}
}
}
不需要初始化的 ,只要开始调用一次取消即可
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯