Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting Cells of Crosstab Datasheets (2000)

    If I format the <total-function-expression> in theTRANSFORM statement of the Italgen_Crosstab query(see attachment) <font color=red>
    TRANSFORM FORMAT(Sum(Italgen.EnergiaPotenza), "#,###") AS SumOfEnergiaPotenza
    SELECT Italgen.Dipendenza, Italgen.TipoMov
    FROM Italgen
    WHERE (((Italgen.Grandezza)=3))
    GROUP BY Italgen.Dipendenza, Italgen.Grandezza, Italgen.TipoMov, Italgen.Data
    PIVOT Italgen.Fascia;</font color=red>
    all the values in the cells of the query output get aligned to the left.
    How can I align them to the right?
    Attached Files Attached Files

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Cells of Crosstab Datasheets (2000)

    Use :
    TRANSFORM Sum(Italgen.EnergiaPotenza) AS SumOfEnergiaPotenza
    SELECT Italgen.Dipendenza, Italgen.TipoMov
    FROM Italgen
    WHERE (((Italgen.Grandezza)=3))
    GROUP BY Italgen.Dipendenza, Italgen.Grandezza, Italgen.TipoMov, Italgen.Data
    PIVOT Italgen.Fascia;
    then in the design view select the EnergiaPotenza column, right click on it and select Properties
    In the format property enter #,### or #.### depending of your International settings of Windows
    Francois

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Cells of Crosstab Datasheets (2000)

    Thanks Francois, though I don't understand why they get aligned to the left in one case and to the right in the other.
    <font color=ff69b4>Ciao</font color=ff69b4>

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Cells of Crosstab Datasheets (2000)

    When you use the function Format the result is returned as text, left aligned.
    When you use the property Format with numeric data, the result remains numeric, right aligned.
    This is how I see the explanation.
    Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •