如何在财务打印机上打印Z报告?

时间:2015-11-10 14:20:31

标签: vba printing

我是财政印刷商的新手。我已经设法使用Java和VBA将事务发送到财务打印机(FP3530),但现在我需要打印Z-Report。有没有人这样做,请帮助。

我尝试使用API​​提供的日常报告方法,但没有运气。 我将很高兴了解日志的读取位置,因为一种方法需要它作为参数,如下面的VBA代码所示。

Public Sub PrintZ_Report()
    On Error GoTo errorsave
    FP = New FP3530.CSFP3530
    FP.Init(1, 115200, 0, 0, 8)

    Dim fname As String
    Dim nClosure As Long
    Dim dbFM_Total As Double
    Dim dbTaxA As Double
    Dim dbTaxB As Double
    Dim dbTaxC As Double
    Dim dbTaxD As Double
    Dim dbTaxE As Double

    varBool = FP.GET_JOURNAL(True, fname, 1, 1)'Cannot figure out fname
    If Not varBool Then
        MsgBox("Error getting journal")

    End If
    varBool = FP.DAILY_REPORT(0, True, nClosure, dbFM_Total, dbTaxA, dbTaxB, dbTaxC, dbTaxD, dbTaxE)
    If Not varBool Then
        MsgBox("Error creating DAILY_REPORT")
        'Error handler goes here
    End If
    End
    Exit Sub
    errorsave:
       'MsgBox Err.Description
        Resume Next
End Sub

尝试按如下方式使用它:

package com.mcsolution.table.MioTableModel;

import java.text.DecimalFormat;
import java.text.NumberFormat;

import javax.swing.table.DefaultTableModel;

import com.mcsolution.common.LoggerFactory.MyLog4J;


public class defaultTableModel extends DefaultTableModel{
    /**
     * 
     */
    private static final long serialVersionUID = 3656308616639186983L;
    public  NumberFormat decimalFormatter = new DecimalFormat("#,##0.00");
    public static NumberFormat decimalFormatter4 = new DecimalFormat("#,##0.0000");
    public MyLog4J log = new MyLog4J();

    public defaultTableModel(){}
    public defaultTableModel(String[] ColName,int n){
        super(ColName, n); 
    }

    public void setValueAt(Object value,int row,int column){
        super.setValueAt(value, row, column);
    }

    public void removeAllRow(){
        if (getRowCount() > 0) {
            for( int i = getRowCount() - 1; i >= 0; i-- )
            {
                removeRow(i);
            }
        }
    }
}

0 个答案:

没有答案