-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: BalajiKrishnan
Message 1 in Discussion

Hi All I have a web application and in the Web Form I have a button on the button 
click I have to open a crystal report....... 
private void Button1_Click(object sender, System.EventArgs e) { SqlDataAdapter adapter 
= new SqlDataAdapter();   DataSet test = new DataSet("EFTTable");   SqlConnection conn 
= new SqlConnection("server=server;User ID=sa;Password=sa;database=McoDev;Connection 
Reset=FALSE");   SqlCommand command = new SqlCommand();   command.Connection = conn;   
command.CommandText = "GetChecksByCheckNumber";   command.CommandType = 
CommandType.StoredProcedure;   command.Parameters.Add("@CHECKNUMBER", SqlDbType.Char); 
  command.Parameters["@CHECKNUMBER"].Value = "00007020";   adapter.SelectCommand = 
command;   adapter.Fill(test,"EFTTable");   // dg1.DataSource = test; // 
dg1.DataBind();   string filename="C:\\MySchema.xsd";   test.WriteXmlSchema(filename); 
  FCRV cr= new FCRV();  // FCRV is the name of the CRYSTAL REPORT FILE  (.RPT)   
cr.SetDataSource(test.Tables["EFTTable"]);   CrystalReportViewer1.ReportSource = cr;  
}   Design Crystal Report Steps   Open Crystal Report ( FCRV.rpt)   Field Explorer - 
Database Fields - Right Click and choose Add/Remove Database - More Data Sources - 
ADO.NET XML and Choose the MySchema.XSD file which is stored in D:\ Drive.   And I get 
the dataset and the fields in the field explorer    And then i drag and drop the 
fields in the report.
 And then I run the application...   NOW MY PROBLEM IS I AM NOT GETTING THE DATA IN 
THE REPORT.   But when I bind the data to a Datagrid I am gettting the data.   What is 
the problem   Is there any other way to open a crystal report ....   Help Needed.   
Balaji.K


-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to