Click here to Skip to main content
15,905,427 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to save something in memory to file? Pin
TheFM2342-Sep-08 19:29
TheFM2342-Sep-08 19:29 
AnswerRe: How to save something in memory to file? Pin
Stephen Lintott3-Sep-08 4:08
Stephen Lintott3-Sep-08 4:08 
Generalhelp with webbrowser control C#. net [modified] Solved Pin
Filmxposer2-Sep-08 14:15
Filmxposer2-Sep-08 14:15 
AnswerRe: help with webbrowser control C#. net Pin
Filmxposer2-Sep-08 15:06
Filmxposer2-Sep-08 15:06 
GeneralRe: help with webbrowser control C#. net Pin
#realJSOP2-Sep-08 23:24
professional#realJSOP2-Sep-08 23:24 
QuestionMy Printer CLass Pin
Silvyster2-Sep-08 14:13
Silvyster2-Sep-08 14:13 
AnswerRe: My Printer CLass Pin
JoeSharp2-Sep-08 22:04
JoeSharp2-Sep-08 22:04 
QuestionCrystal Report dataset binding problem Pin
Mudasser Hassan2-Sep-08 13:58
Mudasser Hassan2-Sep-08 13:58 
Hi
I've added a crystal report in my project & added tables of my sql server database in that report. In the display section of the crystal report, I also added the column of the tables those i want to display in my report. Now, I am querying the database and binding the dataset to report but my reports always shows no records. I've checked my code by debugging & there are always 4 recods in the table of the dataset but my reports shows nothing. My code is here:

string query = "SELECT AccountBalanceLog.[Date], Company.CompanyName, Accounts.AccountNo, AccountBalanceLog.BalanceIn, AccountBalanceLog.BalanceOut FROM AccountBalanceLog INNER JOIN Accounts ON AccountBalanceLog.AccountNo = Accounts.AccountNo INNER JOIN Company ON Accounts.CompanyID = Company.CompanyID INNER JOIN Employee ON Accounts.EmployeeID = Employee.EmployeeID WHERE Employee.EmployeeID='1' AND Company.CompanyID='2' AND Accounts.AccountNo='Oanda1'";

SqlConnection Conn = new SqlConnection(MyConnectionString.ConnectionString);

SqlCommand myCommand = new SqlCommand(query, Conn);
Conn.Open();

SqlDataAdapter adp = new SqlDataAdapter(myCommand);

DataSet ds = new DataSet();

adp.Fill(ds);

ReportDocument doc = new ReportDocument();

string cwd = System.IO.Directory.GetCurrentDirectory();
if (cwd.EndsWith("\\bin\\Debug"))
{
cwd = cwd.Replace("\\bin\\Debug", "");
}
doc.FileName = cwd + "\\CrystalReport2.rpt";

doc.SetDataSource(ds);


crystalReportViewer1.ReportSource = doc;

Conn.Close();


please guide me where is am missing something.

thanks in advance...

Regards...
Mudasser Hassan

Questionobject reference not set to an instance of an object??? Pin
Twyce2-Sep-08 12:21
Twyce2-Sep-08 12:21 
AnswerRe: object reference not set to an instance of an object??? Pin
User 66582-Sep-08 12:29
User 66582-Sep-08 12:29 
AnswerRe: object reference not set to an instance of an object??? Pin
MarkB7772-Sep-08 12:53
MarkB7772-Sep-08 12:53 
JokeRe: object reference not set to an instance of an object??? Pin
Dr. Emmett Brown2-Sep-08 12:53
Dr. Emmett Brown2-Sep-08 12:53 
Questionobject reference not set to an instance of an object?????? Pin
Twyce2-Sep-08 12:20
Twyce2-Sep-08 12:20 
AnswerRe: object reference not set to an instance of an object?????? Pin
Mohammad Dayyan2-Sep-08 12:55
Mohammad Dayyan2-Sep-08 12:55 
QuestionHow to copy a Access Database to a SQL Database using C# Pin
three.leaf2-Sep-08 12:03
three.leaf2-Sep-08 12:03 
AnswerRe: How to copy a Access Database to a SQL Database using C# Pin
Dr. Emmett Brown2-Sep-08 12:10
Dr. Emmett Brown2-Sep-08 12:10 
GeneralRe: How to copy a Access Database to a SQL Database using C# Pin
three.leaf2-Sep-08 17:09
three.leaf2-Sep-08 17:09 
QuestionHow to clear MemoryStream ? Pin
Saikek2-Sep-08 11:27
Saikek2-Sep-08 11:27 
AnswerRe: How to clear MemoryStream ? Pin
Bassam Saoud2-Sep-08 11:51
Bassam Saoud2-Sep-08 11:51 
AnswerRe: How to clear MemoryStream ? Pin
Mohammad Dayyan2-Sep-08 13:00
Mohammad Dayyan2-Sep-08 13:00 
GeneralRe: How to clear MemoryStream ? Pin
Saikek2-Sep-08 18:22
Saikek2-Sep-08 18:22 
GeneralRe: How to clear MemoryStream ? Pin
Dave Kreskowiak2-Sep-08 18:41
mveDave Kreskowiak2-Sep-08 18:41 
GeneralRe: How to clear MemoryStream ? Pin
Saikek2-Sep-08 20:31
Saikek2-Sep-08 20:31 
GeneralRe: How to clear MemoryStream ? Pin
Santhosh Thakur12-Oct-11 1:36
Santhosh Thakur12-Oct-11 1:36 
QuestionMy sound stops playing when the form loses focus Pin
DemonicDominic2-Sep-08 10:04
DemonicDominic2-Sep-08 10:04 

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.