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

Report does not fit in print preview or on Pdf export.

6 Answers 1819 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 10 Jul 2015, 10:02 PM

My table report cuts off the far right portion of the table and puts it on another line. This happens when I export to Pdf or when I view it in print preview. I am using the latest version (2015 Q2) of the HTML 5 report view.  I want the report to appear as it appears in the report viewer when I export it to Pdf. 

 

Here is the report definition:

 

<?xml version="1.0" encoding="utf-8"?>
<Report Width="11.9999605814616in" Name="AttendanceReport" xmlns="http://schemas.telerik.com/reporting/2012/3.8">
  <DataSources>
    <SqlDataSource ConnectionString="ZENContext" SelectCommand="exec spReporting_AttendanceReport @InterventionId, @ProgramId, @MethodId, @EventId,&#xD;&#xA;@EducatorId, @City, @Location, @StartDate, @EndDate" Name="sqlDataSource1">
      <Parameters>
        <SqlDataSourceParameter DbType="String" Name="@InterventionId">
          <Value>
            <String>= Parameters.InterventionId.Value</String>
          </Value>
        </SqlDataSourceParameter>
        <SqlDataSourceParameter DbType="Int32" Name="@ProgramId">
          <Value>
            <String>= Parameters.ProgramId.Value</String>
          </Value>
        </SqlDataSourceParameter>
        <SqlDataSourceParameter DbType="String" Name="@MethodId">
          <Value>
            <String>= Parameters.MethodId.Value</String>
          </Value>
        </SqlDataSourceParameter>
        <SqlDataSourceParameter DbType="String" Name="@EventId">
          <Value>
            <String>= Parameters.EventId.Value</String>
          </Value>
        </SqlDataSourceParameter>
        <SqlDataSourceParameter DbType="String" Name="@EducatorId">
          <Value>
            <String>= Parameters.EducatorId.Value</String>
          </Value>
        </SqlDataSourceParameter>
        <SqlDataSourceParameter DbType="String" Name="@City">
          <Value>
            <String>= Parameters.City.Value</String>
          </Value>
        </SqlDataSourceParameter>
        <SqlDataSourceParameter DbType="String" Name="@Location">
          <Value>
            <String>= Parameters.Location.Value</String>
          </Value>
        </SqlDataSourceParameter>
        <SqlDataSourceParameter DbType="DateTime" Name="@StartDate">
          <Value>
            <String>= Parameters.StartDate.Value</String>
          </Value>
        </SqlDataSourceParameter>
        <SqlDataSourceParameter DbType="DateTime" Name="@EndDate">
          <Value>
            <String>= Parameters.EndDate.Value</String>
          </Value>
        </SqlDataSourceParameter>
      </Parameters>
    </SqlDataSource>
  </DataSources>
  <Items>
    <PageHeaderSection Height="1in" Name="pageHeaderSection1">
      <Style BackgroundColor="255, 255, 255" />
      <Items>
        <TextBox Width="2.69999980926514in" Height="0.400000015894572in" Left="0.100000381469727in" Top="0.0999999841054281in" Value="Attendance Report" Name="textBox1">
          <Style>
            <Font Name="Times New Roman" Size="20pt" />
          </Style>
        </TextBox>
      </Items>
    </PageHeaderSection>
    <DetailSection Height="2in" Name="detailSection1">
      <Items>
        <Table DataSourceName="sqlDataSource1" Width="9.80000026226044in" Height="0.4in" Left="0.100000381469727in" Top="0.199999968210856in" Name="table1" StyleName="Corporate.TableNormal">
          <Body>
            <Cells>
              <TableCell RowIndex="0" ColumnIndex="0" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.999999988018249in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.InterventionName" Name="textBox15" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="1" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.ProgramId" Name="textBox16" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="2" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.ProgramName" Name="textBox17" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="3" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.MethodName" Name="textBox18" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="4" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.EventId" Name="textBox19" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="5" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.EventName" Name="textBox20" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="6" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.Educator" Name="textBox21" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="7" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.Location" Name="textBox22" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="8" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.ParticipationStatus" Name="textBox23" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="9" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.ParticipationStatusCount" Name="textBox24" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="10" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.StartDate" Name="textBox25" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="11" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.EndDate" Name="textBox26" StyleName="Corporate.TableBody" />
                </ReportItem>
              </TableCell>
            </Cells>
            <Columns>
              <Column Width="1.00000006103394in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
              <Column Width="0.800000078033429in" />
            </Columns>
            <Rows>
              <Row Height="0.2in" />
            </Rows>
          </Body>
          <Corner />
          <RowGroups>
            <TableGroup Name="Detail">
              <Groupings>
                <Grouping />
              </Groupings>
            </TableGroup>
          </RowGroups>
          <ColumnGroups>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.999999988018249in" Height="0.2in" Left="0in" Top="0in" Value="Intervention" Name="textBox3" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Program Id" Name="textBox4" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Program" Name="textBox5" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Method" Name="textBox6" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Event Id" Name="textBox7" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Event" Name="textBox8" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Educator" Name="textBox9" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Location" Name="textBox10" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Status" Name="textBox11" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Count" Name="textBox12" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="Start Date" Name="textBox13" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="0.8in" Height="0.2in" Left="0in" Top="0in" Value="End Date" Name="textBox14" StyleName="Corporate.TableHeader" />
              </ReportItem>
            </TableGroup>
          </ColumnGroups>
        </Table>
      </Items>
    </DetailSection>
    <PageFooterSection Height="1in" Name="pageFooterSection1">
      <Items>
        <TextBox Width="1.99999968210856in" Height="0.2999607026577in" Left="0.00003941853841146in" Top="0.100000143051147in" Value="=Parameters.TimeRan.Value" Name="textBox2" />
      </Items>
    </PageFooterSection>
  </Items>
  <StyleSheet>
    <StyleRule>
      <Style>
        <Padding Left="2pt" Right="2pt" />
      </Style>
      <Selectors>
        <TypeSelector Type="TextItemBase" />
        <TypeSelector Type="HtmlTextBox" />
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style Color="Black">
        <BorderStyle Default="Solid" />
        <BorderColor Default="Black" />
        <BorderWidth Default="1px" />
        <Font Name="Tahoma" Size="9pt" />
      </Style>
      <Selectors>
        <StyleSelector Type="Table" StyleName="Corporate.TableNormal" />
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style BackgroundColor="28, 58, 112" Color="White" VerticalAlign="Middle">
        <BorderStyle Default="Solid" />
        <BorderColor Default="Black" />
        <BorderWidth Default="1px" />
        <Font Name="Tahoma" Size="10pt" />
      </Style>
      <Selectors>
        <DescendantSelector>
          <Selectors>
            <TypeSelector Type="Table" />
            <StyleSelector Type="ReportItem" StyleName="Corporate.TableHeader" />
          </Selectors>
        </DescendantSelector>
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style>
        <BorderStyle Default="Solid" />
        <BorderColor Default="Black" />
        <BorderWidth Default="1px" />
        <Font Name="Tahoma" Size="9pt" />
      </Style>
      <Selectors>
        <DescendantSelector>
          <Selectors>
            <TypeSelector Type="Table" />
            <StyleSelector Type="ReportItem" StyleName="Corporate.TableBody" />
          </Selectors>
        </DescendantSelector>
      </Selectors>
    </StyleRule>
  </StyleSheet>
  <PageSettings>
    <PageSettings PaperKind="Letter" Landscape="False" ColumnCount="1" ColumnSpacing="0in">
      <Margins>
        <MarginsU Left="1in" Right="1in" Top="1in" Bottom="1in" />
      </Margins>
    </PageSettings>
  </PageSettings>
  <ReportParameters>
    <ReportParameter Name="InterventionId" Type="Integer" AllowNull="True">
      <Value>
        <String></String>
      </Value>
    </ReportParameter>
    <ReportParameter Name="ProgramId" Type="Integer" AllowNull="True">
      <Value>
        <String></String>
      </Value>
    </ReportParameter>
    <ReportParameter Name="MethodId" Type="Integer" AllowNull="True" />
    <ReportParameter Name="EventId" Type="Integer" AllowNull="True" />
    <ReportParameter Name="EducatorId" Text="EducatorId" AllowNull="True" />
    <ReportParameter Name="City" AllowNull="True" />
    <ReportParameter Name="Location" AllowNull="True" />
    <ReportParameter Name="StartDate" Type="DateTime" AllowNull="True" />
    <ReportParameter Name="EndDate" Type="DateTime" AllowNull="True" />
    <ReportParameter Name="TimeRan" Type="DateTime" AllowNull="True">
      <Value>
        <String></String>
      </Value>
    </ReportParameter>
  </ReportParameters>
