沒(méi)有找到合適的產(chǎn)品?
聯(lián)系客服協(xié)助選型:023-68661681
提供3000多款全球軟件/控件產(chǎn)品
針對(duì)軟件研發(fā)的各個(gè)階段提供專業(yè)培訓(xùn)與技術(shù)咨詢
根據(jù)客戶需求提供定制化的軟件開(kāi)發(fā)服務(wù)
全球知名設(shè)計(jì)軟件,顯著提升設(shè)計(jì)質(zhì)量
打造以經(jīng)營(yíng)為中心,實(shí)現(xiàn)生產(chǎn)過(guò)程透明化管理
幫助企業(yè)合理產(chǎn)能分配,提高資源利用率
快速打造數(shù)字化生產(chǎn)線,實(shí)現(xiàn)全流程追溯
生產(chǎn)過(guò)程精準(zhǔn)追溯,滿足企業(yè)合規(guī)要求
以六西格瑪為理論基礎(chǔ),實(shí)現(xiàn)產(chǎn)品質(zhì)量全數(shù)字化管理
通過(guò)大屏電子看板,實(shí)現(xiàn)車間透明化管理
對(duì)設(shè)備進(jìn)行全生命周期管理,提高設(shè)備綜合利用率
實(shí)現(xiàn)設(shè)備數(shù)據(jù)的實(shí)時(shí)采集與監(jiān)控
打通數(shù)據(jù)孤島 實(shí)現(xiàn)生產(chǎn)過(guò)程全透明化
實(shí)現(xiàn)產(chǎn)品全生命周期的質(zhì)量管理與追溯
精準(zhǔn)制定生產(chǎn)計(jì)劃 合理配置生產(chǎn)資源
全面可視的生產(chǎn)質(zhì)量統(tǒng)計(jì)與追溯
一鍵生成排產(chǎn)計(jì)劃,有效提升資源利用率
打通生產(chǎn)過(guò)程數(shù)字化全鏈路,提高生產(chǎn)效率
幫助企業(yè)大幅降低因改裝質(zhì)量問(wèn)題帶來(lái)的損失
打造數(shù)字化工廠,全面提升產(chǎn)品質(zhì)量
快速應(yīng)對(duì)訂單變化,大幅減少企業(yè)資源浪費(fèi)
實(shí)現(xiàn)產(chǎn)品報(bào)價(jià)快速精準(zhǔn),全面實(shí)現(xiàn)生產(chǎn)透明化
打造生產(chǎn)計(jì)劃自動(dòng)排產(chǎn)信息化平臺(tái)
如何為最終用戶刪除“數(shù)據(jù)”選項(xiàng)卡?
將“ EnvironmentSettings”控件添加到您的窗體。
然后在調(diào)用report.Design()之前添加以下行:
EnvironmentSettings1.DesignerSettings.Restrictions.DontCreateData = True; EnvironmentSettings1.DesignerSettings.Restrictions.DontEditData = True;
如果使用DesignerControl,則應(yīng)使用以下命令:
designerControl1.Restrictions.DontCreateData = true; designerControl1.Restrictions.DontEditData = true;
這樣,數(shù)據(jù)控件將被禁用。
如何在WPF應(yīng)用程序中使用FastReport.Net控件?
您應(yīng)該為此使用WindowsFormsHost控件:
0)在FastReport.dll上添加引用;
1)如果要使用PreviewControl,則將屬性添加到Window(Page)標(biāo)記中:xmlns:fr =“ clr-namespace:FastReport.Preview; assembly = FastReport”,xmlns:fr1 =“ clr-namespace:FastReport.Design; assembly = FastReport”-if DesignerControl;
2)將WindowsFormsHost標(biāo)記添加到您的XAML標(biāo)記中:
<WindowsFormsHost HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="3"> </WindowsFormsHost>
3)將子級(jí)添加到WindowsFormsHost中:<fr:PreviewControl> </ fr:PreviewControl>或<fr1:Designer> </ fr1:Designer>。
完整的標(biāo)記應(yīng)如下所示:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="WpfApplication1.MainWindow" Title="MainWindow" Height="375.977" Width="939.258" xmlns:fr="clr-namespace:FastReport.Preview;assembly=FastReport"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <WindowsFormsHost HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="3"> <fr:PreviewControl></fr:PreviewControl> </WindowsFormsHost> </Grid> </Window>
如何以編程方式設(shè)置Format的值?
您可以使用以下代碼在腳本或項(xiàng)目中執(zhí)行此操作:
FastReport.Format.NumberFormat format = new FastReport.Format.NumberFormat(); format.UseLocale = false; format.DecimalDigits = 2; format.DecimalSeparator = "."; format.GroupSeparator = ",";
然后:
textObject.Formats.Clear(); textObject.Formats.Add(format);
如何在MSChartObject中創(chuàng)建帶有間隙的行?
您應(yīng)該創(chuàng)建基本的System.Windows.Forms.DataVisualization.Charting.Series對(duì)象,并在此處創(chuàng)建行。之后,應(yīng)為MSChartObject基本圖表分配創(chuàng)建的系列(MSChart1.Chart.Series.Add(series);)不要忘記在“報(bào)表”->“腳本”菜單和命名空間System.Windows.Forms中添加 System.Windows.Forms.DataVisualization.dll。 .DataVisualization.Charting。
帶有間隙的線的示例:
. . using System.Windows.Forms.DataVisualization.Charting; namespace FastReport { public class ReportScript { private void MSChart1_BeforePrint(object sender, EventArgs e) { Series series = new Series("sample"); series.ChartType = SeriesChartType.Line; series.BorderWidth = 2; series.MarkerSize = 5; series.Points.Add(new DataPoint(0, 1)); series.Points.Add(new DataPoint(1, 2)); DataPoint dp = new DataPoint(2, double.NaN); dp.IsEmpty = true; series.Points.Add(dp); series.Points.Add(new DataPoint(3, 5)); series.Points.Add(new DataPoint(4, 8)); MSChart1.Chart.Series.Add(series); } } }
結(jié)果:
如何從代碼創(chuàng)建MSChartObject?
1.創(chuàng)建新的MSChart對(duì)象,設(shè)置寬度,高度和圖例:
MSChartObject MSChart1 = new MSChartObject(); MSChart1.Width = 300; MSChart1.Height = 300; MSChart1.Chart.Legends.Add(new Legend() { Name = "Legend1", Title="Legend title"});
2.創(chuàng)建ChartArea對(duì)象,設(shè)置名稱,軸標(biāo)題,并將創(chuàng)建的ChartArea分配給MSChart:
ChartArea chartArea1 = new ChartArea(); chartArea1.Name = "ChartArea1"; chartArea1.Axes[0].Title = "X name"; chartArea1.Axes[1].Title = "Y name"; MSChart1.Chart.ChartAreas.Add(chartArea1);
3.創(chuàng)建系列對(duì)象,設(shè)置圖表類型,邊框?qū)挾龋砑狱c(diǎn)并將系列分配給圖表:
Series series = new Series("sample"); series.ChartType = SeriesChartType.Line; series.BorderWidth = 2; series.Points.Add(new DataPoint(0, 1)); series.Points.Add(new DataPoint(1, 2)); series.Points.Add(new DataPoint(3, 5)); series.Points.Add(new DataPoint(4, 8)); MSChart1.Chart.Series.Add(series);
4.將創(chuàng)建的MSChart分配給DataBand:
Report report = new Report(); report.Load("ok.frx"); DataBand db = report.FindObject("Data1") as DataBand; MSChart1.Parent = db;
完整的代碼段:
MSChartObject MSChart1 = new MSChartObject(); MSChart1.Width = 300; MSChart1.Height = 300; MSChart1.Chart.Legends.Add(new Legend() { Name = "Legend1", Title="Legend title"}); ChartArea chartArea1 = new ChartArea(); chartArea1.Name = "ChartArea1"; chartArea1.Axes[0].Title = "X name"; chartArea1.Axes[1].Title = "Y name"; MSChart1.Chart.ChartAreas.Add(chartArea1); Series series = new Series("sample"); series.ChartType = SeriesChartType.Line; series.BorderWidth = 2; series.Points.Add(new DataPoint(0, 1)); series.Points.Add(new DataPoint(1, 2)); series.Points.Add(new DataPoint(3, 5)); series.Points.Add(new DataPoint(4, 8)); MSChart1.Chart.Series.Add(series); Report report = new Report(); report.Load("ok.frx"); DataBand db = report.FindObject("Data1") as DataBand; MSChart1.Parent = db;
結(jié)果:
如何從代碼中獲取查詢參數(shù)值?
您應(yīng)該使用以下代碼段:
Report.Dictionary.Connections [0] .Tables [0] .Parameters [0] .Value.ToString();
如何將HTML格式的報(bào)告嵌入消息中并使用代碼通過(guò)電子郵件發(fā)送?
為此使用以下代碼段:Report report = new Report(); report.LoadPrepared("preparedreport.fpx"); HTMLExport htmlExport = new HTMLExport() { SubFolder = false, Navigator = false, Pictures = true, EmbedPictures = true, SinglePage = true, Layers = true, HasMultipleFiles = false }; EmailExport email = new EmailExport(); //email mailer settings email.Account.Address = "Email@gmail.com"; email.Account.Name = "Usename"; email.Account.Host = "smtp.yandex.ru"; email.Account.Port = 25; email.Account.UserName = "Email"; email.Account.Password = "password"; email.Account.MessageTemplate = "Test"; email.Account.EnableSSL = true; //email addressee settings email.Address = "Destinationaddress@gmail.com"; email.Subject = "Embedding of html"; email.Export = htmlExport; //Set export type email.SendEmail(report); //Send email
如何在構(gòu)建或查看報(bào)告時(shí)關(guān)閉ProgressForm?
您可以在EnvironmentSettings中關(guān)閉ProgressForm:
Report report = new Report(); report.LoadPrepared(“ 1.fpx”); EnvironmentSettings s = new EnvironmentSettings(); s.ReportSettings.ShowProgress = false;report.Show();如何從代碼中獲取查詢參數(shù)值?
打破零回復(fù)...
微信掃碼登錄
福利更多、資源更多
官方微信
官方微博
服務(wù)電話
重慶/ 023-68661681
華東/ 13452821722
華南/ 18100878085
華北/ 17382392642
客戶支持
技術(shù)支持咨詢服務(wù)
服務(wù)熱線:400-700-1020
郵箱:sales@evget.com
關(guān)注我們
地址 : 重慶市九龍坡區(qū)火炬大道69號(hào)6幢
慧都科技 版權(quán)所有 Copyright 2003- 2024 渝ICP備12000582號(hào)-13 渝公網(wǎng)安備 50010702500608號(hào)
登錄 慧都網(wǎng)發(fā)表評(píng)論