愛招飛幫助手冊 愛招飛幫助手冊
  • FastERP-1
  • Smart
  • PinToo
  • FastWeb
  • FastERP-2 企業管理系統 (opens new window)
  • 印染業ERP (opens new window)
  • 工廠終端機 (opens new window)
  • TARS
  • MARS
  • TaskRunner
  • Flying
  • FastDesk
  • HiDesk
  • HiNAT
  • FastBPM
  • 設備故障診斷 (opens new window)
  • 設備最佳運轉效益 (opens new window)
  • 企業智能助手SmeGPT (opens new window)
  • 燈號管理 (opens new window)
  • 戰情室 (opens new window)
  • 能源管理 (opens new window)
  • 人車定位 (opens new window)
  • 戰情指揮系統 (opens new window)
  • FastERP-1
  • FastWeb
  • Smart
  • PinToo
  • Flying
  • TARS
  • 通用功能

    • Report
    • Script
    • Echarts
    • Chart
    • DB Install
  • FastERP-1
  • Smart
  • PinToo
  • FastWeb
  • FastERP-2 企業管理系統 (opens new window)
  • 印染業ERP (opens new window)
  • 工廠終端機 (opens new window)
  • TARS
  • MARS
  • TaskRunner
  • Flying
  • FastDesk
  • HiDesk
  • HiNAT
  • FastBPM
  • 設備故障診斷 (opens new window)
  • 設備最佳運轉效益 (opens new window)
  • 企業智能助手SmeGPT (opens new window)
  • 燈號管理 (opens new window)
  • 戰情室 (opens new window)
  • 能源管理 (opens new window)
  • 人車定位 (opens new window)
  • 戰情指揮系統 (opens new window)
  • FastERP-1
  • FastWeb
  • Smart
  • PinToo
  • Flying
  • TARS
  • 通用功能

    • Report
    • Script
    • Echarts
    • Chart
    • DB Install
  • FastWeb幫助主頁
  • 學習手冊

    • 基本入門

    • 功能介紹

    • 控制元件說明

      • 屬性與事件
      • 桌面控制元件

        • 標準控制元件
        • 附加控制元件
        • 數據控制控制元件
        • 圖表控制元件
        • 儀表控制元件
        • 製圖控制元件
        • 資料庫控制元件
        • 通訊控制元件
        • 伺服器控制元件
          • 1. TUgRFConnection
            • 1.1. 屬性
          • 2. TUgRFDataSet
            • 2.1. 屬性
            • 2.1.1. Connection
            • 2.1.2. SQL
            • 2.1.3. RecordCount
            • 2.2. 方法
            • 2.2.1. Open
            • 2.2.2. Edit
            • 2.2.3. Append
            • 2.2.4. FieldByName
            • 2.2.5. First、Prior、Next、Last
            • 2.2.6. EmptyDataSet
            • 2.2.7. ApplyUpdates
            • 2.2.8. Locate
            • 2.2.9. ToJSONObjectString
            • 2.2.10. ToJSONArrayString
            • 2.2.11. ToJSONObject
            • 2.2.12. ToJSONArray
            • 2.2.13. SaveStructure
            • 2.2.14. LoadStructureJSONArray
            • 2.2.15. LoadStructureJSONString
            • 2.2.16. LoadFromJSONObject
            • 2.2.17. LoadFromJSONArray
            • 2.2.18. LoadFromJSONString
            • 2.2.19. MergeFromJSONObject
            • 2.2.20. MergeFromJSONString
            • 2.2.21. ValidateJSONObject
            • 2.2.22. ValidateJSONString
          • 3. TUgRFStoredProc
            • 3.1. 屬性
            • 3.1.1. ExecProc
          • 4. TUgRFWechatMP
            • 4.1. 屬性
            • 4.2. 方法
            • 4.2.1. SendCustomMessage
            • 4.2.2. SendTemplateMessage
          • 5. TUgRFSMSSender
            • 5.1. 屬性
            • 5.2. 方法
            • 5.2.1. Execute
          • 6. TUgFlying
            • 6.1. 屬性
            • 6.1.1. HTTPOptions
            • 6.1.2. MailOptions
            • 6.1.3. MQTTOptions
            • 6.1.4. PrintOptions
            • 6.1.5. WebSocketOptions
            • 6.2. 方法
            • 6.2.1. GetPrinterList
            • 6.2.2. ReportPrint
            • 6.2.3. ReportPreview
            • 6.2.4. PrintPdf
            • 6.2.5. PrintPic
        • 多媒體控制元件
        • 3D-AI控制元件
        • IsoBean控制元件
        • 附控控制元件
      • 移動控制元件

    • 系統工具

    • 系統管理

    • 云服務工具

    • 資料庫工具

    • 專用模板

    • 外部功能

    • 開發流程

    • 函式程式

  • 開發手冊