</Report>

 

Thanks in advance.

6 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 13 Jul 2015, 10:13 AM
Hello JET,

The Report Viewer view and the Print Preview/Export use a different algorithm to page the report. The difference is explained in details in the Interactive vs. Print Layout help article.

When printing/exporting a report, the report page size is limited by the target medium. For example, printing to A4 paper will limit the report page to the A4 paper size. For more information, please visit the Understanding Pagination help article.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Eric
Top achievements
Rank 1
answered on 13 Jul 2015, 05:46 PM
Thank you for your response. The information provided was very helpful. Is there a way to have the width of the table change when printing? If not, what is the strategy that is suggested when dealing with a report that has many different columns? When I adjust the table to be within the red line in the designer all the columns fit on one page but it doesn't look very professional. 
0
Nasko
Telerik team
answered on 14 Jul 2015, 09:17 AM
Hello JET,

A possible solution is to prepare two different reports - one for printing and another one for viewing in a report viewer.

Another solution is to adjust the PageSettings Properties of the report and select a PaperKind which offers a larger paper size, or set the report page orientation to Landscape.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Eric
Top achievements
Rank 1
answered on 14 Jul 2015, 04:06 PM
Is there an equivalent setting for the stand alone designer? I'm not dealing with CLR objects with my report. When I change the setting to Landscape in the page setup, it works fine. The problem is that the setting I choose does not stick. I seems as though these settings can only be configured while in Report Preview mode and can't be saved. 
0
Accepted
Nasko
Telerik team
answered on 15 Jul 2015, 07:14 AM
Hello JET,

The Landscape property should be modified during design-time from the Properties window. Please check this screenshot for reference.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Eric
Top achievements
Rank 1
answered on 15 Jul 2015, 09:08 PM
Thanks. That work a little bit better, but I think I"m going to go with having another report that is re-sized for printing. 
Tags
Report Designer (standalone)
Asked by
Eric
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Eric
Top achievements
Rank 1
Share this question
or