Click here to Skip to main content
15,891,951 members
Home / Discussions / C#
   

C#

 
AnswerRe: XML writing problem ? Pin
blackjack215014-Jul-08 20:59
blackjack215014-Jul-08 20:59 
GeneralRe: XML writing problem ? Pin
Mohammad Dayyan15-Jul-08 10:09
Mohammad Dayyan15-Jul-08 10:09 
Questiondata between form & usercontrol Pin
nelsonpaixao14-Jul-08 12:58
nelsonpaixao14-Jul-08 12:58 
QuestionUnable to create a 2-Dimensional Array for Database Records............... Pin
Reality Strikes14-Jul-08 10:23
Reality Strikes14-Jul-08 10:23 
AnswerRe: Unable to create a 2-Dimensional Array for Database Records............... Pin
led mike14-Jul-08 10:43
led mike14-Jul-08 10:43 
GeneralRe: Unable to create a 2-Dimensional Array for Database Records............... Pin
Reality Strikes14-Jul-08 10:56
Reality Strikes14-Jul-08 10:56 
GeneralRe: Unable to create a 2-Dimensional Array for Database Records............... Pin
Reality Strikes14-Jul-08 10:59
Reality Strikes14-Jul-08 10:59 
GeneralRe: Unable to create a 2-Dimensional Array for Database Records............... Pin
led mike14-Jul-08 11:09
led mike14-Jul-08 11:09 
ROTFLMA Thanks dude, that's the first good laugh I've had today. See what I am thinking is that they didn't design Crystal reports to print out the first row of your table 30,000 times so it's likely your code is incorrect somewhere.

Hey check this out man. I've never used Crystal Reports but I bet the following portions of your code just aren't correct because there is no need to assign the .ReportSource property for every single row and for every single parameter in your table. It also doesn't make sense that you have to set report parameters for every single row in your table.

What do you think? Are you using some tutorial or something or are you just guessing how to use Crystal Reports?

reality_strikes wrote:
The actual code before storing it in 2D-array is as given below:

private void btnReport_Click(object sender, System.EventArgs e)
{
try
{
makeReport(report_file);
for (int recordCount=0; recordCount <= myTable.Rows.Count; recordCount++)
{
SetParamValue("@parameter1", myTable.Rows[recordCount]["CLNT#"].ToString());
SetParamValue("@parameter2", myTable.Rows[recordCount]["CNAME"].ToString());
SetParamValue("@parameter3", myTable.Rows[recordCount]["CSEX"].ToString());
SetParamValue("@parameter4", myTable.Rows[recordCount]["CSS#"].ToString());
crystalReportViewer1.ReportSource = ReportDoc;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "EXCEPTION");
}
}



private void SetParamValue (string paramName, string paramValue)
{
for(int i=0;i < ReportDoc.DataDefinition.FormulaFields.Count; i++)
if(ReportDoc.DataDefinition.FormulaFields[i].FormulaName=="{" + paramName + "}")
{
ReportDoc.DataDefinition.FormulaFields[i].Text = "\"" +paramValue +"\"";
}
crystalReportViewer1.ReportSource = ReportDoc;
}





led mike

GeneralRe: Unable to create a 2-Dimensional Array for Database Records............... Pin
Reality Strikes15-Jul-08 3:20
Reality Strikes15-Jul-08 3:20 
GeneralRe: Unable to create a 2-Dimensional Array for Database Records............... Pin
led mike15-Jul-08 5:36
led mike15-Jul-08 5:36 
QuestionDragable rectangles Pin
Casper Hansen14-Jul-08 9:22
Casper Hansen14-Jul-08 9:22 
AnswerRe: Dragable rectangles Pin
C1AllenS14-Jul-08 9:50
C1AllenS14-Jul-08 9:50 
GeneralRe: Dragable rectangles Pin
Luc Pattyn14-Jul-08 10:14
sitebuilderLuc Pattyn14-Jul-08 10:14 
AnswerRe: Dragable rectangles Pin
Casper Hansen15-Jul-08 2:58
Casper Hansen15-Jul-08 2:58 
QuestionHelp needed Pin
SHINOJK14-Jul-08 8:23
SHINOJK14-Jul-08 8:23 
QuestionSame Random Numbers Pin
humayunlalzad14-Jul-08 5:27
humayunlalzad14-Jul-08 5:27 
AnswerRe: Same Random Numbers Pin
DaveyM6914-Jul-08 5:34
professionalDaveyM6914-Jul-08 5:34 
GeneralRe: Same Random Numbers Pin
humayunlalzad14-Jul-08 5:36
humayunlalzad14-Jul-08 5:36 
GeneralRe: Same Random Numbers Pin
leppie14-Jul-08 5:38
leppie14-Jul-08 5:38 
GeneralRe: Same Random Numbers Pin
humayunlalzad14-Jul-08 5:52
humayunlalzad14-Jul-08 5:52 
GeneralRe: Same Random Numbers Pin
leppie14-Jul-08 5:54
leppie14-Jul-08 5:54 
GeneralRe: Same Random Numbers Pin
humayunlalzad14-Jul-08 5:57
humayunlalzad14-Jul-08 5:57 
GeneralRe: Same Random Numbers Pin
DaveyM6914-Jul-08 6:07
professionalDaveyM6914-Jul-08 6:07 
GeneralRe: Same Random Numbers Pin
humayunlalzad14-Jul-08 6:17
humayunlalzad14-Jul-08 6:17 
GeneralRe: Same Random Numbers Pin
Colin Angus Mackay14-Jul-08 11:48
Colin Angus Mackay14-Jul-08 11:48 

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.