目录

伺服器控制元件

# FastWeb伺服器控制元件

  • 適用平臺: WEB(桌面)

  該分組下包含了TARS提供的連線元件。Flying網路列印伺服器,發送微信、簡訊等相關的控制元件及功能。

# 1. TUgRFConnection

  該元件用於建立與TARS服務端的連線。通常用於一些窗體內的臨時連線。如果程式中多個窗體需要使用同一個連線設定,可以使用公共單元中的TARSLink來定義。

# 1.1. 屬性

屬性 功能說明
Active 是否啟用該元件
ConnectionDefName 連線的帳套(TARS連線設定)名稱
ForceEncryption 是否開啟加密連線
LoginOptions 連線選項設定
MD5Salt: MD5鹽值,如在TARS中有設定則該處需與TARS中的設定相同
Password: TARS連線設定中使用的連線使用者的密碼
UserName: TARS連線設定中使用的連線的使用者名稱
ModuleFileName 連線功能使用的模組名稱
SecureKey 保證連線安全使用的安全碼,此處需與TARS中設定的安全碼一致
ServerAddr TARS伺服器的IP地址
ServerPort TARS伺服器的連線埠

# 2. TUgRFDataSet

  該元件用於從資料庫中獲取數據形成數據集資訊。數據集元件是數據感知組中元件的數據來源,也是數據圖表等的數據來源。

# 2.1. 屬性

屬性 功能說明
Active 是否啟用該元件
Connection 指定數據集連線的來源
SQL 產生數據集的構造SQL語句
BookMark 書籤標記,用於快速定位一條數據集中的記錄

