1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
ReportViewer1.ProcessingMode = ProcessingMode.Remote
ReportViewer1.ShowToolBar = False 'la toolbar n'est pas afficher
Dim params As Microsoft.Reporting.WebForms.ReportParameterInfoCollection
params = ReportViewer1.ServerReport.GetParameters()
params.Item(0).MultiValue
Dim param_resume(0) As ReportParameter
'param_resume(0) = New ReportParameter("FonctionComptesDominesIdentifiantResponsable", Membership.GetUser.UserName)
param_resume(0) = New ReportParameter()
param_resume(0).Values.Add(Membership.GetUser.UserName)
param_resume(0).Values.Item(0) = Membership.GetUser.UserName
param_resume(0).Name = "FonctionComptesDominesIdentifiantResponsable"
Dim param_rapp_resume As ReportParameterInfoCollection
param_rapp_resume = ReportViewer1.ServerReport.GetParameters()
Dim contient_param_resume As Boolean = False 'premet de savoir si un rapport contient le parametre identifiant
Dim it2 As ReportParameterInfo
For Each it2 In param_rapp_resume
If it2.Name = "FonctionComptesDominesIdentifiantResponsable" Then contient_param_resume = True
Next
If contient_param_resume = True Then ReportViewer1.ServerReport.SetParameters(param_resume) 'si le rapport contient la parametre identifiant, on lui envoi donc le nom d'utilisateur
ReportViewer1.ServerReport.Refresh() |
Partager