Ticket T313948
Visible to All Users

DxSpreadSheet ZeroValues

created 9 years ago

Hi,

We re trying to fix the display in our spreadsheets.
We frequently need NOT to display zero values.

For that purpose we use the property ZeroValues in our spreadsheets :
Spread.OptionsView.ZeroValues:=False (or true).

But whatever the boolean we set our zeroValues are always visible.
Can you help us telling the correct way to use the property ?

Thanks.
Xavier PATOIT

Nota :
When we use some formatting (eg :  Acell.Style.DataFormat.FormatCode := '[BLACK]#,##0.00;[RED]-#,##0.00;;' the result is ok.

Comments (1)

    We re presently using VCL 15.1.6 and DelphiXE2

    Answers approved by DevExpress Support

    created 9 years ago

    Hello Xavier,

    This property is implemented to hide only those formula results that are zeros. Please review the "TdxSpreadSheetOptionsView.ZeroValues" help topic for additional information.

      Comments (2)

        Ok Paulo thank you for your quick answer.
        As we cannot get the result we need your help again.
        What's wrong with our code :
        procedure TForm3.DialogFrmCreate(Sender: TObject);
        begin
         //Set ZeroValues display format
         Spread.OptionsView.ZeroValues:= False ;
         Spread.ActiveSheetAsTable.Options.ZeroValues:=bFalse;
         //CreateFormula at startup
         Spread.OptionsView.R1C1Reference:=False;
         Spread.ActiveSheetAsTable.CreateCell(1, 1);
         Spread.ActiveSheetAsTable.CreateCell(2, 1);
         Spread.ActiveSheetAsTable.CreateCell(3, 1);
         Spread.ActiveSheetAsTable.Cells[1,1].SetText('0');
         Spread.ActiveSheetAsTable.Cells[2,1].SetText('0');
         Spread.ActiveSheetAsTable.Cells[3,1].AsVariant := '=SUM(B2' + ':' + 'B3)';
        end;

        DevExpress Support Team 9 years ago

          Xavier,

          Your code looks correct, which means that the problem is at the level of our control. I have created a separate ticket on your behalf (T314528) and forwarded it to our developers for research. I hope we will be able to find a solution soon.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.