locked
Rotate text in textboxes in rdlc reports RRS feed

  • Question

  • Hi

    I want some of my textboxes to be rotated to the right 90 degrees. In crystal reports there was a property for this. Is there something similar in rdlc?

     

    Hope so.

     

    Ola

    Monday, February 27, 2006 12:18 PM

Answers

  • There are only two modes:
    * lr-tb Text is written horizontally.
    * tb-rl Text is written vertically.

    Other rotations are not supported.

    -- Robert

    Thursday, March 16, 2006 6:20 AM

All replies

  • on the textBox property, there is a WRITINGMODE property, set it to "tb-rl" - which stands for From Top to Bottom, Right to Left.

    Wednesday, March 15, 2006 3:12 PM
  • Hi there,

    Does any one know how to rotate in the other way? 

    Wednesday, March 15, 2006 7:19 PM
  • There are only two modes:
    * lr-tb Text is written horizontally.
    * tb-rl Text is written vertically.

    Other rotations are not supported.

    -- Robert

    Thursday, March 16, 2006 6:20 AM
  • This does not appear to work with charts. I have a datetime for the x-axis and would like the text to appear vartically.
    Tuesday, August 8, 2006 11:01 PM
  • With the built-in RS charts, axis labels on the x-axis are positioned and rotated automatically based on the available space to avoid overlapping labels.

    -- Robert

     

    Tuesday, August 8, 2006 11:29 PM
  •  

    This does not appear to be the case. The chart control on the category axis is truncating the text and displaying it horizontally.

    I have a screen shot, I'm not sure how I can attach the image.

    Here is the report xml

    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
      <DataSources>
        <DataSource Name="DummyDataSource">
          <ConnectionProperties>
            <ConnectString />
            <DataProvider>SQL</DataProvider>
          </ConnectionProperties>
          <rd:DataSourceID>52ed23f5-e254-4e2b-b764-1c38f2cf772b</rd:DataSourceID>
        </DataSource>
      </DataSources>
      <BottomMargin>1in</BottomMargin>
      <RightMargin>1in</RightMargin>
      <rd:DrawGrid>true</rd:DrawGrid>
      <InteractiveWidth>8.5in</InteractiveWidth>
      <rd:SnapToGrid>true</rd:SnapToGrid>
      <Body>
        <ReportItems>
          <Chart Name="chart1">
            <Legend>
              <Visible>true</Visible>
              <Style>
                <BorderStyle>
                  <Default>Solid</Default>
                </BorderStyle>
              </Style>
              <Position>RightCenter</Position>
            </Legend>
            <Subtype>Plain</Subtype>
            <Title>
              <Caption>Intergrated Curve</Caption>
            </Title>
            <Height>5.25in</Height>
            <CategoryAxis>
              <Axis>
                <Title>
                  <Caption>Date</Caption>
                </Title>

                <MajorGridLines>
                  <Style>
                    <BorderStyle>
                      <Default>Solid</Default>
                    </BorderStyle>
                  </Style>
                </MajorGridLines>
                <MinorGridLines>
                  <Style>
                    <BorderStyle>
                      <Default>Solid</Default>
                    </BorderStyle>
                  </Style>
                </MinorGridLines>
                <MajorTickMarks>Outside</MajorTickMarks>
                <MinorTickMarks>Inside</MinorTickMarks>
                <Min>0</Min>
                <Interlaced>true</Interlaced>
                <Visible>true</Visible>
                <Scalar>true</Scalar>
              </Axis>
            </CategoryAxis>
            <PointWidth>0</PointWidth>
            <Left>0.25in</Left>
            <ThreeDProperties>
              <Rotation>30</Rotation>
              <Inclination>30</Inclination>
              <Shading>Simple</Shading>
              <WallThickness>50</WallThickness>
            </ThreeDProperties>
            <DataSetName>Class15</DataSetName>
            <SeriesGroupings>
              <SeriesGrouping>
                <StaticSeries>
                  <StaticMember>
                    <Label>Number</Label>
                  </StaticMember>
                </StaticSeries>
              </SeriesGrouping>
            </SeriesGroupings>
            <Top>0.125in</Top>
            <PlotArea>
              <Style>
                <BorderStyle>
                  <Default>Solid</Default>
                </BorderStyle>
                <BackgroundColor>LightGrey</BackgroundColor>
              </Style>
            </PlotArea>
            <ValueAxis>
              <Axis>
                <Title>
                  <Caption>Curve</Caption>
                </Title>
                <MajorGridLines>
                  <ShowGridLines>true</ShowGridLines>
                  <Style>
                    <BorderStyle>
                      <Default>Solid</Default>
                    </BorderStyle>
                  </Style>
                </MajorGridLines>
                <MinorGridLines>
                  <Style>
                    <BorderStyle>
                      <Default>Solid</Default>
                    </BorderStyle>
                  </Style>
                </MinorGridLines>
                <MajorTickMarks>Outside</MajorTickMarks>
                <Min>0</Min>
                <Margin>true</Margin>
                <Visible>true</Visible>
                <Scalar>true</Scalar>
              </Axis>
            </ValueAxis>
            <Type>Line</Type>
            <Width>7.5in</Width>
            <CategoryGroupings>
              <CategoryGrouping>
                <DynamicCategories>
                  <Grouping Name="chart1_CategoryGroup1">
                    <GroupExpressions>
                      <GroupExpression>=Fields!Date.Value</GroupExpression>
                    </GroupExpressions>
                  </Grouping>
                  <Label>=Fields!Date.Value.GetType()</Label>
                </DynamicCategories>
              </CategoryGrouping>
            </CategoryGroupings>
            <Palette>Default</Palette>
            <ChartData>
              <ChartSeries>
                <DataPoints>
                  <DataPoint>
                    <DataValues>
                      <DataValue>
                        <Value>=Sum(Fields!Number.Value)</Value>
                      </DataValue>
                    </DataValues>
                    <DataLabel />
                    <Marker>
                      <Type>Auto</Type>
                      <Size>6pt</Size>
                    </Marker>
                  </DataPoint>
                </DataPoints>
              </ChartSeries>
            </ChartData>
            <Style>
              <WritingMode>tb-rl</WritingMode>
              <BackgroundColor>White</BackgroundColor>
            </Style>
          </Chart>
        </ReportItems>
        <Height>5.625in</Height>
      </Body>
      <rd:ReportID>66c522cd-327e-48fe-b07a-25ac792de9cd</rd:ReportID>
      <LeftMargin>1in</LeftMargin>
      <DataSets>
        <DataSet Name="Class1">
          <rd:DataSetInfo>
            <rd:ObjectDataSourceSelectMethod>AsReadOnly</rd:ObjectDataSourceSelectMethod>
            <rd:ObjectDataSourceType>Class2, App_Code.nj90x-jm, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
          </rd:DataSetInfo>
          <Query>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
            <CommandText />
            <DataSourceName>DummyDataSource</DataSourceName>
          </Query>
          <Fields>
            <Field Name="Name">
              <rd:TypeName>System.String</rd:TypeName>
              <DataField>Name</DataField>
            </Field>
            <Field Name="Number">
              <rd:TypeName>System.Int32</rd:TypeName>
              <DataField>Number</DataField>
            </Field>
          </Fields>
        </DataSet>
        <DataSet Name="Class11">
          <rd:DataSetInfo>
            <rd:ObjectDataSourceSelectMethod>FindAll</rd:ObjectDataSourceSelectMethod>
            <rd:ObjectDataSourceType>Class2, App_Code.nj90x-jm, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
            <rd:ObjectDataSourceSelectMethodSignature>System.Collections.Generic.List`1[Class1] FindAll(System.Predicate`1[Class1])</rd:ObjectDataSourceSelectMethodSignature>
          </rd:DataSetInfo>
          <Query>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
            <CommandText />
            <DataSourceName>DummyDataSource</DataSourceName>
          </Query>
          <Fields>
            <Field Name="Name">
              <rd:TypeName>System.String</rd:TypeName>
              <DataField>Name</DataField>
            </Field>
            <Field Name="Number">
              <rd:TypeName>System.Int32</rd:TypeName>
              <DataField>Number</DataField>
            </Field>
          </Fields>
        </DataSet>
        <DataSet Name="Class12">
          <rd:DataSetInfo>
            <rd:ObjectDataSourceSelectMethod>ToArray</rd:ObjectDataSourceSelectMethod>
            <rd:ObjectDataSourceType>Class2, App_Code.nj90x-jm, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
          </rd:DataSetInfo>
          <Query>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
            <CommandText />
            <DataSourceName>DummyDataSource</DataSourceName>
          </Query>
          <Fields>
            <Field Name="Name">
              <rd:TypeName>System.String</rd:TypeName>
              <DataField>Name</DataField>
            </Field>
            <Field Name="Number">
              <rd:TypeName>System.Int32</rd:TypeName>
              <DataField>Number</DataField>
            </Field>
          </Fields>
        </DataSet>
        <DataSet Name="Class13">
          <rd:DataSetInfo>
            <rd:ObjectDataSourceSelectMethod>GetList</rd:ObjectDataSourceSelectMethod>
            <rd:ObjectDataSourceType>Class2, App_Code.lt14efk8, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
          </rd:DataSetInfo>
          <Query>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
            <CommandText />
            <DataSourceName>DummyDataSource</DataSourceName>
          </Query>
          <Fields>
            <Field Name="Name">
              <rd:TypeName>System.String</rd:TypeName>
              <DataField>Name</DataField>
            </Field>
            <Field Name="Number">
              <rd:TypeName>System.Int32</rd:TypeName>
              <DataField>Number</DataField>
            </Field>
          </Fields>
        </DataSet>
        <DataSet Name="Class14">
          <rd:DataSetInfo>
            <rd:ObjectDataSourceSelectMethod>GetLis2</rd:ObjectDataSourceSelectMethod>
            <rd:ObjectDataSourceType>Class2, App_Code.vod59ep1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
          </rd:DataSetInfo>
          <Query>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
            <CommandText />
            <DataSourceName>DummyDataSource</DataSourceName>
          </Query>
          <Fields>
            <Field Name="Name">
              <rd:TypeName>System.String</rd:TypeName>
              <DataField>Name</DataField>
            </Field>
            <Field Name="Number">
              <rd:TypeName>System.Int32</rd:TypeName>
              <DataField>Number</DataField>
            </Field>
          </Fields>
        </DataSet>
        <DataSet Name="Class15">
          <rd:DataSetInfo>
            <rd:ObjectDataSourceSelectMethod>GetLis2</rd:ObjectDataSourceSelectMethod>
            <rd:ObjectDataSourceType>Class2, App_Code.g6skxqcv, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
          </rd:DataSetInfo>
          <Query>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
            <CommandText />
            <DataSourceName>DummyDataSource</DataSourceName>
          </Query>
          <Fields>
            <Field Name="Date">
              <rd:TypeName>System.DateTime</rd:TypeName>
              <DataField>Date</DataField>
            </Field>
            <Field Name="Name">
              <rd:TypeName>System.String</rd:TypeName>
              <DataField>Name</DataField>
            </Field>
            <Field Name="Number">
              <rd:TypeName>System.Int32</rd:TypeName>
              <DataField>Number</DataField>
            </Field>
          </Fields>
        </DataSet>
      </DataSets>
      <Width>8in</Width>
      <InteractiveHeight>11in</InteractiveHeight>
      <Language>en-US</Language>
      <TopMargin>1in</TopMargin>
    </Report>

    Thursday, August 10, 2006 8:08 PM
  • Set WritingMode to Vertical

    WritingMode
     indicates whether the text is displayed horizontally or vertically.

    by the way it will make your text like this 
    http://picskip.net/u/22094829.png

    I mean text is vertical but starting from top to bottom right now i don't know how it will write from bottom to top.

    Hope it will help.

    Regards,
    Adnan

    • Proposed as answer by TavishB Thursday, February 2, 2012 10:28 PM
    Wednesday, September 22, 2010 9:41 AM