I have two problems with Toggle Items when I render my Reports using the RS Web Service.
First, the URL when I click on the + / - image will redirect me to the Report Server URL
ex :
The page that display the report is at : http://localhost/report/default.aspx
If i click on one of the +/- image, it will redirect to something like this : http://localhost/ReportServer?/myreport&myparam=testvalue&rc:streamRoot=//&rc:section=0&rs:format=HTML4.0&rs:ShowHideToggleItem=44&rs:SnapShot:isnull=True
Is there a solution to this problem ? (with a replace ?)
Then, If in the Render Method, I put a valid ShowHideToggle ID, when the report renders, the selected toggle item won't be expanded ...
Here's a sample of my code :
string ShowHideToggle = null;
// The rs:ShowHideToggle parameter is valid, but it wont' change anything ...
if(HttpContext.Current.Request["rs:ShowHideToggle"] != null)
ShowHideToggle = HttpContext.Current.Request["rs:ShowHideToggle"];
bResult = oRS.Render(_sName, "HTML4.0", null, "<DeviceInfo><StreamRoot>/" + _sFolder +"/</StreamRoot></DeviceInfo>", _oParameters, null, ShowHideToggle , out sOptionalString, out sOptionalString, out _oParameters, out oOptionalWarnings, out sStreamIDs);
Encoding oEnc = System.Text.Encoding.UTF8;
string sHTMLFlow = oEnc.GetString(bResult);
// This way, it won't redirect to the Report Server URL but the "+/-" image won't diplay anymore ...
sHTMLFlow = sHTMLFlow.Replace(sReportServerUrl.Replace("/ReportService.asmx", "?"), "http://" + HttpContext.Current.Request["SERVER_NAME"] + HttpContext.Current.Request["SCRIPT_NAME"] + "?Report=");
Any Help would be appreciated :)
That thing is killing me :(
Thanks for your help
You didn't say what version of SRS you're using.On RS 2000 - this is a known limitation - toggles will point back to the report server virtual directory.
On RS 2005 - if you use the Reporting controls from VS 2005 or the new reportexecution APIs, you will get server-side ASP.NET events for all interractivity in the report
Thanks
Tudor|||
Tudor
Would you be able to provide an example of how to use showHideToggle using the reportexecution APIs in RS 2005. I have been looking to see how to specify showHideToggle in place of the old Render call, but have not been able to find anything.
Any tips would be much appreciated.
Thank you.
mike
|||Call LoadReport only when ShowHideToggle is null.
after the first Render save ReportExecutionService intance into the Session.set the objReportExecutionService to the object in the Session.
for the succeeding calls if ShowHideToggle is not null set objReportExecutionService.ToggleItem to the ShowHideToggle value. then call the render method again.That should just work.
|||Aldwin, I'm not sure what you mean here. Can you provide a code sample?Thanks,
Paul
No comments:
Post a Comment