Jump to content

Crystal Reports


Recommended Posts

I currently have the following:XSD

<?xml version="1.0" encoding="utf-8"?><xs:schema id="GenericDataSet" targetNamespace="http://tempuri.org/GenericDataSet.xsd" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns="http://tempuri.org/GenericDataSet.xsd" xmlns:mstns="http://tempuri.org/GenericDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">    <xs:element name="GenericDataSet" msdata:IsDataSet="true">        <xs:complexType>            <xs:choice maxOccurs="unbounded">                <xs:element name="GenericElement">                    <xs:complexType>                        <xs:sequence />                        <xs:attribute name="column1" type="xs:string" />                        <xs:attribute name="column2" type="xs:string" />                        <xs:attribute name="column3" type="xs:string" />                        <xs:attribute name="column4" type="xs:string" />                        <xs:attribute name="column5" type="xs:string" />                        <xs:attribute name="column6" type="xs:string" />                    </xs:complexType>                </xs:element>            </xs:choice>        </xs:complexType>    </xs:element></xs:schema>


         private void Page_Load(object sender, System.EventArgs e)        {            GenericDataSet genericDataSet = new GenericDataSet();            GenericReport genericReport = new GenericReport();            connect = ConfigurationSettings.AppSettings["Questionnaire"];            cnt = new SqlConnection(connect);            string sql = "SELECT * FROM AccountFields";            data = new SqlDataAdapter(sql,cnt);            data.Fill(genericDataSet, "GenericElement");            genericReport.SetDataSource(genericDataSet);                                  CrystalReportViewer1.ReportSource = genericReport;            CrystalReportViewer1.DataBind();            CrystalReportViewer1.DisplayToolbar = false;        }

I don't get any errors but when I load the page all that is there is the column headers (column1 ...column6).I have checked genericDataSet.Tables["GenericElement"].Rows.Count after the DataSet is filled and it says there are 15 rows. Why are they not being displayed?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...