In fact, you need to move (cut and paste) the entire <TablixCell> element for the column (everything between <TablixCell> and </TablixCell> , including the <TablixCell> and </TablixCell> ).
For example, to reorder the columns in the example below so that the Product Identifier column comes in the Product Name column, you must select and cut the entire section around the "ProductName" "cell element (everything from the first <TablixCell> to the first </TablixCell> ), and then insert after </TablixCell> for the "ProductID" column.
Note that there is a complete set of <TablixCell> elements for each row defined in Tablix; each of them is in a separate <TablixRow> element. If you left the default header column (where the column names are set), then the first <TablixRow> defines this header row, and the second defines the data in the columns, and this is the one you want to edit. After you have changed the data columns, you will need to either do the same for the header column (if you have one), or simply rename the columns using the constructor to match the data in the columns.
Indeed, it is so confusing that it might be easier to move the column by simply using the constructor to insert a new column where you want to move the column, set it with the appropriate data source for that column, and then delete the original column. In the following example, you will enter a new column after the Product Identifier , set it to the ProductName data source column (which will set it to “Product Name” in the title bar), and then delete the original Product Name column on the left.
... <TablixCell> <CellContents> <Textbox Name="ProductName"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Fields!ProductName.Value</Value> <Style /> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>ProductName</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </CellContents> </TablixCell> <TablixCell> <CellContents> <Textbox Name="ProductID"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Fields!ProductID.Value</Value> <Style /> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>ProductID</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </CellContents> </TablixCell> ...
after cutting / pasting, you will end up with:
... <TablixCell> <CellContents> <Textbox Name="ProductID"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Fields!ProductID.Value</Value> <Style /> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>ProductID</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </CellContents> </TablixCell> <TablixCell> <CellContents> <Textbox Name="ProductName"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Fields!ProductName.Value</Value> <Style /> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>ProductName</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </CellContents> </TablixCell> ...
DizGrizz Sep 07 '13 at 4:32 2013-09-07 04:32
source share