Wednesday, March 28, 2012

Replacement Root Query string

anyone can tell me how it is used it in Reportviewer to render
drillthrough links in the same page. I have been experimenting for a
while. would like to know if anything i need to take care of
thanx
raviHere's a thread on this topic:
http://groups-beta.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/fc71a51d020123ed/a295a0d77da59b6c?q=replacementroot&_done=%2Fgroup%2Fmicrosoft.public.sqlserver.reportingsvcs%2Fsearch%3Fq%3Dreplacementroot%26start%3D10%26&_doneTitle=Back+to+Search&&d#a295a0d77da59b6c
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"RemoteDeploy" <bofobofo@.yahoo.com> wrote in message
news:1109378507.771712.185840@.g14g2000cwa.googlegroups.com...
> anyone can tell me how it is used it in Reportviewer to render
> drillthrough links in the same page. I have been experimenting for a
> while. would like to know if anything i need to take care of
> thanx
> ravi
>|||Building on the thread I linked below...
In the code behind the page that contains ReportViewer, you need to set the
ReplacementRoot property, something like this:
reportView.ReplacementRoot = Protocol +
Request.ServerVariables["SERVER_NAME"] + Port + Request.FilePath +
"?report=";
You also have to add a bit more code to strip out extra rc: parameters that
build up as the user clicks on links. I hope that makes sense.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Jeff A. Stucker" <jeff@.mobilize.net> wrote in message
news:uWnN6inHFHA.2620@.tk2msftngp13.phx.gbl...
> Here's a thread on this topic:
> http://groups-beta.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/fc71a51d020123ed/a295a0d77da59b6c?q=replacementroot&_done=%2Fgroup%2Fmicrosoft.public.sqlserver.reportingsvcs%2Fsearch%3Fq%3Dreplacementroot%26start%3D10%26&_doneTitle=Back+to+Search&&d#a295a0d77da59b6c
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "RemoteDeploy" <bofobofo@.yahoo.com> wrote in message
> news:1109378507.771712.185840@.g14g2000cwa.googlegroups.com...
>> anyone can tell me how it is used it in Reportviewer to render
>> drillthrough links in the same page. I have been experimenting for a
>> while. would like to know if anything i need to take care of
>> thanx
>> ravi
>|||Hello Jeff,
Thanks for the reply. And I will make sure I dont create multiple
threads of the same topic.
Sadly, the problem still exists. I havent had time to work much on the
interface for the past week or so. I tried all you have said and also
looked at your past posts regarding this topic. I am send the code I
have regarding this whole thing. If you can tell where the problem is i
will appreciate very much.
I have a treeview control, which uses the ListChildren method of RS web
service to get all the reports listed as a tree. When I click on a
report (or rather the selected node changes) the following event is
fired.
BEGIN SUB---
Private Sub TreeView1_SelectedIndexChange(ByVal sender As Object, ByVal
e As Microsoft.Web.UI.WebControls.TreeViewSelectEventArgs) Handles
TreeView1.SelectedIndexChange
Dim curnode As Microsoft.Web.UI.WebControls.TreeNode
curnode = TreeView1.GetNodeFromIndex(e.NewNode)
Xflag = True
ReportViewer1.ServerUrl = "http://serverIP/ReportServer"
ReportViewer1.ReportPath = curnode.ID
ReportViewer1.Toolbar = ReportViewer.multiState.True
ReportViewer1.Zoom = "95"
ReportViewer1.ReplacementRoot =Server.UrlEncode("http://localhost/Reportdashboard/default.aspx?Report=")
If (ReportViewer1.ReportPath.IndexOf("&rc") > 0) Then
ReportViewer1.ReportPath =ReportViewer1.ReportPath.Substring(0,
ReportViewer1.ReportPath.IndexOf("&rc"))
End If
ReportViewer1.Visible = True
END SUB.--
And this is the code i use to populate the Treeview will loading the
default page
BEGIN SUB--
Private Sub LoadSampleReports()
Dim rs As New ReportingService
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim newNode As Microsoft.Web.UI.WebControls.TreeNode
For Each item In rs.ListChildren("/PGR1", False)
If item.Type = ItemTypeEnum.Report Then
newNode = New Microsoft.Web.UI.WebControls.TreeNode
newNode.Text = item.Name
newNode.ID = item.Path
newNode.Type = item.Type.ToString
newNode.HoverStyle.CssText ="font-size:8pt;color:dimgray;font-family:MS Sans
Serif;font-weight:bold;"
newNode.DefaultStyle.CssText = "font:MS Sans
Serif;color:Indigo; background:white;font-size:8pt"
& "/default.aspx?/PGR1/Averiguaciones" &
"&rc:LinkTarget=Myframe"
newNode.Expanded = False
newNode.Expandable =Microsoft.Web.UI.WebControls.ExpandableValue.Auto
TreeView1.Nodes.Add(newNode)
End If
Next
End Sub
END SUB---
When I click on a drillthrough link, it is opening the default page
again but without the report.
and the following is the URL associated with a drillthrough link
--
http://localhost/Reportdashboard/default.aspx?Report=http%3a%2f%2fserverIP%2fReportServer%3f%252fPGR1%252fPersonalPGR%26param_O2%3dAAAJ710623%26rs%253aParameterLanguage%3d%26rc%253aParameters%3dCollapsed%26rc%253aReplacementRoot%3dhttp%253a%252f%252flocalhost%252fReportdashboard%252fdefault.aspx%253fReport%253d
--
Reportdashboard is the Web app.
Thanks very much
Ravi|||Okay, here's a tangent. If you test the reports in the report manager, does
the drill through work correctly?
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Ravi R" <bofobofo@.yahoo.com> wrote in message
news:1109898353.744329.74340@.z14g2000cwz.googlegroups.com...
> Hello Jeff,
> Thanks for the reply. And I will make sure I dont create multiple
> threads of the same topic.
> Sadly, the problem still exists. I havent had time to work much on the
> interface for the past week or so. I tried all you have said and also
> looked at your past posts regarding this topic. I am send the code I
> have regarding this whole thing. If you can tell where the problem is i
> will appreciate very much.
> I have a treeview control, which uses the ListChildren method of RS web
> service to get all the reports listed as a tree. When I click on a
> report (or rather the selected node changes) the following event is
> fired.
> BEGIN SUB---
> Private Sub TreeView1_SelectedIndexChange(ByVal sender As Object, ByVal
> e As Microsoft.Web.UI.WebControls.TreeViewSelectEventArgs) Handles
> TreeView1.SelectedIndexChange
> Dim curnode As Microsoft.Web.UI.WebControls.TreeNode
> curnode = TreeView1.GetNodeFromIndex(e.NewNode)
> Xflag = True
> ReportViewer1.ServerUrl = "http://serverIP/ReportServer"
> ReportViewer1.ReportPath = curnode.ID
> ReportViewer1.Toolbar = ReportViewer.multiState.True
> ReportViewer1.Zoom = "95"
> ReportViewer1.ReplacementRoot => Server.UrlEncode("http://localhost/Reportdashboard/default.aspx?Report=")
> If (ReportViewer1.ReportPath.IndexOf("&rc") > 0) Then
> ReportViewer1.ReportPath => ReportViewer1.ReportPath.Substring(0,
> ReportViewer1.ReportPath.IndexOf("&rc"))
> End If
> ReportViewer1.Visible = True
> END SUB.--
> And this is the code i use to populate the Treeview will loading the
> default page
> BEGIN SUB--
> Private Sub LoadSampleReports()
> Dim rs As New ReportingService
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> Dim newNode As Microsoft.Web.UI.WebControls.TreeNode
> For Each item In rs.ListChildren("/PGR1", False)
> If item.Type = ItemTypeEnum.Report Then
> newNode = New Microsoft.Web.UI.WebControls.TreeNode
> newNode.Text = item.Name
> newNode.ID = item.Path
> newNode.Type = item.Type.ToString
> newNode.HoverStyle.CssText => "font-size:8pt;color:dimgray;font-family:MS Sans
> Serif;font-weight:bold;"
> newNode.DefaultStyle.CssText = "font:MS Sans
> Serif;color:Indigo; background:white;font-size:8pt"
> & "/default.aspx?/PGR1/Averiguaciones" &
> "&rc:LinkTarget=Myframe"
> newNode.Expanded = False
> newNode.Expandable => Microsoft.Web.UI.WebControls.ExpandableValue.Auto
> TreeView1.Nodes.Add(newNode)
> End If
> Next
> End Sub
> END SUB---
> When I click on a drillthrough link, it is opening the default page
> again but without the report.
> and the following is the URL associated with a drillthrough link
> --
> http://localhost/Reportdashboard/default.aspx?Report=http%3a%2f%2fserverIP%2fReportServer%3f%252fPGR1%252fPersonalPGR%26param_O2%3dAAAJ710623%26rs%253aParameterLanguage%3d%26rc%253aParameters%3dCollapsed%26rc%253aReplacementRoot%3dhttp%253a%252f%252flocalhost%252fReportdashboard%252fdefault.aspx%253fReport%253d
> --
> Reportdashboard is the Web app.
>
> Thanks very much
> Ravi
>|||Hello Jeff,
Yes the drillthrough and the drilldown both work fine in the
ReportManager.
Thanks
Ravi|||Hello Jeff,
The following are the URLs First one from the ReportManager where the
drillthrough works. And the second one from my web app.
The reportserver is running on another machine.
http://servename/Reports/Pages/Report.aspx?ServerUrl=http%3a%2f%2fservername%2fReportServer%3f%252fPGR1%252fPersonalPGR%26param_1%3dAACA7113%26rs%253aParameterLanguage%3d%26rc%253aParameters%3dCollapsed%26rc%253aReplacementRoot%3dhttp%253a%252f%252fservername%252fReports%252fPages%252fReport.aspx%253fServerUrl%253d
------
http://localhost/Reportdashboard/default.aspx?ServerUrl=http%3a%2f%2fservername%2fReportServer%3f%252fPGR1%252fPersonalPGR%26param_1%3dAACA7113%26rs%253aParameterLanguage%3d%26rc%253aParameters%3dCollapsed%26rc%253aReplacementRoot%3dhttp%253a%252f%252flocalhost%252fReportdashboard%252fdefault.aspx%253fServerUrl%253d
------
Thanks
Ravisql

No comments:

Post a Comment