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

Report not displaying data in Application

0 Answers 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 30 Nov 2012, 03:56 PM
I created a POC report in the designer and it is working properly.  I am now trying to implement this in a WPF application and have the report opening, just showing no data.  (I am up to date using the Q3 2012) assemblies.

The ReportContent is being retrieved from a database.  I am replacing the ConnectionString at runtime and have verified that it is being updated appropriately.  At runtime ConnectionString="" is being updated to a valid connection string.

Also, I am not sure why, but if I do not remove "xmlns="http://schemas.telerik.com/reporting/2012/2" from the XML it will not even display the report and tell me that I have an invalid connection.  Simply removing this at least allows the report to display, just with no data.

Here is a sample of the XML being pulled from the database:
<?xml version="1.0" encoding="utf-8"?>
<Report DataSourceName="TestConn" Width="6.45833333333333in" Name="Parent">
  <DataSources>
    <SqlDataSource ConnectionString="" SelectCommand="SELECT ID, CreateDate FROM tblTest WHERE ID= 1234" Name="TestConn" />
  </DataSources>
  <Items>
    <PageHeaderSection Height="0.28125in" Name="pageHeader">
      <Items>
        <TextBox Value="Parent" Size="6.41666666666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.0208333333333333in" Name="reportNameTextBox" StyleName="PageInfo" />
      </Items>
    </PageHeaderSection>
    <PageFooterSection Height="0.28125in" Name="pageFooter">
      <Items>
        <TextBox Value="=NOW()" Size="3.19791666666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.0208333333333333in" Name="currentTimeTextBox" StyleName="PageInfo" />
        <TextBox Value="=PageNumber" Size="3.19791666666667in, 0.200000027815501in" Location="3.23958333333333in, 0.0208333333333333in" Name="pageInfoTextBox" StyleName="PageInfo">
          <Style TextAlign="Right" />
        </TextBox>
      </Items>
    </PageFooterSection>
    <ReportHeaderSection Height="1.0290683110555in" Name="reportHeader">
      <Items>
        <TextBox Value="Parent" Size="6.45833333333333in, 0.787401596705119in" Location="0in, 0in" Name="titleTextBox" StyleName="Title" />
        <TextBox Value="Create Date:" CanGrow="True" Size="3.19791666666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.808234930038452in" Name="createDateCaptionTextBox1" StyleName="Caption">
          <Style TextAlign="Right" />
        </TextBox>
        <TextBox Value="=Fields.CreateDate" CanGrow="True" Size="3.19791666666667in, 0.200000027815501in" Location="3.23958333333333in, 0.808234930038452in" Name="createDateDataTextBox" StyleName="Data" />
      </Items>
    </ReportHeaderSection>
    <ReportFooterSection Height="0.28125in" Name="reportFooter" />
    <DetailSection Height="0.28125in" Name="detail">
      <Items>
        <TextBox Value="=Fields.CreateDate" CanGrow="True" Size="1.58854166666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.0208333333333333in" Name="createDateDataTextBox1" StyleName="Data" />
        <TextBox Value="=Fields.ID" CanGrow="True" Size="1.58854166666667in, 0.200000027815501in" Location="1.63020833333333in, 0.0208333333333333in" Name="iDDataTextBox" StyleName="Data" />
      </Items>
    </DetailSection>
  </Items>
  <StyleSheet>
    <StyleRule>
      <Style Color="28, 58, 112">
        <Font Name="Tahoma" Size="18pt" />
      </Style>
      <Selectors>
        <StyleSelector Type="ReportItemBase" StyleName="Title" />
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style BackgroundColor="28, 58, 112" Color="White" VerticalAlign="Middle">
        <Font Name="Tahoma" Size="10pt" />
      </Style>
      <Selectors>
        <StyleSelector Type="ReportItemBase" StyleName="Caption" />
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style Color="Black" VerticalAlign="Middle">
        <Font Name="Tahoma" Size="9pt" />
      </Style>
      <Selectors>
        <StyleSelector Type="ReportItemBase" StyleName="Data" />
      </Selectors>
    </StyleRule>
    <StyleRule>
      <Style Color="Black" VerticalAlign="Middle">
        <Font Name="Tahoma" Size="8pt" />
      </Style>
      <Selectors>
        <StyleSelector Type="ReportItemBase" StyleName="PageInfo" />
      </Selectors>
    </StyleRule>
  </StyleSheet>
  <PageSettings>
    <PageSettings PaperKind="Letter">
      <Margins>
        <MarginsU Left="1in" Right="1in" Top="1in" Bottom="1in" />
      </Margins>
    </PageSettings>
  </PageSettings>
  <Groups>
    <Group Name="labelsGroup">
      <GroupHeader>
        <GroupHeaderSection PrintOnEveryPage="True" Height="0.28125in" Name="labelsGroupHeader">
          <Items>
            <TextBox Value="Create Date" CanGrow="True" Size="1.58854166666667in, 0.200000027815501in" Location="0.0208333333333333in, 0.0208333333333333in" Name="createDateCaptionTextBox" StyleName="Caption" />
            <TextBox Value="ID" CanGrow="True" Size="1.58854166666667in, 0.200000027815501in" Location="1.63020833333333in, 0.0208333333333333in" Name="createIDCaptionTextBox" StyleName="Caption" />
          </Items>
        </GroupHeaderSection>
      </GroupHeader>
      <GroupFooter>
        <GroupFooterSection Height="0.28125in" Name="labelsGroupFooter">
          <Style Visible="False" />
        </GroupFooterSection>
      </GroupFooter>
    </Group>
  </Groups>
</Report>

No answers yet. Maybe you can help?

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