Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/02/2010, 17:09
juanes222
 
Fecha de Ingreso: septiembre-2005
Ubicación: Medellin
Mensajes: 215
Antigüedad: 18 años, 7 meses
Puntos: 0
VB.NET con ReportViewer - Reporting Services

Saludos,

tengo el siguiente código con el que trato de abrir un reporte:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Dim idPedido As Long = Request.QueryString("pedido")
Dim idPedido As Long = 900
Dim instance As New Microsoft.Reporting.WebForms.ReportParameter("@idp edido", idPedido)
Dim prm(0) As Microsoft.Reporting.WebForms.ReportParameter

prm(0) = New Microsoft.Reporting.WebForms.ReportParameter("@idp edido", idPedido)
ReportViewer1.LocalReport.ReportPath = Server.MapPath("Pedido.rdlc")
ReportViewer1.LocalReport.SetParameters(prm)
ReportViewer1.DataBind()
ReportViewer1.ExportContentDisposition = Microsoft.Reporting.WebForms.ContentDisposition.Al waysInline
End Sub

Pero me sale el siguiente error:

El código de usuario no controló Microsoft.Reporting.WebForms.LocalProcessingExcept ion
Message="Se ha producido un error durante el procesamiento local de informes."
Source="Microsoft.ReportViewer.WebForms"
StackTrace:
en Microsoft.Reporting.WebForms.LocalReport.SetParame ters(IEnumerable`1 parameters) en farmacias_reportes_Pedidos.Page_Load(Object sender, EventArgs e) en E:\Mis documentos\Visual Studio 2008\WebSites\ProyectoPharmaSiempre\farmacias\repo rtes\Pedido.aspx.vb:línea 13 en System.Web.UI.Control.OnLoad(EventArgs e) en System.Web.UI.Control.LoadRecursive() en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: Microsoft.ReportingServices.Diagnostics.Utilities. UnknownReportParameterException
DefaultNamespacePrefix="msrs"
DefaultServerErrorNamespace="http://www.microsoft.com/sql/reportingservices"
ErrorNotVisibleOnRemoteBrowsers="Para obtener más información acerca de este error, vaya al servidor de informes en el equipo del servidor local o habilite los errores remotos"
ExceptionLevelHelpLink="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.D iagnostics.Utilities.ErrorStrings&EvtID=rsUnknownR eportParameter&ProdName=Microsoft%20SQL%20Server%2 0Reporting%20Services&ProdVer=9.0.21022.8"
Message="Se ha intentado establecer un parámetro de informe 'idpedido', que no está definido en este informe."
SkipTopLevelMessage=False
Source="Microsoft.ReportViewer.Common"
StackTrace:
en Microsoft.ReportingServices.ReportProcessing.Param eterInfoCollection.Combine(ParameterInfoCollection oldParameters, ParameterInfoCollection newParameters, Boolean checkReadOnly, Boolean ignoreNewQueryParams, Boolean isParameterDefinitionUpdate, CultureInfo culture) en Microsoft.ReportingServices.ReportProcessing.Param eterInfoCollection.Combine(ParameterInfoCollection oldParameters, ParameterInfoCollection newParameters, Boolean checkReadOnly, Boolean ignoreNewQueryParams, Boolean isParameterDefinitionUpdate) en Microsoft.Reporting.LocalService.GetReportParamete rs(CatalogItemContext reportContext, NameValueCollection userSpecifiedValues, ParameterInfoCollection baseLineParameters, DatasourceCredentialsCollection credentials, ReportRuntimeSetup reportRuntimeSetup) en Microsoft.Reporting.WebForms.LocalReport.SetParame ters(IEnumerable`1 parameters)
InnerException:


Alguien sabe como puedo agregar ese parametro al reporte? y bueno, solucionar ese detalle, gracias...
__________________
JU4N35