2016-03-23 55 views
1

當列標題值爲14001時,我一直試圖在FastReport中從數據庫交叉表中隱藏列;但不是工作下來的語法!在數據庫交叉表中隱藏FastReport的列

My Report

下面的代碼:

procedure DBCross2OnCalcWidth(ColumnIndex: Integer; ColumnValues: Variant;var Width: Extended); 
begin 
if (VarToStr(ColumnValues[0]) = '14001') then 
    Width := 0; 
end; 
+0

腳本應當作品。創建一個帶有錯誤的小型演示項目並將其附加到此處或發送到[email protected] – gpi

回答

0

嘗試添加程序觸發的打印和收集HeaderValues [0]

procedure DBCross2OnPrintColumnHeader(Memo: TfrxMemoView; HeaderIndexes, HeaderValues, Value: Variant); 
begin 
    if (VarToStr(HeaderValues[0]) = '14001') then 
    begin 
    Memo.Width := 0; 
    Memo.Height := 0; 
    Memo.Printable := false; 
    Memo.Visible := false;       
    end;      
end;