Cargar la ruta de reporte en un CrystalReportViewer
tema enviado por superricagoku en C#
tema iniciado el 13/03/2009
Muy buenos días a la comunidad
El problema que tengo es el siguiente: tengo un formulario con un CrystalReportViewer en el cual cargo varios reportes y lo hace correctamente, el problema surge cuando exporto cualquiera de los reportes que tengo y si quiero cargar ya sea el mismo u otro reporte me proporciona el error de que no puede encontrar la ruta para poderlo cargar, en este codigo se da el error:
ReportDocument reportDocument = new ReportDocument();
if (VGI.tipoimpr == 1)
{
reportDocument.FileName = "..//..//..//wfaInicio//Reportes//EntregaDocumentos.rpt";
}
if (VGI.tipoimpr == 2)
{
reportDocument.FileName = "..//..//..//wfaInicio//Reportes//EgresoDocumentos.rpt";
}
if (VGI.tipoimpr == 3)
{
reportDocument.FileName = "..//..//..//wfaInicio//Reportes//InventarioHipotecasCustodia.rpt";
}
if (VGI.tipoimpr == 4)
{
reportDocument.FileName = "..//..//..//wfaInicio//Reportes//HipotecasPorCentroCosto.rpt";
}
if (VGI.tipoimpr == 5)
{
reportDocument.FileName = "..//..//..//wfaInicio//Reportes//FichaPropiedad.rpt";
}
//Cargar el informe mediante el establecimiento del origen de datos
CRVCustodyValue.ReportSource = reportDocument;
¿Alguien me podria ayudar a como poder resolver este problema?
De antemano muchas gracias por su tiempo en leer mi problema, saludos y tengan buen día