Click here to Skip to main content
15,898,588 members
Home / Discussions / C#
   

C#

 
QuestionProblem with running C# application using ZedGraph Pin
TamasK911-Aug-09 9:02
TamasK911-Aug-09 9:02 
AnswerRe: Problem with running C# application using ZedGraph Pin
Member 360949112-Aug-09 14:35
Member 360949112-Aug-09 14:35 
QuestionPosition of a bitmap into a PictureBox Pin
Mirshinni11-Aug-09 8:36
Mirshinni11-Aug-09 8:36 
AnswerRe: Position of a bitmap into a PictureBox Pin
Henry Minute11-Aug-09 8:46
Henry Minute11-Aug-09 8:46 
GeneralRe: Position of a bitmap into a PictureBox Pin
Mirshinni11-Aug-09 9:36
Mirshinni11-Aug-09 9:36 
GeneralRe: Position of a bitmap into a PictureBox Pin
Henry Minute11-Aug-09 10:21
Henry Minute11-Aug-09 10:21 
AnswerRe: Position of a bitmap into a PictureBox Pin
Luc Pattyn11-Aug-09 22:58
sitebuilderLuc Pattyn11-Aug-09 22:58 
Questionc# vs2008 Reportviewer is not closing the database [modified] Pin
dyohanan11-Aug-09 8:17
dyohanan11-Aug-09 8:17 
Hi all,

I have an issue with the report viewer. I created my reports with reportviewer tool and everything
works ok.
My problem is, once I created a report and close the report form and then I tried to update
something on my database I always received and error message that the database cannot been opened.
So my question here is ... How can I force reportviewer to close any database opened after I close
my report form?

Here is the complete code of my report form:

<pre>
using System;
using System.Windows.Forms;

namespace SACK
{
      public partial class frmReportes : Form
      {
            public frmReportes()
            {
                  InitializeComponent();
            }

            private void frmReportes_Load(object sender, EventArgs e)
            {
                  this.repViewer.RefreshReport();
            }

            private void btnSalir_Click(object sender, EventArgs e)
            {
                  this.Close();
            }

            private void btbGenerarReporte_Click(object sender, EventArgs e)
            {
                  DateTime fechaIni = Convert.ToDateTime(dtpFechaIni.Text);
                  DateTime fechaFin = Convert.ToDateTime(dtpFechaFinal.Text);

                  // Reporte de Entradas
                  if (rbuEntradas.Checked)
                  {
                        try
                        {
                              this.tPrinterTableAdapter.FillByEntradas(this.KardexPrinterDBDataSet.tProductos, fechaIni, fechaFin);
                              this.repViewer.LocalReport.ReportEmbeddedResource = "SACK.ReportByEntradas.rdlc";
                              this.repViewer.RefreshReport();
                        }
                        catch (System.Exception ex)
                        {
                              System.Windows.Forms.MessageBox.Show(ex.Message);
                        }
                  }
                  // Reporte de Salidas
                  if (rbuSalidas.Checked)
                  {
                        try
                        {
                              this.tPrinterTableAdapter.FillBySalidas(this.KardexPrinterDBDataSet.tProductos, fechaIni, fechaFin);
                              this.repViewer.RefreshReport();
                        }
                        catch (System.Exception ex)
                        {
                              System.Windows.Forms.MessageBox.Show(ex.Message);
                        }
                  }
                  // Reporte de Entradas / Salidas
                  if (rbuSalidas.Checked)
                  {
                        try
                        {
                              this.tPrinterTableAdapter.FillByEntradasSalidas(this.KardexPrinterDBDataSet.tProductos, fechaIni, fechaFin);
                              this.repViewer.RefreshReport();
                        }
                        catch (System.Exception ex)
                        {
                              System.Windows.Forms.MessageBox.Show(ex.Message);
                        }
                  }
                  // Reporte de Existencias
                  if (rbuSalidas.Checked)
                  {
                        try
                        {
                              this.tPrinterTableAdapter.FillByExistencias(this.KardexPrinterDBDataSet.tProductos, fechaIni, fechaFin);
                              this.repViewer.RefreshReport();
                        }
                        catch (System.Exception ex)
                        {
                              System.Windows.Forms.MessageBox.Show(ex.Message);
                        }
                  }
            }
      }
}

</pre>

Hope someone can help me on this... thank you!:cool

modified on Tuesday, August 11, 2009 2:56 PM

QuestionProperly linking inter-dependent libraries Pin
Mike Marynowski11-Aug-09 6:58
professionalMike Marynowski11-Aug-09 6:58 
AnswerRe: Properly linking inter-dependent libraries Pin
Scott Dorman11-Aug-09 7:21
professionalScott Dorman11-Aug-09 7:21 
GeneralRe: Properly linking inter-dependent libraries Pin
Mike Marynowski11-Aug-09 7:28
professionalMike Marynowski11-Aug-09 7:28 
GeneralRe: Properly linking inter-dependent libraries Pin
Scott Dorman11-Aug-09 7:43
professionalScott Dorman11-Aug-09 7:43 
GeneralRe: Properly linking inter-dependent libraries Pin
Mike Marynowski11-Aug-09 7:53
professionalMike Marynowski11-Aug-09 7:53 
Questiondatagridview row back color Pin
prubyholl11-Aug-09 6:40
professionalprubyholl11-Aug-09 6:40 
AnswerRe: datagridview row back color Pin
dan!sh 11-Aug-09 6:57
professional dan!sh 11-Aug-09 6:57 
GeneralRe: datagridview row back color Pin
prubyholl11-Aug-09 7:05
professionalprubyholl11-Aug-09 7:05 
QuestionPrint (some column) of data grid view Pin
Samb198511-Aug-09 5:52
Samb198511-Aug-09 5:52 
AnswerRe: Print (some column) of data grid view Pin
Muhammad Mazhar11-Aug-09 6:07
Muhammad Mazhar11-Aug-09 6:07 
AnswerRe: Print (some column) of data grid view Pin
Mycroft Holmes11-Aug-09 14:22
professionalMycroft Holmes11-Aug-09 14:22 
GeneralRe: Print (some column) of data grid view Pin
Samb198518-Aug-09 5:46
Samb198518-Aug-09 5:46 
QuestionDataGridView navigating to Child Rows Pin
codeboy198811-Aug-09 5:09
codeboy198811-Aug-09 5:09 
QuestionAddInCustomAction not working properly Pin
lune1211-Aug-09 4:30
lune1211-Aug-09 4:30 
AnswerRe: AddInCustomAction not working properly Pin
Pete O'Hanlon11-Aug-09 4:44
mvePete O'Hanlon11-Aug-09 4:44 
GeneralRe: AddInCustomAction not working properly Pin
lune1211-Aug-09 4:54
lune1211-Aug-09 4:54 
QuestionNeed To Convert Time Pin
Rahul DSG11-Aug-09 4:02
Rahul DSG11-Aug-09 4:02 

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.