I wasn't able to find any API to get the amount of pages also. The only way
I could achieve it - was to
pass device info like that
<DeviceInfo><Section>1</Section><Toolbar>True</Toolbar></DeviceInfo>
grab the sessionID like
session_id=rs.SessionHeaderValue.SessionId;
but in mean time parse the content of the HTML returned, looking for "var
rep = new Report" string and get page count like
SessionHeader sh = new SessionHeader();
rs.SessionHeaderValue = sh;
byte[] bytes=null;
try
{
bytes=rs.Render(reportPath, format, historyID, devInfo, parameters,
credentials,
showHideToggle, out encoding, out mimeType, out reportHistoryParameters, out
warnings,
out streamIDs);
}
catch (SoapException e)
{
throw e;
}
string response=new
string(System.Text.Encoding.GetEncoding(1252).GetChars(bytes));
string val=string.Empty;
int pos=response.IndexOf("var rep = new Report(");
if(pos>0)
{
pos+=21;
}
int pos2=response.IndexOf(',',pos);
val=response.Substring(pos,pos2-pos);
session_id=rs.SessionHeaderValue.SessionId;
PageCount=int.Parse(val.Trim());
That gives you a session_id you can refer later to avoid requiring your data
and the maximum amount of pages .
I'd love to see, if someone has found a more simple, API based solution to
get a page count.
[quoted text, click to view] "JPA" <mail@mail.public.com> wrote in message
news:Xns96E79696951D4mailmailcom@207.46.248.16...
> I'd like to use the render webservice method to render HTML for a report.
> Using DeviceInfo, I can jump from page to page (section to section). I
> can't figure out how to get the maximum number of sections. What am I
> missing?