Showing posts with label deviceinfo. Show all posts
Showing posts with label deviceinfo. Show all posts

Friday, March 9, 2012

DeviceInfo StartPage not working

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

DeviceInfo issue...

Did anyone have problems using HTMLFragment or JavaScript element within
DeviceInfo parameter? I am passing the deviceinfo parameter as below :
result = rs.Render(Me._reportPath, Me._renderingFormat, Nothing, _
"<DeviceInfo><HTMLFragment>True</HTMLFragment><JavaScript>False</JavaScript>
<Section>1</Section><Toolbar>True</Toolbar><Zoom>75</Zoom></DeviceInfo>", _
Me._parameters, Nothing, Nothing, encoding, mime, history, warnings,
streamsId)
The only child element that really works into DeviceInfo element is the
Section parameter. The toolbar parameter I already know that doesn't work
within render method of RS web service. HTMLFragment, Javascript and Zoom
elements wouldn't have to work properly?
I am asking that because I am getting a Javascript error when my report
render. So I was wondering if turning Javascript off would solve this
issue... But I don't get how...
Any help is welcome.
thanks.
----
Renato Aloi
Analista Programador
J&W Informática Ltda.
+55 11 30406675Nevermind... I get rid off Toolbar element and it is working now.
[]s
Renato
"Renato Aloi" <aloi@.jew.com.br> escreveu na mensagem
news:%23ihP1ZgiEHA.712@.TK2MSFTNGP09.phx.gbl...
> Did anyone have problems using HTMLFragment or JavaScript element within
> DeviceInfo parameter? I am passing the deviceinfo parameter as below :
> result = rs.Render(Me._reportPath, Me._renderingFormat, Nothing, _
>
"<DeviceInfo><HTMLFragment>True</HTMLFragment><JavaScript>False</JavaScript>
> <Section>1</Section><Toolbar>True</Toolbar><Zoom>75</Zoom></DeviceInfo>",
_
> Me._parameters, Nothing, Nothing, encoding, mime, history, warnings,
> streamsId)
> The only child element that really works into DeviceInfo element is the
> Section parameter. The toolbar parameter I already know that doesn't work
> within render method of RS web service. HTMLFragment, Javascript and Zoom
> elements wouldn't have to work properly?
> I am asking that because I am getting a Javascript error when my report
> render. So I was wondering if turning Javascript off would solve this
> issue... But I don't get how...
> Any help is welcome.
> thanks.
> ----
> Renato Aloi
> Analista Programador
> J&W Informática Ltda.
> +55 11 30406675
>

DeviceInfo in .config file (SQL RS 2000)

Hi,

I am trying to change the default behavior of .CSV Renderer, by specifying NoHeader=false in the RSReportServer.config file. The exact info specified is here:

<Configuration>
<DeviceInfo>
<NoHeader>true</NoHeader>
</DeviceInfo>
</Configuration>

Unfortunately even after restarting the reporting services, the changes don't apply and i still get 'Header' as part of the .CSV export.

Would appreciate if anyone could guide me as what is wrong here..

thanks

sreeram.

Ram,

This feature (default DeviceInfo settings in config file) was implemented in RS2005. It is not in RS2000.