Groups | Blog | Home
all groups > sql server reporting services > december 2004 >

sql server reporting services : Gurus -> I need a working sample of the rc:ReplacementRoot command


Walter
12/28/2004 3:09:02 PM
Hello there,

Ok, I did find some snipped of codes here and there however, I still haven’t
been able to get it to work correctly.

If it is true that people were able to overcome the jump out of Frame while
drilling down when using a costume page and the ReportViewer component, could
you please share the solution?

Thanks.
Walter
Jeff A. Stucker
12/28/2004 5:31:47 PM
It took two bits of code to make it work. The first was a modification to
the ReportViewer sample from Microsoft, to allow a rc:ReplacementRoot
parameter:

[Category("General Report Parameters"),
Description("URL to replace in links such as
http://servername/CustomRendering/view.aspx?report=")]
public String ReplacementRoot
{
get
{
return this._replacementRoot;
}
set
{
this._replacementRoot = value;
this.SetParameter("rc:ReplacementRoot", value);
}
}


Because of the way I'm calling the report viewer user control, I need to
strip out of the URL the previous versions of the rc: parameters when
calling the viewer again. Fortunately, the rc: parameters are added at the
end, so the other report parameters are preserved. I'm sure this can be
refactored to work more efficiently:

if (reportView.ReportPath.IndexOf("&rc")>0)
{
reportView.ReportPath =
reportView.ReportPath.Substring(0,reportView.ReportPath.IndexOf("&rc"));
}

--
Cheers,

'(' Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button