hi every body
i have a trouble with viewing the report from using the following environments
C# - Crystalreport - Oracle database
i regularly use the basic way to call a view form the database and extract the data form it like that
cmd.commandtext= "Create view as select * from table1 where icode = '10'";
cmd.excutenonquery();
and then create a report depending on this view
and regally connect your report viewer with this view
and its working with viewing the report via crystalreport
it's absolutely good for access database ans SQL server
but i's so bad when dealing with oracle database
when i use this past method i found a messagebox showing tell me that it need the user password in oracle database
so i have a trouble to make instance from my report in c#
i follow the following method but it also doesn't work !!
OleDbConnection cn = new OleDbConnection();
OleDbCommand cmdtest = new OleDbCommand();
OleDbDataReader drrr;
OleDbDataAdapter ad = new OleDbDataAdapter();
DataTable dt = new DataTable();
if (cn.State == ConnectionState.Closed)
{
cn.ConnectionString = "provider=oraoledb.oracle.1;password=123;user id = system;";
cn.Open();
}
DataSet ds = new DataSet();
cmdtest.Connection = cn;
cmdtest.CommandType = CommandType.Text;
cmdtest.CommandText = "select * from doc ";
drrr = cmdtest.ExecuteReader();
drrr.Close();
CrystalDecisions.CrystalReports.Engine.ReportClass ss = new CrystalDecisions.CrystalReports.Engine.ReportClass();
ad.SelectCommand = cmdtest;
ad.Fill(ds, "doc");
ss.ResourceName = "docreport.rpt";
ss.SetDataSource(ds.Tables["doc"]);
crystalReportViewer1.ReportSource = ss;
so if you have any idea what i'm wrong about please tell me
thanks a lot