Tengo un reporte quetiene un subreporte al cual le paso el querystring, y me sobreescribe los parametros que le paso al reporte principal.
El codigo es:
cryRep.ParameterFields(0) = "Empresa;" & cboEmpresa.ItemData(cboEmpresa.ListIndex) & ";TRUE"
cryRep.ParameterFields(0) = "Planta;" & cboPlanta.ItemData(cboPlanta.ListIndex) & ";TRUE"
cryRep.ReportFileName = vReportDirectory & "\lstOTPdtexDestino.rpt"
cryRep.Connect = "DSN=" & cDSNDefault & ";UID=" & gblUSUARIO & ";PWD=" & gblPassword
cryRep.ReportFileName = vReportDirectory & "\lstOTPdtexDestino.rpt"
cryRep.Connect = "DSN=" & cDSNDefault & ";UID=" & gblUSUARIO & ";PWD=" & gblPassword
cryRep.SubreportToChange = "lstClienteDesc"
cryRep.SQLQuery = "select nombre from " & cTABLA_CLIENTE & " f"
cryRep.Connect = "DSN=" & cDSNDefault & ";UID=" & gblUSUARIO & ";PWD=" & gblPassw
cryRep.SQLQuery = "select nombre from " & cTABLA_CLIENTE & " f"
cryRep.Connect = "DSN=" & cDSNDefault & ";UID=" & gblUSUARIO & ";PWD=" & gblPassw
Al ejecutarse completo me vuelve a pedir los parametros Empresa y Planta, pero si salteo la línea:
cryRep.SQLQuery = "select nombre from " & cTABLA_CLIENTE & " f"
funciona bien.
funciona bien.
Si alguien sabe como puedo solucionar esto sin tener qeu dejar de pasar el query al subreporte dinámicamente, se lo agradecería.
Sldos, Marcela
Latinos en EE.UU: noticias y artículos de interés para ti Clic aquí
