Hi,
I try to make a custom toolbar that navigates like the HTML toolbar.
This should support going to next page etc.
I'm trying to set the page in the deviceInfo string to pass it to the
rs.Render method.
I used the code like in ms-
help://MS.RSBOL80.1033/RSPROG/htm/rsp_prog_soapapi_dev_8x5u.htm
Although I set startpage to 2 I only get the first page or the whole
report depending if I set the toolbar to true or false.
Also, the streamIds string always is Nothing or has length 0.
My report has 2 pages when I look at it in the Reports folder.
Code is below
Thanks in advance !
'create the ReportingService object
Dim rs As New ReportingService
'set the credentials to be passed to Reporting Services
rs.PreAuthenticate = True
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim cache As CredentialCache = New CredentialCache
cache.Add(New Uri(rs.Url), "Negotiate", New NetworkCredential
(System.Configuration.ConfigurationSettings.AppSettings.Get
("ReportUserName"),
System.Configuration.ConfigurationSettings.AppSettings.Get
("ReportUserPassword"),
System.Configuration.ConfigurationSettings.AppSettings.Get
("ReportServer")))
'Assign CredentialCache to the Web service Client Proxy(myProxy)
Credetials property.
rs.Credentials = cache
Dim parameters As ParameterValue()
Dim encoding As String
Dim parametersUsed As ParameterValue()
Dim warnings As Warning()
Dim streamIDs As String() = Nothing
parameters = passParameters()
'render the report
Dim historyID As String = Nothing
Dim devInfo As String = "<StartPage>2</StartPage></DeviceInfo>"
Me.data = rs.Render(m_path, m_format, historyID, devInfo,
parameters, _
Nothing, Nothing, encoding, Me.mimeType, parametersUsed, _
warnings, streamIDs)
'determine if format is rendered to the web or a file.
Dim extension As String = GetExtension(Me.mimeType)
Dim reportName As String = m_path.Substring(m_path.LastIndexOf
("/") + 1)
Me.fileName = reportName & "." & extensionStartPage is only used for Image and PDF formats. For HTML, use the device
info <Section>.
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"Roel" <sig@.sig.com> wrote in message
news:Xns9549A61C42BC6sigsigcom@.207.46.248.16...
> Hi,
> I try to make a custom toolbar that navigates like the HTML toolbar.
> This should support going to next page etc.
> I'm trying to set the page in the deviceInfo string to pass it to the
> rs.Render method.
> I used the code like in ms-
> help://MS.RSBOL80.1033/RSPROG/htm/rsp_prog_soapapi_dev_8x5u.htm
> Although I set startpage to 2 I only get the first page or the whole
> report depending if I set the toolbar to true or false.
> Also, the streamIds string always is Nothing or has length 0.
> My report has 2 pages when I look at it in the Reports folder.
> Code is below
> Thanks in advance !
>
> 'create the ReportingService object
> Dim rs As New ReportingService
> 'set the credentials to be passed to Reporting Services
> rs.PreAuthenticate = True
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> Dim cache As CredentialCache = New CredentialCache
> cache.Add(New Uri(rs.Url), "Negotiate", New NetworkCredential
> (System.Configuration.ConfigurationSettings.AppSettings.Get
> ("ReportUserName"),
> System.Configuration.ConfigurationSettings.AppSettings.Get
> ("ReportUserPassword"),
> System.Configuration.ConfigurationSettings.AppSettings.Get
> ("ReportServer")))
> 'Assign CredentialCache to the Web service Client Proxy(myProxy)
> Credetials property.
> rs.Credentials = cache
> Dim parameters As ParameterValue()
> Dim encoding As String
> Dim parametersUsed As ParameterValue()
> Dim warnings As Warning()
> Dim streamIDs As String() = Nothing
> parameters = passParameters()
> 'render the report
> Dim historyID As String = Nothing
> Dim devInfo As String = "<StartPage>2</StartPage></DeviceInfo>"
> Me.data = rs.Render(m_path, m_format, historyID, devInfo,
> parameters, _
> Nothing, Nothing, encoding, Me.mimeType, parametersUsed, _
> warnings, streamIDs)
> 'determine if format is rendered to the web or a file.
> Dim extension As String = GetExtension(Me.mimeType)
> Dim reportName As String = m_path.Substring(m_path.LastIndexOf
> ("/") + 1)
> Me.fileName = reportName & "." & extension
>|||"Bryan Keller [MSFT]" <bryanke@.online.microsoft.com> wrote in
news:O7ry#VVhEHA.712@.TK2MSFTNGP09.phx.gbl:
> StartPage is only used for Image and PDF formats. For HTML, use the
> device info <Section>.
>
Thanks! works perfect.
Is there any way to know what the last section is ? I want to have a button
to jump to the last page of the report. It is possible to set the section
to MAXINT or so, but that's ugly code :)
thanks in advance,
Roel
Showing posts with label toolbar. Show all posts
Showing posts with label toolbar. Show all posts
Subscribe to:
Posts (Atom)