Click here to Skip to main content
15,888,579 members
Home / Discussions / Database
   

Database

 
GeneralRe: Sql Record Select Pin
Elina Blank1-Mar-08 11:45
sitebuilderElina Blank1-Mar-08 11:45 
GeneralSql Select [modified] Pin
NewToAspDotNet11-Feb-08 7:19
NewToAspDotNet11-Feb-08 7:19 
AnswerRe: Sql Select Pin
Ashfield11-Feb-08 7:45
Ashfield11-Feb-08 7:45 
GeneralRe: Sql Select Pin
NewToAspDotNet11-Feb-08 7:57
NewToAspDotNet11-Feb-08 7:57 
GeneralRe: Sql Select Pin
Ashfield11-Feb-08 22:34
Ashfield11-Feb-08 22:34 
GeneralRe: Sql Select Pin
Krish - KP11-Feb-08 17:34
Krish - KP11-Feb-08 17:34 
GeneralRe: Sql Select Pin
Ashfield14-Feb-08 8:18
Ashfield14-Feb-08 8:18 
GeneralAgain Crystal Report Pin
simworld11-Feb-08 4:36
simworld11-Feb-08 4:36 
again I am sending the same problem but this time I searched in google for the code,and use the code that I got from this forum
what I have found i am sending,

---------------------------------------
CrystalReport1 report=new CrystalReport1();

report.ReportOptions.EnableSaveDataWithReport = false;

CrystalDecisions.Shared.TableLogOnInfo myLogin;

CrystalDecisions.Shared.ConnectionInfo oCRConnectionInfo = new CrystalDecisions.Shared.ConnectionInfo();

foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in report.Database.Tables)
{
myLogin = myTable.LogOnInfo ;
//myLogin.ConnectionInfo.ServerName="(local)";
myLogin.ConnectionInfo.ServerName=".";
myLogin.ConnectionInfo.UserID = "sa" ;
myLogin.ConnectionInfo.Password = "123456" ;
myLogin.ConnectionInfo.DatabaseName="temp";

myTable.ApplyLogOnInfo(myLogin) ;
myTable.Location.Substring(myTable.Location.LastIndexOf(".") + 1);

}

OleDbConnection oleConn = new OleDbConnection("Provider=sqloledb; data source = .; initial catalog = inventory; user id = sa; password = 123456");

oleConn.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select * from student",oleConn);

DataSet ds=new DataSet();

da.Fill(ds);

CrystalDecisions.CrystalReports.Engine.ReportDocument myReportDocument;

myReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
myReportDocument.Load(@"C:\Inetpub\wwwroot\temp\CrystalReport1.rpt",CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);

myReportDocument.SetDataSource(ds);
this.CrystalReportViewer1.ReportSource =myReportDocument;

CrystalReportViewer1.DataBind();

CrystalReportViewer1.RefreshReport();

CrystalReportViewer1.DisplayToolbar = true;

CrystalReportViewer1.DisplayGroupTree = false;

oleConn.Close();

I did not got any error but my crystal Report Viewer contains no data i.e. it contains only Crystal Report Toolbar ,no data(Blank Report)


If I use F11 to run step by step ,I found the execution did not enter in the following Code.

foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in report.Database.Tables)
{
myLogin = myTable.LogOnInfo ;
//myLogin.ConnectionInfo.ServerName="(local)";
myLogin.ConnectionInfo.ServerName=".";
myLogin.ConnectionInfo.UserID = "sa" ;
myLogin.ConnectionInfo.Password = "123456" ;
myLogin.ConnectionInfo.DatabaseName="temp";

myTable.ApplyLogOnInfo(myLogin) ;
myTable.Location.Substring(myTable.Location.LastIndexOf(".") + 1);
}

What urgent modifications I need to perform?
Help me.
I am using .Net version 2003.
GeneralPDF Problem Pin
simworld11-Feb-08 4:29
simworld11-Feb-08 4:29 
GeneralReporting in MS Accesss Pin
Vimalsoft(Pty) Ltd11-Feb-08 0:54
professionalVimalsoft(Pty) Ltd11-Feb-08 0:54 
Questionenable remote connection for sql server 2000? Pin
eyeseetee11-Feb-08 0:09
eyeseetee11-Feb-08 0:09 
Generaldifference Pin
trilokharry10-Feb-08 23:03
trilokharry10-Feb-08 23:03 
GeneralRe: difference Pin
Giorgi Dalakishvili11-Feb-08 0:28
mentorGiorgi Dalakishvili11-Feb-08 0:28 
GeneralRe: difference Pin
trilokharry11-Feb-08 2:23
trilokharry11-Feb-08 2:23 
GeneralFind data that does not match between two tables [modified] Pin
fuhaizah10-Feb-08 19:11
fuhaizah10-Feb-08 19:11 
GeneralRe: Find data that does not match between two tables Pin
pmarfleet10-Feb-08 19:30
pmarfleet10-Feb-08 19:30 
GeneralRe: Find data that does not match between two tables Pin
fuhaizah10-Feb-08 19:32
fuhaizah10-Feb-08 19:32 
GeneralRe: Find data that does not match between two tables Pin
pmarfleet10-Feb-08 19:37
pmarfleet10-Feb-08 19:37 
GeneralRe: Find data that does not match between two tables Pin
fuhaizah10-Feb-08 19:41
fuhaizah10-Feb-08 19:41 
GeneralRe: Find data that does not match between two tables Pin
Joe10-Feb-08 19:34
Joe10-Feb-08 19:34 
Generalgroup by, max and another column Pin
swjam10-Feb-08 2:25
swjam10-Feb-08 2:25 
GeneralRe: group by, max and another column Pin
andyharman10-Feb-08 22:41
professionalandyharman10-Feb-08 22:41 
QuestionCan I modify specified text from set of rows [modified] Pin
kimo code9-Feb-08 22:27
kimo code9-Feb-08 22:27 
AnswerRe: Can I modify specified text from set of rows Pin
pmarfleet9-Feb-08 22:53
pmarfleet9-Feb-08 22:53 
GeneralRe: Can I modify specified text from set of rows Pin
kimo code9-Feb-08 23:20
kimo code9-Feb-08 23:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.