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

Parameter adding and Page Break issue on Reports

1 Answer 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Venkat
Top achievements
Rank 1
Venkat asked on 17 Dec 2014, 12:36 PM
Hi,

We are working on the reports are we are facing couple of issues as below:

- Parameter is applying properly

I have created a Report and added a Parameter to the report by going through these links:

http://www.telerik.com/help/reporting/designing-reports-parameters-adding-parameters.html

http://www.telerik.com/help/reporting/designing-reports-parameters-expressions.html

Right now when I view the report in Preview the report displays the Input box to accept the Parameter value as well. But when I enter the value and click on Preview the whole data is listed in one complete page and the filter is not getting applying. But one thing I observed is, when I enter wrong data that time the data is not displayed. So, we are not able to handle the Parameters at the moment.

- Page break is not happening

In the current result from the DB I am getting about 190 records. When I created a table using TableWizard option, it's creating data table by creating 190 pages with whole list of data what I have read from the DB.

As mentioned above in the first point, when I applied the Parameter search, it displayed single page result but it's again displaying whole list of data. Here is the code sample of the report file for both the issues:

--------
<?xml version="1.0" encoding="utf-8"?>
<Report DataSourceName="sqlDataSource1" Width="6.5in" PageNumberingStyle="ResetNumberingAndCount" Name="Report1" xmlns="http://schemas.telerik.com/reporting/2012/3.7">
  <DataSources>
    <SqlDataSource ConnectionString="oracleConnection" SelectCommand="Select * from t_member" Name="sqlDataSource1" />
  </DataSources>
  <Items>
    <PageHeaderSection Height="1in" Name="pageHeaderSection1" />
    <DetailSection PageBreak="None" Height="0.400039354960124in" Name="detailSection1">
      <Items>
        <Table DataSourceName="sqlDataSource1" Width="6.29996109008789in" Height="0.4in" Left="0.00003941853841146in" Top="0in" KeepTogether="True" Name="table1" StyleName="Normal.TableNormal">
          <Body>
            <Cells>
              <TableCell RowIndex="0" ColumnIndex="0" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.V_MEMBER_CODE" Name="textBox6" StyleName="Normal.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="1" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.V_MEMBER_NAME" Name="textBox7" StyleName="Normal.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="2" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.V_NAB_LENDER" Name="textBox8" StyleName="Normal.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="3" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.V_SHORT_NAME" Name="textBox9" StyleName="Normal.TableBody" />
                </ReportItem>
              </TableCell>
              <TableCell RowIndex="0" ColumnIndex="4" RowSpan="1" ColumnSpan="1">
                <ReportItem>
                  <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="= Fields.V_STATUS" Name="textBox10" StyleName="Normal.TableBody" />
                </ReportItem>
              </TableCell>
            </Cells>
            <Columns>
              <Column Width="1.25999225556827in" />
              <Column Width="1.25999225556827in" />
              <Column Width="1.25999225556827in" />
              <Column Width="1.25999225556827in" />
              <Column Width="1.25999225556827in" />
            </Columns>
            <Rows>
              <Row Height="0.2in" />
            </Rows>
          </Body>
          <Corner />
          <Style Visible="True" />
          <RowGroups>
            <TableGroup Name="Detail">
              <Groupings>
                <Grouping />
              </Groupings>
            </TableGroup>
          </RowGroups>
          <ColumnGroups>
            <TableGroup>
              <ReportItem>
                <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="V_MEMBER_CODE" Name="textBox1" StyleName="Normal.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="V_MEMBER_NAME" Name="textBox2" StyleName="Normal.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="V_NAB_LENDER" Name="textBox3" StyleName="Normal.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="V_SHORT_NAME" Name="textBox4" StyleName="Normal.TableHeader" />
              </ReportItem>
            </TableGroup>
            <TableGroup>
              <ReportItem>
                <TextBox Width="1.25999223679293in" Height="0.2in" Left="0in" Top="0in" Value="V_STATUS" Name="textBox5" StyleName="Normal.TableHeader" />
              </ReportItem>
            </TableGroup>
          </ColumnGroups>
        </Table>
      </Items>
    </DetailSection>
    <PageFooterSection Height="1in" Name="pageFooterSection1" />
  </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="Normal.TableNormal" />
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style 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="Normal.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="Normal.TableBody" />
          </Selectors>
        </DescendantSelector>
      </Selectors>
    </StyleRule>
  </StyleSheet>
  <PageSettings>
    <PageSettings PaperKind="Letter" Landscape="False">
      <Margins>
        <MarginsU Left="1in" Right="1in" Top="1in" Bottom="1in" />
      </Margins>
    </PageSettings>
  </PageSettings>
  <Filters>
    <Filter Expression="= Fields.V_MEMBER_CODE" Operator="Like" Value="=Parameters.MemberCode.Value + &quot;%&quot;" />
  </Filters>
  <ReportParameters>
    <ReportParameter Name="MemberCode" Text="Member Code" Visible="True">
      <Value>
        <String>= Parameters.MemberCode.Value</String>
      </Value>
    </ReportParameter>
  </ReportParameters>
</Report>
----

- Table is repeated on the same page

One more observation on another report design was, the data what we read was about 30 records, which got repeated as new table on same page one below the other. The report generated with 15 pages, with same data.

Since we have reports development at the peek now, can some one please reply to these issues with fix as earliest possible with matter of high importance please?

Regards!

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 22 Dec 2014, 09:49 AM
Hello Venkat,

The Table item is a separate Data Item with its own data source and filters.

In order to configure the table properly, follow these steps:

  1. Set the Report.DataSource = none to prevent the table item from repeating multiple times.
  2. Clear the Report.Filters collection. These filters are applied on the report level, not the table level.
  3. Add the proper filters to the Table.Filters collection.

For more information on the report structure and what is the purpose of the report sections, please refer to the Report Structure Overview help article.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Venkat
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or