Showing posts with label path. Show all posts
Showing posts with label path. Show all posts

Wednesday, 7 March 2012

Confusion about rs.Render method and reportPath argument

I'm trying to issue the Render method based on some samples I've tried
to adapt and I am getting errors about the path.
The doc states the first parameter to be passed to the Render method is
the "full path name of the report".
I'm not sure what is wanted there.
I currently have 2 projects in my .sln file: one is my web app which
has a web reference to the RS webservice and the other is a report
project. Here is a code snippet:
Dim rs As New ReportingService
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
'rs.Url = "localhost/ReportService.asmx"
Dim proxyParameters(0) As ParameterValue
proxyParameters(0) = New ParameterValue
proxyParameters(0).Name = "DataSource"
' get serialized dataset
proxyParameters(0).Value = objDataSet.GetXml()
' Render arguments
Dim result As Byte() = Nothing
'Dim reportPath As String = "/SampleReports/Employee Sales
Summary"
Dim reportPath As String = "/RD/Reports/MarketShare"
Dim format As String = "PDF" 'was "MHTML"
Dim historyID As String = Nothing
Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
Dim credentials As DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String
Dim mimeType As String
Dim warnings As Warning() = Nothing
Dim reportHistoryParameters As ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim sh As New SessionHeader
rs.SessionHeaderValue = sh
Try
result = rs.Render(reportPath, format, historyID, devInfo,
proxyParameters, _
credentials, showHideToggle, encoding, mimeType,
reportHistoryParameters, warnings, streamIDs)
sh.SessionId = rs.SessionHeaderValue.SessionId
Console.WriteLine("SessionID after call to Render: {0}",
rs.SessionHeaderValue.SessionId)
Console.WriteLine("Execution date and time: {0}",
rs.SessionHeaderValue.ExecutionDateTime)
Console.WriteLine("Is new execution: {0}",
rs.SessionHeaderValue.IsNewExecution)
Catch eX As SoapException
Console.WriteLine(eX.Detail.OuterXml)
End Try
I get:
<Message
xmlns="http://www.microsoft.com/sql/reportingservices">The item
'/RD/Reports/MarketShare' cannot be found.</Message>
I have my report file called Marketshare.rdl in the Reports folder of
my report project I call RD. Do I need to create a virtual directory to
hold my .rdl files? I've tried adding the file extension .rdl to this
reportPath string and that gives the same error. Please help me with
what I am missing. Thank you.Hi,
The ReportPath where the rs.Render method is needing is the complete path at
the ReportServer.
When you have create your reports in VS.NET 2003 you have to deploy them to
your ReportServer. The deploy server you have to define in the properties of
your Report project file (TargetServerURL usally
http://localhost/ReportServer). Also in this properties you can define a
report Path (TargetFolder)
This TargetFolder and your Report Filename are the complete reportParh.
e.g. You have set the TargetFolder to TestReport and you deploy a report
Report1.rdl to the server your reportPath will be: /TestReport/Report1
Jan Pieter Posthuma
"JJA" wrote:
> I'm trying to issue the Render method based on some samples I've tried
> to adapt and I am getting errors about the path.
> The doc states the first parameter to be passed to the Render method is
> the "full path name of the report".
> I'm not sure what is wanted there.
> I currently have 2 projects in my .sln file: one is my web app which
> has a web reference to the RS webservice and the other is a report
> project. Here is a code snippet:
> Dim rs As New ReportingService
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> 'rs.Url = "localhost/ReportService.asmx"
> Dim proxyParameters(0) As ParameterValue
> proxyParameters(0) = New ParameterValue
> proxyParameters(0).Name = "DataSource"
> ' get serialized dataset
> proxyParameters(0).Value = objDataSet.GetXml()
> ' Render arguments
> Dim result As Byte() = Nothing
> 'Dim reportPath As String = "/SampleReports/Employee Sales
> Summary"
> Dim reportPath As String = "/RD/Reports/MarketShare"
> Dim format As String = "PDF" 'was "MHTML"
> Dim historyID As String = Nothing
> Dim devInfo As String => "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
> Dim credentials As DataSourceCredentials() = Nothing
> Dim showHideToggle As String = Nothing
> Dim encoding As String
> Dim mimeType As String
> Dim warnings As Warning() = Nothing
> Dim reportHistoryParameters As ParameterValue() = Nothing
> Dim streamIDs As String() = Nothing
> Dim sh As New SessionHeader
> rs.SessionHeaderValue = sh
> Try
> result = rs.Render(reportPath, format, historyID, devInfo,
> proxyParameters, _
> credentials, showHideToggle, encoding, mimeType,
> reportHistoryParameters, warnings, streamIDs)
> sh.SessionId = rs.SessionHeaderValue.SessionId
> Console.WriteLine("SessionID after call to Render: {0}",
> rs.SessionHeaderValue.SessionId)
> Console.WriteLine("Execution date and time: {0}",
> rs.SessionHeaderValue.ExecutionDateTime)
> Console.WriteLine("Is new execution: {0}",
> rs.SessionHeaderValue.IsNewExecution)
> Catch eX As SoapException
> Console.WriteLine(eX.Detail.OuterXml)
> End Try
> I get:
> <Message
> xmlns="The">http://www.microsoft.com/sql/reportingservices">The item
> '/RD/Reports/MarketShare' cannot be found.</Message>
> I have my report file called Marketshare.rdl in the Reports folder of
> my report project I call RD. Do I need to create a virtual directory to
> hold my .rdl files? I've tried adding the file extension .rdl to this
> reportPath string and that gives the same error. Please help me with
> what I am missing. Thank you.
>

Sunday, 19 February 2012

Configuring Text Log File Path in dtxConfig

Hi,

I am having trouble configuring the log file path in dtsconfig. I don't want to keep changing the log file path every time I change environments.

Here are the parameters.

<Configuration ConfiguredType="Property" Path="\Package.LogProviders[SSIS log provider for Text files].Properties[ConfigString]" ValueType="String">
<ConfiguredValue>SalesForceConnectLog</ConfiguredValue>
</Configuration>

<Configuration ConfiguredType="Property" Path="\Package.LogProviders[SSIS log provider for Text files].Properties[Name]" ValueType="String">
<ConfiguredValue>SSIS log provider for Text files</ConfiguredValue>
</Configuration>

I tried to enter the path on [ConfigString] but it didn't work.

Any Help is appreciated

Gulden

You don't update the log provider, you update the connection manager for that log provider.|||

You are absolutely right. Your email also reminded me why I had ruled that out. It was a problem with logging to the same file from two different packages. I went back and corrected that.

Thanks for your answer..