Click here to Skip to main content
15,923,909 members
Home / Discussions / C#
   

C#

 
QuestionUI Control Help Pin
Syed Shahid Hussain2-Sep-08 21:26
Syed Shahid Hussain2-Sep-08 21:26 
AnswerRe: UI Control Help Pin
AhsanS2-Sep-08 22:10
AhsanS2-Sep-08 22:10 
GeneralRe: UI Control Help Pin
Syed Shahid Hussain2-Sep-08 22:40
Syed Shahid Hussain2-Sep-08 22:40 
GeneralRe: UI Control Help Pin
Pete O'Hanlon3-Sep-08 2:05
mvePete O'Hanlon3-Sep-08 2:05 
GeneralRe: UI Control Help Pin
Syed Shahid Hussain3-Sep-08 18:00
Syed Shahid Hussain3-Sep-08 18:00 
QuestionHow to save something in memory to file? Pin
gigahertz2052-Sep-08 16:04
gigahertz2052-Sep-08 16:04 
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 

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.