Tuesday, March 27, 2012

DPE method error; passing DS persisted As XML

Hello,
I am using Teo Lachev's DPE and have done the following so far.
Added the datasource with 'Nothing' in query. Also the @.datasource parameter
is taking a path to the xsd file that i created off the dataset that i will
use. The designer has the fields setup on the report.
Through code, based on parameters I am forming a dataset that i write to an
xml (this contains the same elements and schema as the xsd).
Then..
DataSet dsDataSet = new DataSet();
dsDataSet.ReadXml(@."C:\FSChartSampleDS.xml", System.Data.XmlReadMode.Auto);
parameters[0] = new ParameterValue();
parameters[0].Name = "DataSource";
parameters[0].Value = dsDataSet.GetXml();
followed by a call to the render function. Here the call fails with this
error:
Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has
occurred during report processing. -->
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing. -->
System.NullReferenceException: Object reference not set to an instance of an
object.\n at
AWC.RS.Extensions.DataExtensions.DsDataReader.GetOrdinal(String name)\n at
Microsoft.ReportingServices.DataExtensions.MappingDataReader..ctor(String
dataSetName, IDataReader sourceReader, String[] aliases, String[]
fieldNames)\n at
Microsoft.ReportingServices.ReportProcessing.g..ctor(String A_0, IDataReader
A_1, String[] A_2, String[] A_3)\n at
Microsoft.ReportingServices.ReportProcessing.a0.v()\n at
Microsoft.ReportingServices.ReportProcessing.aw.c()\n at
Microsoft.ReportingServices.ReportProcessing.a0.a(Boolean& A_0)\n at
Microsoft.ReportingServices.ReportProcessing.aw.b()\n at
Microsoft.ReportingServices.ReportProcessing.a0.a(Object A_0)\n -- End of
inner exceptionsolved this myself
"google" wrote:
> Hello,
> I am using Teo Lachev's DPE and have done the following so far.
> Added the datasource with 'Nothing' in query. Also the @.datasource parameter
> is taking a path to the xsd file that i created off the dataset that i will
> use. The designer has the fields setup on the report.
> Through code, based on parameters I am forming a dataset that i write to an
> xml (this contains the same elements and schema as the xsd).
> Then..
> DataSet dsDataSet = new DataSet();
> dsDataSet.ReadXml(@."C:\FSChartSampleDS.xml", System.Data.XmlReadMode.Auto);
> parameters[0] = new ParameterValue();
> parameters[0].Name = "DataSource";
> parameters[0].Value = dsDataSet.GetXml();
> followed by a call to the render function. Here the call fails with this
> error:
> Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has
> occurred during report processing. -->
> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
> error has occurred during report processing. -->
> System.NullReferenceException: Object reference not set to an instance of an
> object.\n at
> AWC.RS.Extensions.DataExtensions.DsDataReader.GetOrdinal(String name)\n at
> Microsoft.ReportingServices.DataExtensions.MappingDataReader..ctor(String
> dataSetName, IDataReader sourceReader, String[] aliases, String[]
> fieldNames)\n at
> Microsoft.ReportingServices.ReportProcessing.g..ctor(String A_0, IDataReader
> A_1, String[] A_2, String[] A_3)\n at
> Microsoft.ReportingServices.ReportProcessing.a0.v()\n at
> Microsoft.ReportingServices.ReportProcessing.aw.c()\n at
> Microsoft.ReportingServices.ReportProcessing.a0.a(Boolean& A_0)\n at
> Microsoft.ReportingServices.ReportProcessing.aw.b()\n at
> Microsoft.ReportingServices.ReportProcessing.a0.a(Object A_0)\n -- End of
> inner exception

No comments:

Post a Comment