-
Get the page count of report in sql reporting services
hi,
i am getting JavaScript error while adding the <Toolbar>True</Toolbar>
in sql reporting services i have defined the device info as
string devInfo ="<DeviceInfo><Zoom>" + Convert.ToString(_Zoom) + "</Zoom><HTMLFragment>flase</HTMLFragment><Toolbar>true</Toolbar>" + @"<StreamRoot>" + TempPathVirtual + @"\</StreamRoot></DeviceInfo>";
am i doing any thing wrong .
by setting <Toolbar> true i am fetching PageCount the code i have written is :
result = oReport.Render(reportPath, format, historyID, devInfo, parameters, credentials,
showHideToggle, out encoding, out mimeType, out reportHistoryParameters, out warnings,
out streamIDs);
string response=new string(System.Text.Encoding.GetEncoding(1252).GetChars(result));
string val=string.Empty;
int pos=response.IndexOf("var rep = new Report(");
int pos1=-1,pos2=-1;
if(pos>0)
{
pos+=21;
pos1=response.IndexOf(',',pos);
pos2=response.IndexOf(',',pos1+1);
}
int PageCount;
val=response.Substring(pos1+1,(pos2-pos1)-1);
PageCount=int.Parse(val.Trim());
is there any other way to get the page count while <Toolbar> is false? bcz if i make <Toolbar> to true then it throws JavaScript error.
Ur reply would be appreciated.
thx.
thanks
raj 
Similar Threads
-
By software_develo in forum .NET
Replies: 6
Last Post: 11-04-2005, 09:29 AM
-
By Fritz in forum VB Classic
Replies: 0
Last Post: 08-25-2005, 01:09 PM
-
By Michael D. Kersey in forum .NET
Replies: 2
Last Post: 08-30-2002, 12:05 AM
-
By Yair Alan Griver [MSFT] in forum .NET
Replies: 31
Last Post: 02-11-2002, 09:50 PM
-
By Yair Alan Griver [MS] in forum .NET
Replies: 4
Last Post: 02-11-2002, 09:35 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks