Hi,
I am having problem where I am uploading report and setting its datasource
properties using rs.setproperties. I had defined datasource but it says â'data
source in not published on report serverâ' or
â'System.Web.Services.Protocols.SoapException: The required field DataSource
is mi
ssing from the input structure. -->
Microsoft.ReportingServices.Diagnostics.Uti
lities.MissingElementException: The required field DataSource is missing
from th
e input structure.â'
. Any idea how to resolve this problem I am also attaching code for your
reference
Dim reference As New DataSourceReference()
reference.Reference = "/Report Project1/EBS"
Dim dataSources(1) As DataSource
Dim ds As New DataSource()
ds.Item = CType(reference, DataSourceDefinitionOrReference)
ds.Name = "EBS"
dataSources(0) = ds
Try
rs.SetReportDataSources(â'abc.rdlâ', dataSources)
Console.WriteLine("New reference set for the report.")
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml.ToString())
End Try
Thanks in Advance
JasvinderI know this might not totally make sense, but in the line where you declare
the dataSources variable, use the following syntax:
Dim dataSources(0) As DataSource
instead of:
Dim dataSources(1) As DataSource
and I bet it will work for you! Hope it does. -Aaron
"Jasvinder" wrote:
> Hi,
> I am having problem where I am uploading report and setting its datasource
> properties using rs.setproperties. I had defined datasource but it says â'data
> source in not published on report serverâ' or
> â'System.Web.Services.Protocols.SoapException: The required field DataSource
> is mi
> ssing from the input structure. -->
> Microsoft.ReportingServices.Diagnostics.Uti
> lities.MissingElementException: The required field DataSource is missing
> from th
> e input structure.â'
>
> . Any idea how to resolve this problem I am also attaching code for your
> reference
>
> Dim reference As New DataSourceReference()
> reference.Reference = "/Report Project1/EBS"
> Dim dataSources(1) As DataSource
> Dim ds As New DataSource()
> ds.Item = CType(reference, DataSourceDefinitionOrReference)
> ds.Name = "EBS"
> dataSources(0) = ds
>
> Try
> rs.SetReportDataSources(â'abc.rdlâ', dataSources)
> Console.WriteLine("New reference set for the report.")
> Catch e As SoapException
> Console.WriteLine(e.Detail.InnerXml.ToString())
> End Try
>
> Thanks in Advance
> Jasvinder
>|||Hi Aaron,
Yes i had figured out this problem and i am still not understanding how this
can work. Thought of posting messege to MS.
But anyhow thanks for the solution.
Another problem which is coming is "Unhandled
Exception:System.Security.SecurityPermission" I have added try catch block
everywhere but still in the process of finding this error. Moreover its
frequency of coming is not sure. Sometimes it does not comes and sometimes it
comes and vice versa.
Thanks
Jasvinder
"Aaron Williams" wrote:
> I know this might not totally make sense, but in the line where you declare
> the dataSources variable, use the following syntax:
> Dim dataSources(0) As DataSource
> instead of:
> Dim dataSources(1) As DataSource
> and I bet it will work for you! Hope it does. -Aaron
>
> "Jasvinder" wrote:
> > Hi,
> > I am having problem where I am uploading report and setting its datasource
> > properties using rs.setproperties. I had defined datasource but it says â'data
> > source in not published on report serverâ' or
> >
> > â'System.Web.Services.Protocols.SoapException: The required field DataSource
> > is mi
> >
> > ssing from the input structure. -->
> > Microsoft.ReportingServices.Diagnostics.Uti
> >
> > lities.MissingElementException: The required field DataSource is missing
> > from th
> >
> > e input structure.â'
> >
> >
> >
> > . Any idea how to resolve this problem I am also attaching code for your
> > reference
> >
> >
> >
> > Dim reference As New DataSourceReference()
> >
> > reference.Reference = "/Report Project1/EBS"
> >
> > Dim dataSources(1) As DataSource
> >
> > Dim ds As New DataSource()
> >
> > ds.Item = CType(reference, DataSourceDefinitionOrReference)
> >
> > ds.Name = "EBS"
> >
> > dataSources(0) = ds
> >
> >
> >
> > Try
> >
> > rs.SetReportDataSources(â'abc.rdlâ', dataSources)
> >
> > Console.WriteLine("New reference set for the report.")
> >
> > Catch e As SoapException
> >
> > Console.WriteLine(e.Detail.InnerXml.ToString())
> >
> > End Try
> >
> >
> >
> > Thanks in Advance
> > Jasvinder
> >sql
Showing posts with label publishing. Show all posts
Showing posts with label publishing. Show all posts
Tuesday, March 27, 2012
Datasource credentails not saved if inside a batch
I am publishing an RDL using webservice. After publishing the report, i
update the embeded datasource for the report using "SetReportDataSources"
method.
If i use a "BatchHeader", with "ExecuteBatch" method the report is not
working. It says cannot login. I have to go the report datasource and retype
the password for the report to work.
But if I donot use "BatchHeader", the same code works.
This issue happens only on one of the reprot servers in our network. The
same code works on other report servers in the network. Is there a settings
in the report server or the server itself that is causing this.
Any help appreciated.I think in RS 2005 it was changed to SetItemDataSources(), anyway here's the
code we use for updating the datasources for the reports during deployment.
We create the datasource once, then for each report we deploy the report
then call this to update the datasource reference. We only use a single
datasource for all reports, so not too complex of an example. Depending on
the environment and version we change the datasource name.
Sub DSChange(ByVal ReportName As String)
Dim reference As new DataSourceReference()
Dim ds As New DataSource()
Dim dataSources() As DataSource
Try
reference.Reference = "/" & ReportDir & "/" & RSDSName
DataSources = rs.GetItemDataSources("/" & ReportDir & "/" &
ReportName)
ds = DataSources(0)
ds.Item = CType(reference, DataSourceDefinitionOrReference)
rs.SetItemDataSources("/" & ReportDir & "/" & ReportName,
DataSources)
Console.WriteLine("datasource reference set")
Catch e As Exception
Console.WriteLine(e.Message)
End Try
End Sub
Steve MunLeeuw
"vRam" <vRam@.discussions.microsoft.com> wrote in message
news:D47581C0-F81B-4C34-A695-A1F95693A668@.microsoft.com...
>I am publishing an RDL using webservice. After publishing the report, i
> update the embeded datasource for the report using "SetReportDataSources"
> method.
> If i use a "BatchHeader", with "ExecuteBatch" method the report is not
> working. It says cannot login. I have to go the report datasource and
> retype
> the password for the report to work.
> But if I donot use "BatchHeader", the same code works.
> This issue happens only on one of the reprot servers in our network. The
> same code works on other report servers in the network. Is there a
> settings
> in the report server or the server itself that is causing this.
> Any help appreciated.
>|||thanks for the reply.
But our implementation is on RS2000.
Again our code is working on all the RS servers except one of them. that too
if we set the datasource within a transaction using BatchHeaders.
"Steve MunLeeuw" wrote:
> I think in RS 2005 it was changed to SetItemDataSources(), anyway here's the
> code we use for updating the datasources for the reports during deployment.
> We create the datasource once, then for each report we deploy the report
> then call this to update the datasource reference. We only use a single
> datasource for all reports, so not too complex of an example. Depending on
> the environment and version we change the datasource name.
>
> Sub DSChange(ByVal ReportName As String)
> Dim reference As new DataSourceReference()
> Dim ds As New DataSource()
> Dim dataSources() As DataSource
> Try
> reference.Reference = "/" & ReportDir & "/" & RSDSName
> DataSources = rs.GetItemDataSources("/" & ReportDir & "/" &
> ReportName)
> ds = DataSources(0)
> ds.Item = CType(reference, DataSourceDefinitionOrReference)
> rs.SetItemDataSources("/" & ReportDir & "/" & ReportName,
> DataSources)
> Console.WriteLine("datasource reference set")
> Catch e As Exception
> Console.WriteLine(e.Message)
> End Try
> End Sub
> Steve MunLeeuw
> "vRam" <vRam@.discussions.microsoft.com> wrote in message
> news:D47581C0-F81B-4C34-A695-A1F95693A668@.microsoft.com...
> >I am publishing an RDL using webservice. After publishing the report, i
> > update the embeded datasource for the report using "SetReportDataSources"
> > method.
> >
> > If i use a "BatchHeader", with "ExecuteBatch" method the report is not
> > working. It says cannot login. I have to go the report datasource and
> > retype
> > the password for the report to work.
> >
> > But if I donot use "BatchHeader", the same code works.
> >
> > This issue happens only on one of the reprot servers in our network. The
> > same code works on other report servers in the network. Is there a
> > settings
> > in the report server or the server itself that is causing this.
> >
> > Any help appreciated.
> >
> >
>
>
update the embeded datasource for the report using "SetReportDataSources"
method.
If i use a "BatchHeader", with "ExecuteBatch" method the report is not
working. It says cannot login. I have to go the report datasource and retype
the password for the report to work.
But if I donot use "BatchHeader", the same code works.
This issue happens only on one of the reprot servers in our network. The
same code works on other report servers in the network. Is there a settings
in the report server or the server itself that is causing this.
Any help appreciated.I think in RS 2005 it was changed to SetItemDataSources(), anyway here's the
code we use for updating the datasources for the reports during deployment.
We create the datasource once, then for each report we deploy the report
then call this to update the datasource reference. We only use a single
datasource for all reports, so not too complex of an example. Depending on
the environment and version we change the datasource name.
Sub DSChange(ByVal ReportName As String)
Dim reference As new DataSourceReference()
Dim ds As New DataSource()
Dim dataSources() As DataSource
Try
reference.Reference = "/" & ReportDir & "/" & RSDSName
DataSources = rs.GetItemDataSources("/" & ReportDir & "/" &
ReportName)
ds = DataSources(0)
ds.Item = CType(reference, DataSourceDefinitionOrReference)
rs.SetItemDataSources("/" & ReportDir & "/" & ReportName,
DataSources)
Console.WriteLine("datasource reference set")
Catch e As Exception
Console.WriteLine(e.Message)
End Try
End Sub
Steve MunLeeuw
"vRam" <vRam@.discussions.microsoft.com> wrote in message
news:D47581C0-F81B-4C34-A695-A1F95693A668@.microsoft.com...
>I am publishing an RDL using webservice. After publishing the report, i
> update the embeded datasource for the report using "SetReportDataSources"
> method.
> If i use a "BatchHeader", with "ExecuteBatch" method the report is not
> working. It says cannot login. I have to go the report datasource and
> retype
> the password for the report to work.
> But if I donot use "BatchHeader", the same code works.
> This issue happens only on one of the reprot servers in our network. The
> same code works on other report servers in the network. Is there a
> settings
> in the report server or the server itself that is causing this.
> Any help appreciated.
>|||thanks for the reply.
But our implementation is on RS2000.
Again our code is working on all the RS servers except one of them. that too
if we set the datasource within a transaction using BatchHeaders.
"Steve MunLeeuw" wrote:
> I think in RS 2005 it was changed to SetItemDataSources(), anyway here's the
> code we use for updating the datasources for the reports during deployment.
> We create the datasource once, then for each report we deploy the report
> then call this to update the datasource reference. We only use a single
> datasource for all reports, so not too complex of an example. Depending on
> the environment and version we change the datasource name.
>
> Sub DSChange(ByVal ReportName As String)
> Dim reference As new DataSourceReference()
> Dim ds As New DataSource()
> Dim dataSources() As DataSource
> Try
> reference.Reference = "/" & ReportDir & "/" & RSDSName
> DataSources = rs.GetItemDataSources("/" & ReportDir & "/" &
> ReportName)
> ds = DataSources(0)
> ds.Item = CType(reference, DataSourceDefinitionOrReference)
> rs.SetItemDataSources("/" & ReportDir & "/" & ReportName,
> DataSources)
> Console.WriteLine("datasource reference set")
> Catch e As Exception
> Console.WriteLine(e.Message)
> End Try
> End Sub
> Steve MunLeeuw
> "vRam" <vRam@.discussions.microsoft.com> wrote in message
> news:D47581C0-F81B-4C34-A695-A1F95693A668@.microsoft.com...
> >I am publishing an RDL using webservice. After publishing the report, i
> > update the embeded datasource for the report using "SetReportDataSources"
> > method.
> >
> > If i use a "BatchHeader", with "ExecuteBatch" method the report is not
> > working. It says cannot login. I have to go the report datasource and
> > retype
> > the password for the report to work.
> >
> > But if I donot use "BatchHeader", the same code works.
> >
> > This issue happens only on one of the reprot servers in our network. The
> > same code works on other report servers in the network. Is there a
> > settings
> > in the report server or the server itself that is causing this.
> >
> > Any help appreciated.
> >
> >
>
>
Labels:
batch,
credentails,
database,
datasource,
embeded,
inside,
microsoft,
mysql,
oracle,
publishing,
rdl,
report,
saved,
server,
setreportdatasources,
sql,
update,
webservice
Subscribe to:
Posts (Atom)