glo-dba
asked on
SSRS ignoring url parameter
I'm rendering a SSRS report via a url. It accepts the first parameter in the url, but ignores the second parameter (and the third parameter), but uses fourth parameter. The first three parameters are cascading parameters; ProgramAreas determine Divisions, and Divisions determine Employees. The Division in the url is in the drop down. I believe that this did work at one time, but does not work any longer. All parameters are integers. Any ideas?
http://lulu/ReportServer/Pages/ReportViewer.aspx?%2fDevelopment%2fTimekeeperTrainingReports%2frptTimekeeperTrainingCascadingParms&rs%3aCommand=Render&SelectedProgramAreas=4&SelectedDivisions=1&SelectedEmployees=11326&MinimumHours=99999
Thanks
http://lulu/ReportServer/Pages/ReportViewer.aspx?%2fDevelopment%2fTimekeeperTrainingReports%2frptTimekeeperTrainingCascadingParms&rs%3aCommand=Render&SelectedProgramAreas=4&SelectedDivisions=1&SelectedEmployees=11326&MinimumHours=99999
Thanks
Check the parameters names (is case sensitive) and give feedback
ASKER
I copied the parameter names from the url and the report, thencompared them character by character. They are the same, capitalization and all.
Check my example:
Try understand the Function generateReportLink
In the web.config I have:
And in asp page I have this:
Protected Sub butCallReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles butCallReport.Click
Dim intEmpresa As Integer = Me.txtEmpresa.Text
Dim intTipoEmpresa As Integer = Me.txtTipoEmpresa.Text
Dim intEstado As Integer = 0
Dim strMne As String = Me.txtMnemonica.Text
Dim strDes As String = Me.txtDesignacao.Text
Dim dtDataInicial As DateTime = Me.txtDataInicial.Text
Dim dtDataFinal As DateTime = Me.txtDataFinal.Text
'Inicializacao Report2
Dim intTipoUser As Integer = 0
Dim intAmbiente As Integer = 0
'Incializacao Report4
Dim intUserId As Integer = 119
Dim strPathReport1 As String = ""
Dim strPathReport2 As String = ""
Dim strPathReport3 As String = ""
Dim strPathReport4 As String = ""
Select Case Me.cmbDestino.Text
Case "ActiveX"
strPathReport1 = "frmReport.aspx?prmReport= 1&prmEmp=" & intEmpresa & "&prmTipoEmpresa=" & intTipoEmpresa & "&prmEstado=" & intEstado & " &prmMne=" & strMne & "&prmDes=" & strDes & " &prmDataIni=" & dtDataInicial & "&prmDataFin=" & dtDataFinal
strPathReport2 = "frmReport.aspx?prmReport= 2&prmEmp=" & intEmpresa & "&prmTipoUser=" & intTipoUser & "&prmEstado=" & intEstado & "&prmUserId=" & strMne & "&prmDes=" & strDes & "&prmDataIni=" & dtDataInicial & "&prmDataFin=" & dtDataFinal & "&prmAmb=" & intAmbiente
strPathReport3 = "frmReport.aspx?prmReport= 3&prmEmp=" & intEmpresa
strPathReport4 = "frmReport.aspx?prmReport= 4&prmUserI d=" & intUserId
Case "XHTML"
Dim strPathPrm1 As String = "&prmEmpresa=" & intEmpresa & "&prmTipoEmpresa=" & intTipoEmpresa & "&prmEstado=" & intEstado & "&prmMnemonica=" & strMne & "&prmDesignacao=" & strDes & "&prmDataInicial=" & dtDataInicial & "&prmDataFinal=" & dtDataFinal
Dim strPathPrm2 As String = "&prmEmpresa=" & intEmpresa & "&prmTipoUtilizador=" & intTipoUser & "&prmEstado=" & intEstado & "&prmUserId=" & strMne & "&prmDesignacao=" & strDes & "&prmDataInicial=" & dtDataInicial & "&prmDataFinal=" & dtDataFinal & "&prmAmbiente=" & intAmbiente
Dim strPathPrm3 As String = "&prmEmpresa=" & intEmpresa
Dim strPathPrm4 As String = "&prmUserId=" & intUserId
strPathReport1 = generateReportLink("Report String", "rptEmpresaLista", strPathPrm1)
strPathReport2 = generateReportLink("Report String", "rptUtilizadoresLista", strPathPrm2)
strPathReport3 = generateReportLink("Report String", "rptEmpresaDetalhe", strPathPrm3)
strPathReport4 = generateReportLink("Report String", "rptUtilizadorDetalhe", strPathPrm4)
End Select
Select Case Me.cmbReport.Text
Case "Empresa Lista" : Response.Redirect(strPathR eport1)
Case "Utilizador Lista" : Response.Redirect(strPathR eport2)
Case "Empresa Detalhe" : Response.Redirect(strPathR eport3)
Case "Utilizador Detalhe" : Response.Redirect(strPathR eport4)
End Select
End Sub
Function generateReportLink(ByVal myAppSetReportRoot As String, ByVal myAppSetReportFolder As String, ByVal myParameters As String) As String
Dim strReportRoot As String = System.Configuration.Confi gurationMa nager.AppS ettings(my AppSetRepo rtRoot)
Dim strReportFolder As String = System.Configuration.Confi gurationMa nager.AppS ettings(my AppSetRepo rtFolder)
Dim strReportFolderRep As String = Replace(strReportFolder, "/", "%2f", 1)
Dim strReportPath As String = strReportRoot + "/?" + strReportFolderRep + myParameters + "&rs:Command=Render&rs:For mat=HTML4. 0&rc:Param eters=fals e"
Return strReportPath
End Function
HELPED?!
Try understand the Function generateReportLink
In the web.config I have:
And in asp page I have this:
Protected Sub butCallReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles butCallReport.Click
Dim intEmpresa As Integer = Me.txtEmpresa.Text
Dim intTipoEmpresa As Integer = Me.txtTipoEmpresa.Text
Dim intEstado As Integer = 0
Dim strMne As String = Me.txtMnemonica.Text
Dim strDes As String = Me.txtDesignacao.Text
Dim dtDataInicial As DateTime = Me.txtDataInicial.Text
Dim dtDataFinal As DateTime = Me.txtDataFinal.Text
'Inicializacao Report2
Dim intTipoUser As Integer = 0
Dim intAmbiente As Integer = 0
'Incializacao Report4
Dim intUserId As Integer = 119
Dim strPathReport1 As String = ""
Dim strPathReport2 As String = ""
Dim strPathReport3 As String = ""
Dim strPathReport4 As String = ""
Select Case Me.cmbDestino.Text
Case "ActiveX"
strPathReport1 = "frmReport.aspx?prmReport=
strPathReport2 = "frmReport.aspx?prmReport=
strPathReport3 = "frmReport.aspx?prmReport=
strPathReport4 = "frmReport.aspx?prmReport=
Case "XHTML"
Dim strPathPrm1 As String = "&prmEmpresa=" & intEmpresa & "&prmTipoEmpresa=" & intTipoEmpresa & "&prmEstado=" & intEstado & "&prmMnemonica=" & strMne & "&prmDesignacao=" & strDes & "&prmDataInicial=" & dtDataInicial & "&prmDataFinal=" & dtDataFinal
Dim strPathPrm2 As String = "&prmEmpresa=" & intEmpresa & "&prmTipoUtilizador=" & intTipoUser & "&prmEstado=" & intEstado & "&prmUserId=" & strMne & "&prmDesignacao=" & strDes & "&prmDataInicial=" & dtDataInicial & "&prmDataFinal=" & dtDataFinal & "&prmAmbiente=" & intAmbiente
Dim strPathPrm3 As String = "&prmEmpresa=" & intEmpresa
Dim strPathPrm4 As String = "&prmUserId=" & intUserId
strPathReport1 = generateReportLink("Report
strPathReport2 = generateReportLink("Report
strPathReport3 = generateReportLink("Report
strPathReport4 = generateReportLink("Report
End Select
Select Case Me.cmbReport.Text
Case "Empresa Lista" : Response.Redirect(strPathR
Case "Utilizador Lista" : Response.Redirect(strPathR
Case "Empresa Detalhe" : Response.Redirect(strPathR
Case "Utilizador Detalhe" : Response.Redirect(strPathR
End Select
End Sub
Function generateReportLink(ByVal myAppSetReportRoot As String, ByVal myAppSetReportFolder As String, ByVal myParameters As String) As String
Dim strReportRoot As String = System.Configuration.Confi
Dim strReportFolder As String = System.Configuration.Confi
Dim strReportFolderRep As String = Replace(strReportFolder, "/", "%2f", 1)
Dim strReportPath As String = strReportRoot + "/?" + strReportFolderRep + myParameters + "&rs:Command=Render&rs:For
Return strReportPath
End Function
HELPED?!
ASKER
It didn't help. I'm generating my url through MS Access/MS VB:
Private Sub lnkIndividualEmployeeTrain ingReport_ Click()
Dim txtURL As String
txtURL = "http://lulu/ReportServer/Pages/ReportViewer.aspx?%2fDevelopment%2fTimekeeperTrainingReports%2frptTimekeeperTrainingCascadingParms&rs%3aCommand=Render&SelectedProgramAreas=" & Forms![frmCurrentUser]![dw ProgramAre aID] & "&SelectedDivisions=" & Forms![frmCurrentUser]![dw DivisionID ] & "&SelectedEmployees=" & Forms![frmCurrentUser]![dw EmployeeID ] & "&MinimumHours=99999"
Application.FollowHyperlin k txtURL
End Sub
Which generates this url:
http://lulu/ReportServer/P ages/Repor tViewer.as px?%2fDeve lopment%2f Timekeeper TrainingRe ports%2frp tTimekeepe rTrainingC ascadingPa rms&rs%3aC ommand=Ren der&Select edProgramA reas=4&Sel ectedDivis ions=1&Sel ectedEmplo yees=11326 &MinimumHo urs=99999
Any other suggestions?
Thanks
Private Sub lnkIndividualEmployeeTrain
Dim txtURL As String
txtURL = "http://lulu/ReportServer/Pages/ReportViewer.aspx?%2fDevelopment%2fTimekeeperTrainingReports%2frptTimekeeperTrainingCascadingParms&rs%3aCommand=Render&SelectedProgramAreas=" & Forms![frmCurrentUser]![dw
Application.FollowHyperlin
End Sub
Which generates this url:
http://lulu/ReportServer/P
Any other suggestions?
Thanks
Check this example that work:
"http://localhost/reportserver/?%2fGestaoMnemonicas%2frptGestaoEmpresas&prmEmpresa=0&prmTipoEmpresa=0&prmEstado=0&prmMnemonica=XXXXX&prmDesignacao=XXXXX&prmDataInicial=1901-01-01&prmDataFinal=1901-01-01&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=false"
cut the Pages/reportViewer.aspx and try again...
GestaoMnemonicas is the folder name in SSRS
rptGestaoEmpresas is the report name in SSRS
"http://localhost/reportserver/?%2fGestaoMnemonicas%2frptGestaoEmpresas&prmEmpresa=0&prmTipoEmpresa=0&prmEstado=0&prmMnemonica=XXXXX&prmDesignacao=XXXXX&prmDataInicial=1901-01-01&prmDataFinal=1901-01-01&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=false"
cut the Pages/reportViewer.aspx and try again...
GestaoMnemonicas is the folder name in SSRS
rptGestaoEmpresas is the report name in SSRS
ASKER
The url worked fine; but I get the same results. The Program Area is populated correctly, but the Division (and Employee) are not selected:
http://lulu/ReportServer/P ages/Repor tViewer.as px?%2fDeve lopment%2f Timekeeper TrainingRe ports%2frp tTimekeepe rTrainingC ascadingPa rms&Select edProgramA reas=4
&SelectedDivisions=1&Selec tedEmploye es=11326&M inimumHour s=99999
Thanks again...
http://lulu/ReportServer/P
&SelectedDivisions=1&Selec
Thanks again...
Go directly to your report server by http://lulu/ReportServer
Select the report
and open it..
you can see the report from here?
paste here the url you have in address bar
cheers
Select the report
and open it..
you can see the report from here?
paste here the url you have in address bar
cheers
ASKER
I only have access to the Development directory. I can access it from:
http://lulu/ReportServer?% 2fDevelopm ent
This is the url when I open the report:
http://lulu/ReportServer?% 2fDevelopm ent%2fTime keeperTrai ningReport s%2frptTim ekeeperTra iningCasca dingParms& rs:Command =Render
Thanks
http://lulu/ReportServer?%
This is the url when I open the report:
http://lulu/ReportServer?%
Thanks
Dvelopment\TimekeeperTrain ingReports is the folder in SSRS, right?
rptTimekeeperTrainingCasca dingParms is the reportname, right?
This report has paarmeters?
You see this report in IE from http://lulu/ReportServer?% 2fDevelopm ent ?
rptTimekeeperTrainingCasca
This report has paarmeters?
You see this report in IE from http://lulu/ReportServer?%
ASKER
This is the level I have access to:
http://lulu/ReportServer?% 2fDevelopm ent
I then select this directory:
TimekeeperTrainingReports
Then I select this report:
rptTimekeeperTrainingCasca dingParms
The report has default begin and end dates, which are populated.
The SelectedProgramArea parm is populated with 4, but the SelectedDivision and SelectedEmployee parms are not populated. If I select Division 1 and Employee 11326 from the drop downs and view the report it uses the hidden parm SelectedMinimumHours to render the correct report.
Thanks
http://lulu/ReportServer?%
I then select this directory:
TimekeeperTrainingReports
Then I select this report:
rptTimekeeperTrainingCasca
The report has default begin and end dates, which are populated.
The SelectedProgramArea parm is populated with 4, but the SelectedDivision and SelectedEmployee parms are not populated. If I select Division 1 and Employee 11326 from the drop downs and view the report it uses the hidden parm SelectedMinimumHours to render the correct report.
Thanks
its' possible to send the report file and the database scripts related to this problem!?
cheers!!
cheers!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello...checking in on you. How are you coming along. Do you need further assistance / information on this...thanks!