This is a migrated thread and some comments may be shown as answers.

Table do not shrink back when changing page settings from landscape to portait

0 Answers 9 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lukasz
Top achievements
Rank 1
Lukasz asked on 03 Nov 2017, 02:11 PM

I want to display a table with width of details section. I am generating this table from code. It looks like this:

<Table DataSourceName="EquipmentListSource" Width="18.9997994280509cm" Height="1.5cm" Left="0.00010012308478036cm" Top="0.299999848604206cm" Anchoring="Left, Right" Name="table1" StyleName="Normal.TableNormal">
  <Body>
    <Cells>
      <TableCell RowIndex="0" ColumnIndex="0" RowSpan="1" ColumnSpan="1">
        <ReportItem>
          <TextBox Width="2.57666584246297cm" Height="0.499999970197678cm" Left="0cm" Top="0cm" Value="= Equipment.Name" Format="null" CanGrow="True" CanShrink="True" Name="textBox1" StyleName="Normal.TableBody" />
        </ReportItem>
      </TableCell>
      <TableCell RowIndex="0" ColumnIndex="1" RowSpan="1" ColumnSpan="1">
        <ReportItem>
          <TextBox Width="1.01970437696535cm" Height="0.499999970197678cm" Left="0cm" Top="0cm" Value="= Equipment.InventoryNumber" Format="null" CanGrow="True" CanShrink="True" Name="textBox2" StyleName="Normal.TableBody" />
        </ReportItem>
      </TableCell>
    </Cells>
    <Columns>
      <Column Width="2.57666555934389cm" />
      <Column Width="1.01970430618558cm" />
    </Columns>
    <Rows>
      <Row Height="0.499999970197678cm" />
    </Rows>
  </Body>
  <Corner />
  <RowGroups>
    <TableGroup Name="Detail">
      <Groupings>
        <Grouping />
      </Groupings>
    </TableGroup>
  </RowGroups>
  <ColumnGroups>
    <TableGroup>
      <ReportItem>
        <TextBox Width="2.57666584246297cm" Height="0.999999940395355cm" Left="0cm" Top="0cm" Value="Nazwa" Name="textBox12" StyleName="Normal.TableHeader" />
      </ReportItem>
    </TableGroup>
    <TableGroup>
      <ReportItem>
        <TextBox Width="1.01970437696535cm" Height="0.999999940395355cm" Left="0cm" Top="0cm" Value="Nr inw." Name="textBox13" StyleName="Normal.TableHeader" />
      </ReportItem>
    </TableGroup>
  </ColumnGroups>
</Table>

 

My real table has 13 columns and their initial width is computed based on initial table width.

When I generate my report as "Portait" table fills all available width. 

When I change page settings to "Landscape" cell width grows to accommodate content and table fills all available width.

But when I change page settings back to "Portait" then cell contents is not shrunk back and my table spans to three pages.

What can I do be able to switch from Portait to Landscape and back without this effect?

 

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Lukasz
Top achievements
Rank 1
Share this question
or