Click here to Skip to main content
15,900,461 members
Home / Discussions / C#
   

C#

 
QuestionArgument issues Pin
Saira Tanwir25-Jan-07 17:36
Saira Tanwir25-Jan-07 17:36 
AnswerRe: Argument issues Pin
Christian Graus25-Jan-07 18:10
protectorChristian Graus25-Jan-07 18:10 
GeneralRe: Argument issues Pin
Saira Tanwir25-Jan-07 18:27
Saira Tanwir25-Jan-07 18:27 
GeneralRe: Argument issues Pin
Christian Graus25-Jan-07 18:31
protectorChristian Graus25-Jan-07 18:31 
GeneralRe: Argument issues Pin
Saira Tanwir25-Jan-07 18:35
Saira Tanwir25-Jan-07 18:35 
AnswerRe: Argument issues Pin
Karthik Kalyanasundaram25-Jan-07 18:36
Karthik Kalyanasundaram25-Jan-07 18:36 
GeneralRe: Argument issues Pin
bobsugar22225-Jan-07 21:42
bobsugar22225-Jan-07 21:42 
QuestionMS ReportViewer Cause Application Error Pin
kakarato25-Jan-07 16:12
kakarato25-Jan-07 16:12 
I'm using VS2005 with MSAcsess and MS ReportViewer to genearate a report. It work perfectly in my development environment. When i try to deploy the application to Virtual PC with a clean environment, it work fine. The application will hang when user open the report form and close and reopen (sometime happen on the third time)again the report form.

Below is the code. And also i found out if user close the form in PrintLayout Mode. I must cancel the report rendering in form close event. this.reportViewer1.CancelRendering(5000); Else the program will hanged forever when user click PrintLayout button.

<br />
            FormReport frm = new FormReport();<br />
            this.Cursor = Cursors.WaitCursor;<br />
            try<br />
            {<br />
                frm.ShowReport(sqlStatement + frm2.QueryString + " " + order , reportName);<br />
                frm.ShowDialog();<br />
            }<br />
            catch (Exception ex)<br />
            {<br />
                MessageBox.Show(ex.Message);  <br />
            }<br />
            finally<br />
            {<br />
                //frm.Dispose();<br />
                this.Cursor = Cursors.Default;<br />
            }<br />
<br />
        private void ShowReport(string reportName, ReportsDS reportDS)<br />
        {<br />
            if (reportDS.Report.Rows.Count < 1)<br />
            {<br />
                MessageBox.Show("No records found. Please import data into system.");<br />
                this.Close();<br />
            }<br />
            ReportDataSource reportDataSource = new ReportDataSource();<br />
            reportDataSource.Name = "ReportsDS_Report";<br />
            reportDataSource.Value = reportDS.Report;<br />
            this.reportViewer1.LocalReport.ReportEmbeddedResource = reportName;<br />
            this.reportViewer1.LocalReport.DataSources.Add(reportDataSource);<br />
            this.reportViewer1.RefreshReport();<br />
        }<br />
<br />
        private void FormReport_FormClosing(object sender, FormClosingEventArgs e)<br />
        {<br />
            try<br />
            {<br />
                this.reportViewer1.CancelRendering(5000);<br />
            }<br />
            catch (Exception ex)<br />
            {<br />
                MessageBox.Show(ex.Message); <br />
            }<br />
        }<br />
<br />
<br />

QuestionRich Text Box to Rich Text Box - Help! Pin
rvp717y25-Jan-07 12:57
rvp717y25-Jan-07 12:57 
AnswerRe: Rich Text Box to Rich Text Box - Help! Pin
Luc Pattyn25-Jan-07 14:25
sitebuilderLuc Pattyn25-Jan-07 14:25 
GeneralRe: Rich Text Box to Rich Text Box - Help! Pin
rvp717y26-Jan-07 9:10
rvp717y26-Jan-07 9:10 
AnswerRe: Rich Text Box to Rich Text Box - Help! Pin
bobsugar22225-Jan-07 23:15
bobsugar22225-Jan-07 23:15 
AnswerRe: Rich Text Box to Rich Text Box - Help! Pin
bobsugar22225-Jan-07 23:31
bobsugar22225-Jan-07 23:31 
GeneralRe: Rich Text Box to Rich Text Box - Help! Pin
rvp717y26-Jan-07 9:12
rvp717y26-Jan-07 9:12 
Questionc# to excel Pin
barak16048725-Jan-07 11:28
barak16048725-Jan-07 11:28 
AnswerRe: c# to excel Pin
Ravi Bhavnani25-Jan-07 11:35
professionalRavi Bhavnani25-Jan-07 11:35 
AnswerRe: c# to excel [modified] Pin
mihksoft25-Jan-07 20:05
mihksoft25-Jan-07 20:05 
Answerthank u it helped :) Pin
barak16048726-Jan-07 0:38
barak16048726-Jan-07 0:38 
QuestionSuspending event handling Pin
Drew McGhie25-Jan-07 10:26
Drew McGhie25-Jan-07 10:26 
AnswerRe: Suspending event handling Pin
Abisodun25-Jan-07 11:14
Abisodun25-Jan-07 11:14 
QuestionCast methods Pin
Aaron VanWieren25-Jan-07 10:21
Aaron VanWieren25-Jan-07 10:21 
AnswerRe: Cast methods Pin
Marc Clifton25-Jan-07 12:26
mvaMarc Clifton25-Jan-07 12:26 
GeneralRe: Cast methods Pin
Aaron VanWieren25-Jan-07 12:31
Aaron VanWieren25-Jan-07 12:31 
GeneralRe: Cast methods Pin
Abisodun25-Jan-07 13:48
Abisodun25-Jan-07 13:48 
AnswerRe: Cast methods Pin
Christian Graus25-Jan-07 15:48
protectorChristian Graus25-Jan-07 15: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.