locked
renaming expression column name when I export to Excel RRS feed

  • Question

  • User-1210839387 posted

    using report builder 2.0

    I have 2 columns I am displaying in my report:

    colA

    colB

    ColumnA I get the value from the dataset result (drag and drop) but for columnB I have an expression that calculates that value.  When I export to excel ColB does not have a name so the column headers are as follows:

    <HeaderValues>

    ColA

    ColA1

    </HeaderValues>

    anyways ColA1 is not a column name that I have anywhere on my report but excel does not know the column name for ColB because it comes from an expression.  Is there a way to alias an expression?  I tried using the "expression As SomeAlias" but that did not work

    thanks

    MC

    Wednesday, August 3, 2011 1:43 PM

Answers

  • User1983249378 posted

    Where you are making your expression ? paste your expressin here , if you are building it in SQL then you can use AS for column aliases , if you are using crystal reports or rdlc reports to export then the box control has text property in which you can write column name ,

    If you are using Dataset then you have to trace its class.

    Naming a column header is bit easier, if you can post your some code then it helps answerers to give you right solution.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 3, 2011 2:14 PM