# 2.1.1. Connection

  指定數據集連線的來源。連線的來源有兩種,一種來自TRFConnection元件,另一種來自於公共單元tarslink中關於帳套的設定專案。

    //JScript
      //連線來源可以來自同一窗體中的TRFConnection元件
      UgRFDataSet01.Connection = UgRFConnection01;
      //連線來源也可以來自公共單元pub_js_tarslink的帳套設定
      UgRFDataSet01.Connection = GetRFERP;
    
    1
    2
    3
    4
    5
    //PasScript
      //連線來源可以來自同一窗體中的TRFConnection元件
      UgRFDataSet01.Connection := UgRFConnection01;
      //連線來源也可以來自公共單元pub_pas_traslink的帳套設定
      UgRFDataSet01.Connection := GetRFERP;
    
    1
    2
    3
    4
    5
    // Make sure to add code blocks to your code group

    # 2.1.2. SQL

      該屬性是構造數據集使用的SQL語句。

      //JScript
        UgRFDataSet01.SQL.Text = "SELECT * FROM Basic_Unit";
      
      1
      2
      //PasScript
        UgRFDataSet01.SQL.Text := 'SELECT * FROM Basic_Unit';
      
      1
      2
      // Make sure to add code blocks to your code group

      # 2.1.3. RecordCount

        該屬性用於顯示目前數據集中包含的記錄的數目。

        //JScript
          UgLabel01.Text = "Record Count:" + IntToStr(UgRFDataSet01.RecordCount);
        
        1
        2
        //PasScript
          UgLabel01.Text := 'Record Count:' + IntToStr(UgRFDataSet01.RecordCount);
        
        1
        2
        // Make sure to add code blocks to your code group

        # 2.2. 方法

        # 2.2.1. Open

          該方法用於在SQL屬性中包含SQL語句時打開數據集。

          UgRFDataSet01.Open;
        
        1

        # 2.2.2. Edit

          使數據集對應選擇的記錄處於編輯狀態。

          UgRFDataSet01.Edit;
        
        1

        # 2.2.3. Append

          使數據集處於新增記錄的狀態。

          UgRFDataSet01.Append;
        
        1

        # 2.2.4. FieldByName

          獲取數據集中的欄位的方法。

          //JScript
            //為數據集中目前指向的記錄中的欄位賦值,需要注意數據型別要一致
            UgRFDataSet01.FieldByName("FBillID").AsInteger = 23020001;
            UgRFDataSet01.FieldByName("FCreateDate").AsDateTime = Now();
          
          1
          2
          3
          4
          //PasScript
            //為數據集中目前指向的記錄中的欄位賦值,需要注意數據型別要一致
            UgRFDataSet01.FieldByName('FBillID').AsInteger := 23020001;
            UgRFDataSet01.FieldByName('FCreateDate').AsDateTime := Now();
          
          1
          2
          3
          4
          // Make sure to add code blocks to your code group

          # 2.2.5. First、Prior、Next、Last

            將數據集指向首項、前項、後項、末項記錄。

            //JScript
              UgRFDataSet01.First;
              UgRFDataSet01.Prior;
              UgRFDataSet01.Next;
              UgRFDataSet01.Last;
            
            1
            2
            3
            4
            5
            //PasScript
              UgRFDataSet01.First;
              UgRFDataSet01.Prior;
              UgRFDataSet01.Next;
              UgRFDataSet01.Last;
            
            1
            2
            3
            4
            5
            // Make sure to add code blocks to your code group

            # 2.2.6. EmptyDataSet

              清空數據集中的內容。

            # 2.2.7. ApplyUpdates

              將目前數據集的更改資訊儲存至資料庫中。

              //JScript
                UgRFDataSet01.ApplyUpdates(-1);
              
              1
              2
              //PasScript
                UgRFDataSet01.ApplyUpdates(-1);
              
              1
              2
              // Make sure to add code blocks to your code group

              # 2.2.8. Locate

                根據參數資訊定位包含對應資訊的數據集記錄。

                //JScript
                  UgRFDataSet01.Locate("FInterID",UgRFDataSet01.FieldByName("FInterID").AsString,nil);
                
                1
                2
                //PasScript
                  UgRFDataSet01.Locate('FInterID',UgRFDataSet01.FieldByName('FInterID').AsString,nil);
                
                1
                2
                // Make sure to add code blocks to your code group

                # 2.2.9. ToJSONObjectString

                function ToJSONObjectString(const AOnlyUpdatedRecords: Boolean = False; const AChildRecords: Boolean = True; const AValueRecords: Boolean = True; const AEncodeBase64Blob: Boolean = True): string;
                
                1

                  將數據集中目前選擇的的數據行轉換為JSON對象的數據集。輸出的格式為欄位名稱與欄位值組成的鍵值對。

                {"code":"Code1","name":1}
                
                1

                # 2.2.10. ToJSONArrayString

                function ToJSONArrayString(const AOnlyUpdatedRecords: Boolean = False; const AChildRecords: Boolean = True; const AValueRecords: Boolean = True; const AEncodeBase64Blob: Boolean = True): string;
                
                1

                  將數據集中的數據轉換為JSONArray。是由JSON對像組成的佇列。

                [{"code":"Code1","name":1},{"code":"Code2","name":2}]
                
                1

                # 2.2.11. ToJSONObject

                function ToJSONObject(const AOnlyUpdatedRecords: Boolean = False; const AChildRecords: Boolean = True; const AValueRecords: Boolean = True; const AEncodeBase64Blob: Boolean = True): TJSONObject;
                
                1

                  將數據集中目前指向的數據行轉換為JSON對像型別。

                # 2.2.12. ToJSONArray

                function ToJSONArray(const AOnlyUpdatedRecords: Boolean = False; const AChildRecords: Boolean = True; const AValueRecords: Boolean = True; const AEncodeBase64Blob: Boolean = True): TJSONArray;
                
                1

                  將數據集中的數據轉換為JSON對像序列型別。

                # 2.2.13. SaveStructure

                function SaveStructure: TJSONArray;
                
                1

                  獲取目前的數據集的結構資訊,以JSONArray的方式輸出,包括數據表的欄位名稱、數據型別、大小等資訊。

                # 2.2.14. LoadStructureJSONArray

                procedure LoadStructureJSONArray(const AJSONArray: TJSONArray; const AOwns: Boolean = True);
                
                1

                  將數據集的數據表結構從JSONArrary中載入。

                # 2.2.15. LoadStructureJSONString

                procedure LoadStructureJSONString(const AJSONString: string); overload;
                
                1

                  將數據集的數據表結構從JSON格式的字串中讀取載入。

                # 2.2.16. LoadFromJSONObject

                procedure LoadFromJSONObject(const AJSONObject: TJSONObject; const AOwns: Boolean = True)
                
                1

                  數據集從JSON對像中獲取載入單條記錄。

                # 2.2.17. LoadFromJSONArray

                procedure LoadFromJSONArray(const AJSONArray: TJSONArray; const AOwns: Boolean = True);
                
                1

                  數據集從JSON對像序列中獲取載入多條記錄。

                # 2.2.18. LoadFromJSONString

                procedure LoadFromJSONString(const AJSONString: string);
                
                1

                  數據集從JSON對象的字串中獲取載入數據記錄。

                # 2.2.19. MergeFromJSONObject

                procedure MergeFromJSONObject(const AJSONObject: TJSONObject; const AOwns: Boolean = True);
                
                1

                  數據集從JSON對像中讀取單條數據記錄併合並至數據集中。

                # 2.2.20. MergeFromJSONString

                procedure MergeFromJSONString(const AJSONString: string);
                
                1

                  數據集從JSON對像字串中讀取數據記錄併合並至數據集中。

                # 2.2.21. ValidateJSONObject

                function ValidateJSONObject(const AJSONObject: TJSONObject; const ALang: TLanguageType = enUS; const AOwns: Boolean = True): TJSONArray;
                
                1

                  用於驗證JSON對像元件是否有效。

                # 2.2.22. ValidateJSONString

                function ValidateJSONString(const AJSONString: string; const ALang: TLanguageType = enUS): TJSONArray;
                
                1

                  用於驗證JSON對像字串是否有效。

                # 3. TUgRFStoredProc

                  該元件用於執行資料庫中的預存程序。按照要求將預存程序的名稱及參數資訊獲取輸入,可執行相應的預存程序。

                # 3.1. 屬性

                名稱 說明
                Active 數據集是否開啟
                Aggregrates 為數據集定義的客戶端彙總的集合
                AggregratesActive 是否自動計算彙總值
                AutoCalcFields 確定何時觸發OnCalcFields事件以及何時計算查詢欄位值
                Connection 指定控制元件使用的連線控制元件
                Filter 設定過濾條件
                Filtered 是否開啟過濾器
                Params 設定預存程序使用的參數
                StoredProcName 指定在伺服器端呼叫的預存程序的名稱

                # 3.1.1. ExecProc

                procedure ExecProc; 
                function ExecProc(const AProcName: String): LongInt; 
                function ExecProc(const AProcName: String; const AParams: array of Variant): LongInt;
                function ExecProc(const AProcName: String; const AParams: array of Variant;  const ATypes: array of TFieldType): LongInt;
                
                1
                2
                3
                4

                  執行預存程序。

                  //JScript
                  //1
                  UgRFStoredProc01.StoredProcName = "myproc";
                  UgRFStoredProc01.Prepare;
                  UgRFStoredProc01.ParamByName("inval").Value = 100;
                  UgRFStoredProc01.ExecProc;
                  ShowMessage(UgRFStoredProc01.ParamByName("outval").AsString);
                  
                  //2
                  UgRFStoredProc01.ExecProc("myproc");
                  
                  //3
                  UgRFStoredProc01.ExecProc("myproc;2", [100, "qweqwe"]);
                  
                  //4
                  UgRFStoredProc01.ExecProc("myproc", [100, "qweqwe"], [ftInteger, ftWideString]);
                  
                  1
                  2
                  3
                  4
                  5
                  6
                  7
                  8
                  9
                  10
                  11
                  12
                  13
                  14
                  15
                  16
                  //PasScript
                  //1
                  UgRFStoredProc01.StoredProcName := 'myproc';
                  UgRFStoredProc01.Prepare;
                  UgRFStoredProc01.ParamByName('inval').Value := 100;
                  UgRFStoredProc01.ExecProc;
                  ShowMessage(UgRFStoredProc01.ParamByName('outval').AsString);
                  
                  //2
                  UgRFStoredProc01.ExecProc('myproc');
                  
                  //3
                  UgRFStoredProc01.ExecProc('myproc;2', [100, 'qweqwe']);
                  
                  //4
                  UgRFStoredProc01.ExecProc('myproc', [100, 'qweqwe'], [ftInteger, ftWideString]);
                  
                  1
                  2
                  3
                  4
                  5
                  6
                  7
                  8
                  9
                  10
                  11
                  12
                  13
                  14
                  15
                  16
                  // Make sure to add code blocks to your code group

                  # 4. TUgRFWechatMP

                    該元件可實現與微信公眾平臺對接實現微信公眾號模板訊息推送的功能。

                  # 4.1. 屬性

                  屬性 功能說明
                  AccountName 微信公眾號的名稱,在TARS中有相關設定
                  Connection 設定連線方式,可選方式有TUgRFConnection元件/公共單元TARSLink設定

                  # 4.2. 方法

                  # 4.2.1. SendCustomMessage

                  function SendCustomMessage(const AOpenID, AContent: string): Boolean;
                  
                  1

                    發送文字訊息。

                  • 示例
                    //JScript
                      //呼叫方式
                      UgRFWeChatMP01.SendCustomMessage("oxCHX6X4rjxj-TEStyhPmkNILNp9A","Hello!");
                    
                    1
                    2
                    3
                    //PasScript
                    Begin
                        //呼叫方式
                    	UgRFWeChatMP01.SendCustomMessage('oxCHX6X4rjxj-TEStyhPmkNILNp9A','Hello!');
                    End;
                    
                    1
                    2
                    3
                    4
                    5
                    // Make sure to add code blocks to your code group

                    # 4.2.2. SendTemplateMessage

                    function SendTemplateMessage(const AJsonContent: string): Boolean;
                    
                    1

                      發送模板訊息。

                    部分 說明
                    AccountName 微信公眾號
                    AJsonContent Json格式化字串,格式請參考https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html (opens new window)
                    • 示例
                      //JScript
                        //呼叫方式
                        UgRFWeChatMP01.SendTemplateMessage("JsonContent");
                      
                      1
                      2
                      3
                      //PasScript
                      Begin
                        //呼叫方式
                        UgRFWeChatMP01.SendTemplateMessage('JsonContent');
                      End;
                      
                      1
                      2
                      3
                      4
                      5
                      // Make sure to add code blocks to your code group

                      # 5. TUgRFSMSSender

                        該元件可用於對接簡訊平臺實現在TARS上使用簡訊發送的功能。

                      # 5.1. 屬性

                      屬性 功能說明
                      AccessKeyId 簡訊服務提供商的AccessKeyId
                      AcessKeySecret 簡訊服務提供商的AccessKeySecret
                      Connection 指定連線的來源
                      PhoneNumbers 接收簡訊的手機號碼,如有多個號碼請用;分隔
                      Provider 簡訊服務提供商選擇,有阿里雲和阿里大於可選
                      SigName 簡訊簽名顯示
                      TemplateCode 簡訊模板名稱
                      TemplateParam 簡訊模板參數

                        以上參數的詳細說明請參考阿里云簡訊服務文件 (opens new window)。

                      # 5.2. 方法

                      # 5.2.1. Execute

                        執行簡訊發送的操作。

                        //JScript
                        if (UgRFSMSSender01.Execute){
                          Showmessage("Messsage Send Success!");
                        }
                        
                        1
                        2
                        3
                        4
                        //PasScript
                        if UgRFSMSSender01.Execute then
                            Showmessage('Messsage Send Success!');
                        
                        1
                        2
                        3
                        // Make sure to add code blocks to your code group

                        # 6. TUgFlying

                          TUgFlying元件是配合Flying使用的元件,將必要的列印配置傳遞給該元件的屬性,執行元件的方法即可將數據傳遞至列印伺服器進行列印操作。在使用該元件前請先閱讀Flying使用手冊。

                        # 6.1. 屬性

                        # 6.1.1. HTTPOptions

                          使用 HTTP 列印模式時使用的屬性選項。其中的相關屬性專案說明如下:

                        屬性 說明
                        Host Flying列印服務端地址
                        Port Flying HTTP/WebSocket 列印服務監聽的埠號

                        # 6.1.2. MailOptions

                          郵件相關設定選項。

                        屬性 說明
                        Addr 接收郵箱的地址
                        Body 郵件的正文內容
                        Enable 是否啟用郵件發送的功能
                        Subject 郵件的標題

                        # 6.1.3. MQTTOptions

                          使用 MQTT 列印模式時使用的屬性選項。其中的相關屬性專案說明如下:

                        屬性 說明
                        BrokerHost MQTT 服務端的地址
                        BrokerPort MQTT 服務端服務監聽的埠號
                        Enabled 設定是否啟用 MQTT 連線
                        PrintPwd 列印的密碼
                        PrintTopic 列印服務訂閱的主題名稱
                        UserName MQTT 服務的使用者名稱
                        UserPwd MQTT 服務的密碼

                        # 6.1.4. PrintOptions

                          列印服務的相關設定項。

                        屬性 說明
                        Data 輸入的列印數據,可通過 AddPrintData 方法自動產生
                        ExportFileType 設定導出的檔案型別
                        ExportFileUrl 導出檔案的URL
                        Preview 設定是否啟用檔案預覽
                        PrintCopies 設定檔案的列印份數
                        PrinterList 印表機列表的資訊,可通過呼叫 GetPrinterList 方法來更新
                        PrinterName 設定印表機的名稱,可通過 GetPrinerList 方法獲取印表機名稱
                        PrintOffsetX 列印偏移 X
                        PrintOffsetY 列印偏移 Y
                        PrintType 設定列印模式,可選 HTTP、MQTT、WebSocket
                        ReportName 設定列印的報表模板的名稱,可指定報表模板的檔名(*.fr3)或者報表模板的別名
                        ReportUrl 設定列印的報表的輸出地址
                        ReportVersion 報表版本號
                        TaskID 列印的任務ID,設定此項可用於區分不同列印客戶端的列印請求
                        Token 令牌,可用於列印客戶端的身份認證

                        # 6.1.5. WebSocketOptions

                          使用 WebSocket 進行列印時的設定項。

                        屬性 說明
                        Authentication 是否啟用 WebSocket 身份認證
                        Compressed 是否啟用數據壓縮
                        Enabled 是否啟用 WebSocket 通訊連線
                        Host WebSocket 連線的主機的地址(Flying 服務端的地址)
                        Password WebSocket 使用身份認證連線時使用的密碼
                        Port WebSocket 服務監聽的埠號
                        SSL 是否啟用 SSL 連線
                        SSLPort 啟用SSL 連線時監聽的 WebSocket 服務埠號
                        URL WebSocket 服務路徑
                        UserName WebSocket 使用身份認證連線時使用的使用者名稱稱

                        # 6.2. 方法

                        方法 功能說明
                        GetPrintList 獲取Flying中介軟體的印表機列表
                        Print 列印報表
                        ReportPrint 直接列印
                        ReportPreview 報表預覽
                        AddPrintData 列印數據組裝

                        # 6.2.1. GetPrinterList

                        procedure GetPrinterList;
                        
                        1

                          該元件使用者獲取目前Flying列印伺服器中可用的印表機列表。可通過如下方式來獲取印表機列表,獲取的印表機列表

                          //JScript
                          function UgButton02OnClick(sender)
                          //載入印表機
                          {
                            UgFlying01.GetPrinterList;
                          }
                          
                          1
                          2
                          3
                          4
                          5
                          6
                          //PasScript
                          procedure UgButton02OnClick(sender: tobject);
                          //載入印表機
                          begin
                            UgFlying01.GetPrinterList;
                          end;
                          
                          1
                          2
                          3
                          4
                          5
                          6
                          // Make sure to add code blocks to your code group

                          # 6.2.2. ReportPrint

                          procedure ReportPrint;
                          
                          1

                            ReportPrint方法是呼叫Flying中介軟體,進行報表列印。

                            //JScript
                            //Pirnt
                            function UgButton02OnClick(sender){
                              if (UgComboBox02.Items.Text == "") {exit;}
                              UgFlying01.PrinterName = UgComboBox02.Items.Strings[UgComboBox02.ItemIndex];
                              UgRFDataSet01.SQL.Text = "SELECT * FROM Basic_Unit";
                              UgRFDataSet01.Open;
                              UgFlying01.AddPrintData(UgRFDataSet01,"A");
                              UgFlying01.ReportPrint;
                            }
                            
                            1
                            2
                            3
                            4
                            5
                            6
                            7
                            8
                            9
                            10
                            //PasScript
                            //Pirnt
                            procedure UgButton02OnClick(sender: tobject);
                            //點選圖片傳輸列印
                            begin
                              if UgComboBox02.Items.Text = '' then exit;
                              UgFlying01.PrinterName := UgComboBox02.Items.Strings[UgComboBox02.ItemIndex];
                              UgRFDataSet01.SQL.Text := 'SELECT * FROM Basic_Unit';
                              UgRFDataSet01.Open;
                              UgFlying01.AddPrintData(UgRFDataSet01,'A');
                              UgFlying01.ReportPrint;
                            end;
                            
                            1
                            2
                            3
                            4
                            5
                            6
                            7
                            8
                            9
                            10
                            11
                            12
                            // Make sure to add code blocks to your code group

                            # 6.2.3. ReportPreview

                            procedure ReportPreview;
                            
                            1

                              ReportPreview方法是呼叫Flying中介軟體,進行報表輸出,並回傳到客戶端顯示。

                              //JScript
                              //Pirnt
                              function btnPrintOnClick(Sender)
                              {
                                if (Ugcombobox01.Count == 0) exit;
                                UgFlying01.PrintOptions.PrinterName = Ugcombobox01.Items[Ugcombobox01.ItemIndex];//讀取印表機名稱
                                UgRFDataSet01.openData;//打開數據
                                UgFlying01.AddPrintData(UhRFDataSet01,"A");//數據集轉Json
                                UgFlying01.ReportPreview;//報表預覽
                              }
                              
                              1
                              2
                              3
                              4
                              5
                              6
                              7
                              8
                              9
                              10
                              //PasScript
                              //Pirnt
                              Procedure btnPrintOnClick(Sender: TObject);
                              Begin
                                if Ugcombobox01.Count = 0 Then exit;
                                UgFlying01.PrintOptions.PrinterName := Ugcombobox01.Items[Ugcombobox01.ItemIndex];//讀取印表機名稱
                                UgRFDataSet01.openData;//打開數據
                                UgFlying01.AddPrintData(UhRFDataSet01,'A');//數據集轉Json
                                UgFlying01.ReportPreview;//報表預覽
                              End;
                              
                              1
                              2
                              3
                              4
                              5
                              6
                              7
                              8
                              9
                              10
                              // Make sure to add code blocks to your code group

                              # 6.2.4. PrintPdf

                              procedure PrintPdf(AUrl: String);
                              
                              1

                                從網路地址獲取 PDF 檔案併發送至 Flying 服務端執行列印。

                              # 6.2.5. PrintPic

                              procedure PrintPic(AUrl: String);
                              
                              1

                                從網路地址獲取圖片檔案併發送至 Flying 服務端執行列印。

                              通訊控制元件
                              多媒體控制元件

                              ← 通訊控制元件 多媒體控制元件→

                              Copyright © 2021-2025 愛招飛IsoFace | ALL Rights Reserved
                              • 跟随系统
                              • 浅色模式
                              • 深色模式
                              • 阅读模式