Please comment the following line in the page load
event in your code and it should work fine.
C1WebReport1.Report.Clear();
Regards,
Patrick
when i run the application . nothing is displaying in c1webreport control .
can u plz assit me what went wrong
the following is the code
html
<
cc1:C1WebReport
ID="C1WebReport1" runat="server"
Height="640px" Width="608px">
<NavigationBar Style-BackColor="Control">
</NavigationBar>
</cc1:C1WebReport>
<br />
<asp:TextBox ID="TextBox1"
runat="server" Width="272px">Enter the Name of the Customer...</asp:TextBox>
<asp:Button ID="startSearch"
runat="server" OnClick="startSearch_Click" Text="StartSearch"
Width="136px" /><br
/> aspx
code
SqlConnection
myConnection;DataSet myDataSet;
SqlDataAdapter
myDataReader;protected void Page_Load(object sender,
EventArgs e)
{
tempPath = Request.MapPath("Proc.xml");
C1WebReport1.Cache.Clear();
C1WebReport1.ReportSource.FileName =
tempPath;
C1WebReport1.ReportSource.ReportName = "New Report 1";
C1WebReport1.Report.Clear();
C1WebReport1.Cache.Clear();
C1WebReport1.Visible = false;
myConnection =
new
SqlConnection();
}
protected void startSearch_Click(object sender, EventArgs e)
{
C1WebReport1.Cache.Clear();
myConnection.ConnectionString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString.ToString();
myConnection.Open();
myDataReader = new SqlDataAdapter("GetCust", myConnection);
myDataReader.SelectCommand.CommandType =
CommandType.StoredProcedure;myDataReader.SelectCommand.Parameters.Add("@contname", SqlDbType.VarChar,
20);
myDataReader.SelectCommand.Parameters[0].Value =
TextBox1.Text;
myDataSet = new DataSet();
myDataReader.Fill(myDataSet);
C1WebReport1.Report.DataSource.Recordset = myDataSet.Tables[0];
C1WebReport1.DataBind();
C1WebReport1.Visible = true;
myConnection.Close();
}
the xml file is
proc.xml
<?xml version="1.0"?>
<Reports>
<!--Report ***
New Report 1 ***-->
<Report
version="2.5.20073.258">
<Name>New Report
1</Name>
<ReportInfo>
<Author>Gary
Bigman</Author>
</ReportInfo>
<DataSource>
<RecordSource>PARAMETERS contname string
'';
getCust(contname)</RecordSource>
</DataSource>
<Layout>
<Orientation>1</Orientation>
</Layout>
<Font>
<Name>Times New
Roman</Name>
<Size>9</Size>
</Font>
<Groups />
<Sections>
<Section>
<Name>Detail</Name>
<Type>0</Type>
<Height>500</Height>
</Section>
<Section>
<Name>Header</Name>
<Type>1</Type>
<Height>800</Height>
<BackColor>16777215</BackColor>
</Section>
<Section>
<Name>Footer</Name>
<Type>2</Type>
<Visible>0</Visible>
</Section>
<Section>
<Name>PageHeader</Name>
<Type>3</Type>
<Height>600</Height>
</Section>
<Section>
<Name>PageFooter</Name>
<Type>4</Type>
<Height>500</Height>
</Section>
</Sections>
<Fields>
<Field>
<Name>titleLbl</Name>
<Section>1</Section>
<Text>New
Report</Text>
<Top>200</Top>
<Width>9360</Width>
<Height>600</Height>
<Align>6</Align>
<ForeColor>128</ForeColor>
<Font>
<Bold>-1</Bold>
<Name>Times New
Roman</Name>
<Size>20</Size>
</Font>
</Field>
<Field>
<Name>ftrLeft</Name>
<Section>4</Section>
<Text>Now()</Text>
<Calculated>-1</Calculated>
<Top>30</Top>
<Width>4680</Width>
<Height>300</Height>
<Align>0</Align>
<Font>
<Name>Arial</Name>
<Size>9</Size>
</Font>
</Field>
<Field>
<Name>ftrRight</Name>
<Section>4</Section>
<Text>"Page " & [Page] & " of " &
[Pages]</Text>
<Calculated>-1</Calculated>
<Left>4680</Left>
<Top>30</Top>
<Width>4680</Width>
<Height>300</Height>
<Align>2</Align>
<Font>
<Name>Arial</Name>
<Size>9</Size>
</Font>
</Field>
<Field>
<Name>CompanyNameLbl</Name>
<Section>3</Section>
<Text>Title</Text>
<Top>100</Top>
<Width>2880</Width>
<Height>400</Height>
<Align>3</Align>
<ForeColor>128</ForeColor>
<WordWrap>0</WordWrap>
<Font>
<Bold>-1</Bold>
<Name>Arial</Name>
<Size>10</Size>
</Font>
</Field>
<Field>
<Name>customerIDLbl</Name>
<Section>3</Section>
<Text>ProposalID</Text>
<Left>2900</Left>
<Top>100</Top>
<Width>800</Width>
<Height>400</Height>
<Align>3</Align>
<ForeColor>128</ForeColor>
<WordWrap>0</WordWrap>
<Font>
<Bold>-1</Bold>
<Name>Arial</Name>
<Size>10</Size>
</Font>
</Field>
<Field>
<Name>CompanyNameCtl</Name>
<Section>0</Section>
<Text>Title</Text>
<Calculated>-1</Calculated>
<Top>100</Top>
<Width>2880</Width>
<Height>300</Height>
<Align>0</Align>
<CanGrow>-1</CanGrow>
</Field>
<Field>
<Name>customerIDCtl</Name>
<Section>0</Section>
<Text>ProposalID</Text>
<Calculated>-1</Calculated>
<Left>2900</Left>
<Top>100</Top>
<Width>800</Width>
<Height>300</Height>
<Align>0</Align>
</Field>
<Field>
<Name>divLine</Name>
<Section>3</Section>
<Top>540</Top>
<Width>9360</Width>
<Height>60</Height>
<BackColor>0</BackColor>
<BackStyle>1</BackStyle>
</Field>
</Fields>
</Report>
</Reports>
http://helpcentral.componentone.com/cs/forums/p/74916/203732.aspx#203732