×

fastreport3 0 studio

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

admin admin 发表于2024-05-25 09:55:49 浏览22 评论0

抢沙发发表评论

各位老铁们,大家好,今天由我来为大家分享fastreport3 0,以及Fastreport3.studio 如何对其预览中的按钮进行隐藏的相关问题知识,希望对大家有所帮助。如果可以帮助到大家,还望关注收藏下本站,您的支持是我们最大的动力,谢谢大家了哈,下面我们开始吧!

本文目录

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

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()); } }}不需要初始化的 ,只要开始调用一次取消即可

C#如何调用Fastreport

引用:FastReport.dll,FastReport.Bars.dll,FastReport.Editor.dll设计好**.frx 文件代码:DataSet FDataSet = new DataSet();DataTable table = new DataTable();table.TableName = "Items";FDataSet.Tables.Add(table);table.Columns.Add("id", typeof(int));table.Columns.Add("aaa", typeof(string));table.Rows.Add(0,"ab");table.Rows.Add(1,"abc");FastReport.Report report1 = new FastReport.Report();try{// load the existing reportreport1.Load("***.frx");// register the datasetreport1.RegisterData(FDataSet);report1.GetDataSource("Items").Enabled = true;// run the reportreport1.Show();}catch (Exception ex){MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);}finally{// free resources used by reportreport1.Dispose();}

关于fastreport3 0,Fastreport3.studio 如何对其预览中的按钮进行隐藏的介绍到此结束,希望对大家有所帮助。