Click here to Skip to main content
15,881,812 members
Home / Discussions / C#
   

C#

 
AnswerRe: make a new object in an event! Pin
Henry Minute6-May-09 12:01
Henry Minute6-May-09 12:01 
GeneralRe: make a new object in an event! Pin
pcsience9-May-09 2:29
pcsience9-May-09 2:29 
QuestionCompositeDataBoundControl designer crashes VS2008 Pin
Andre Vianna6-May-09 4:40
Andre Vianna6-May-09 4:40 
Questionproblem in C# Pin
kakarman6-May-09 4:26
kakarman6-May-09 4:26 
AnswerRe: problem in C# Pin
musefan6-May-09 4:29
musefan6-May-09 4:29 
AnswerRe: problem in C# Pin
led mike6-May-09 4:37
led mike6-May-09 4:37 
AnswerRe: problem in C# Pin
Luc Pattyn6-May-09 4:38
sitebuilderLuc Pattyn6-May-09 4:38 
QuestionCrystal report binding Pin
KIDYA6-May-09 3:31
KIDYA6-May-09 3:31 
Hi.....
I have combobox which gives table list.After selecting table from same then crystal report view must show table data.
I got problem with crystal report binding.I am using C#.net and in my code i m using "dataset1 Ds" which retrieve all values but cant show that data into crystalreport viewer.
kindly find my code below......
<pre>
private void cmb_type_SelectedIndexChanged(object sender, EventArgs e)
{


if (Convert.ToInt32(cmb_type.SelectedIndex) == -1 && (Convert.ToString(cmb_type.SelectedValue) == "System.Data.DataRowView"))
{
return;
}
CrystalReport1 objRpt;
objRpt = new CrystalReport1();


String ConnStr = "Data Source=SHREE\\SQLEXPRESS;Initial Catalog=NandKumar;Integrated Security=True";

SqlConnection myConnection = new SqlConnection(ConnStr);

string Query1 = "Select * from " + cmb_type.Text ;

SqlDataAdapter adapter = new SqlDataAdapter(Query1, ConnStr);
DataSet1 Ds = new DataSet1();
adapter.Fill(Ds,"C"); // " + cmb_type.Text + "

if (Ds.Tables[0].Rows.Count == 0)
{
MessageBox.Show("No data Found", "Project Tracker Suite");
return;
}
// Upto this my code run- ok,i got problem from here...



objRpt.SetDataSource(Ds.Tables["C"].DefaultView);
CrystalDecisions.CrystalReports.Engine.TextObject root;
root = (CrystalDecisions.CrystalReports.Engine.TextObject)objRpt.ReportDefinition.ReportObjects["txtHeader"];
root.Text = "Sample Report With Parameter!!";
crystalReportViewer1.Visible = true;
crystalReportViewer1.ReportSource = objRpt;

}
}
QuestionHTK Pin
dileeparuwan6-May-09 3:25
dileeparuwan6-May-09 3:25 
QuestionUsing Cell Phone as a PC Microphone in using in the hand 32feet Pin
Ami Vaknin6-May-09 3:21
Ami Vaknin6-May-09 3:21 
AnswerRe: Using Cell Phone as a PC Microphone in using in the hand 32feet Pin
Henry Minute6-May-09 6:21
Henry Minute6-May-09 6:21 
GeneralRe: Using Cell Phone as a PC Microphone in using in the hand 32feet Pin
Ami Vaknin6-May-09 11:16
Ami Vaknin6-May-09 11:16 
QuestionOut of Memory exception.. Pin
Jacob Dixon6-May-09 3:16
Jacob Dixon6-May-09 3:16 
AnswerRe: Out of Memory exception.. Pin
S. Senthil Kumar6-May-09 9:09
S. Senthil Kumar6-May-09 9:09 
GeneralRe: Out of Memory exception.. Pin
Jacob Dixon6-May-09 10:18
Jacob Dixon6-May-09 10:18 
GeneralRe: Out of Memory exception.. Pin
S. Senthil Kumar6-May-09 10:25
S. Senthil Kumar6-May-09 10:25 
QuestionReading large xls files in C# Pin
aastudent6-May-09 3:08
aastudent6-May-09 3:08 
AnswerRe: Reading large xls files in C# Pin
foluis26-Mar-10 11:16
foluis26-Mar-10 11:16 
GeneralRe: Reading large xls files in C# Pin
aastudent28-Mar-10 21:47
aastudent28-Mar-10 21:47 
GeneralRe: Reading large xls files in C# Pin
foluis29-Mar-10 8:22
foluis29-Mar-10 8:22 
QuestionConverting C source code into C# source code Pin
dileeparuwan6-May-09 3:05
dileeparuwan6-May-09 3:05 
AnswerRe: Converting C source code into C# source code Pin
musefan6-May-09 3:13
musefan6-May-09 3:13 
GeneralRe: Converting C source code into C# source code Pin
dileeparuwan6-May-09 3:17
dileeparuwan6-May-09 3:17 
AnswerRe: Converting C source code into C# source code Pin
Dave Doknjas6-May-09 12:53
Dave Doknjas6-May-09 12:53 
Questioncall Oracle function which returns a REF CURSOR - tutorial? Pin
devvvy6-May-09 2:59
devvvy6-May-09 2:59 

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.