Click here to Skip to main content
15,919,245 members
Home / Discussions / C#
   

C#

 
AnswerRe: A very beginer question [modified] Pin
User 665812-Aug-06 9:28
User 665812-Aug-06 9:28 
AnswerRe: A very beginer question Pin
Judah Gabriel Himango12-Aug-06 11:18
sponsorJudah Gabriel Himango12-Aug-06 11:18 
GeneralRe: A very beginer question [modified] Pin
allende12-Aug-06 11:25
allende12-Aug-06 11:25 
QuestionData Grids Pin
HasithaKavirathna12-Aug-06 8:58
HasithaKavirathna12-Aug-06 8:58 
AnswerRe: Data Grids Pin
CooperWu13-Aug-06 0:31
CooperWu13-Aug-06 0:31 
QuestionPassing Parameter in ... Pin
mostafa_h12-Aug-06 6:46
mostafa_h12-Aug-06 6:46 
AnswerRe: Passing Parameter in ... Pin
CooperWu13-Aug-06 0:32
CooperWu13-Aug-06 0:32 
GeneralRe: Passing Parameter in ... Pin
mostafa_h13-Aug-06 8:41
mostafa_h13-Aug-06 8:41 
In Form1 I've a checkbox . I created a parameter in crystal report .
this is my code :
in btnReport_Click :
{
string strQuery = "SELECT Name FROM MyTable";
sqlconn.Open();
daAdapter = new SqlDataAdapter(strQuery, sqlconn);
SqlCommandBuilder scb = new SqlCommandBuilder(daAdapter);
da.Fill(DatatSet1.MyTable);
//Definitions
ParameterField paramfield = new ParameterField();
ParameterFields paramfields = new ParameterFields();
ParameterDiscreteValue discreteval = new ParameterDiscreteValue();
//setting            
paramfield.Name = "Name";
discreteval.Value = DataSet1.MyTable.Columns[0];
paramfield.CurrentValues.Add(discreteval);
paramfields.Add(paramfield);
crystalReportViewer1.ParameterFieldInfo = paramfields;
crystalReportViewer1.ReportSource = crystalreport1;
sqlconn.Close();
}

I want to take a report from all of records' Name field of the Table When The user checked "CheckBox1" Control .
I have an Error in this part :
discreteval.Value = DataSet1.MyTable.Columns[0];
with this message :
Value does not fall within the expected range.
Please Help Me !
Regrds ,



s_mostafa_h

GeneralRe: Passing Parameter in ... Pin
CooperWu13-Aug-06 16:15
CooperWu13-Aug-06 16:15 
GeneralRe: Passing Parameter in ... Pin
mostafa_h13-Aug-06 21:24
mostafa_h13-Aug-06 21:24 
GeneralRe: Passing Parameter in ... Pin
CooperWu13-Aug-06 21:31
CooperWu13-Aug-06 21:31 
GeneralRe: Passing Parameter in ... Pin
mostafa_h14-Aug-06 0:16
mostafa_h14-Aug-06 0:16 
GeneralRe: Passing Parameter in ... Pin
CooperWu14-Aug-06 1:43
CooperWu14-Aug-06 1:43 
Questionpassword Pin
skyeddie12-Aug-06 4:49
skyeddie12-Aug-06 4:49 
AnswerRe: password Pin
CooperWu13-Aug-06 0:34
CooperWu13-Aug-06 0:34 
QuestionHow do others make a shareware registration system? Pin
Stick^12-Aug-06 4:13
Stick^12-Aug-06 4:13 
AnswerRe: How do others make a shareware registration system? Pin
mav.northwind12-Aug-06 5:17
mav.northwind12-Aug-06 5:17 
QuestionClick 'Start Debugging' but nothing happens Pin
J Liang12-Aug-06 3:57
J Liang12-Aug-06 3:57 
AnswerRe: Click 'Start Debugging' but nothing happens Pin
Rob Graham12-Aug-06 4:16
Rob Graham12-Aug-06 4:16 
GeneralRe: Click 'Start Debugging' but nothing happens Pin
J Liang12-Aug-06 6:38
J Liang12-Aug-06 6:38 
Questionchange selectedItem color in listBox Pin
Nafiseh Salmani12-Aug-06 1:30
Nafiseh Salmani12-Aug-06 1:30 
AnswerRe: change selectedItem color in listBox Pin
Guffa12-Aug-06 2:38
Guffa12-Aug-06 2:38 
QuestionHow to use Windows Service to call a Windows Form Pin
IamFengDong12-Aug-06 1:21
IamFengDong12-Aug-06 1:21 
Questioncapturing data from modem Pin
mehrdadc4812-Aug-06 0:29
mehrdadc4812-Aug-06 0:29 
AnswerRe: capturing data from modem Pin
Divyang Mithaiwala12-Aug-06 2:14
Divyang Mithaiwala12-Aug-06 2:14 

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.