How to create a report with DataSet object?
Hers is my existing approach,
- Create the connection String.
- Create the Query String.
Write the RDL file manually using XMLWriter with the above details, like
<DataSources> <DataSource Name="MyDataSource"> <ConnectionProperties> <DataProvider>SQL</DataProvider> <ConnectString>My Connection String</ConnectString> <IntegratedSecurity>true</IntegratedSecurity> </ConnectionProperties> <rd:SecurityType>Integrated</rd:SecurityType> <rd:DataSourceID>MY Data Source ID</rd:DataSourceID> </DataSource> </DataSources> <DataSets> <DataSet Name="MyDataSet"> <Query> <DataSourceName>MyDataSource</DataSourceName> <CommandText>My Query String</CommandText> </Query> <Fields> <Field Name="MyField1"> <DataField>MyField1</DataField> <rd:TypeName>Type</rd:TypeName> </Field> <Field Name="MyField2"> <DataField>MyField2</DataField> <rd:TypeName>Type</rd:TypeName> </Field> </Fields> </DataSet>
Convert my
.rdl
file into a byte stream.Load the report to the Report Server using
CreateReport
method in theReportingService
.This is working fine for me, Now i need to do like the following,
I have a
DataSet
object (System.Data.DataSet
) i want to create thereport/.rdl
using this DataSet. So, there will be no connection string to this data set object, or is there any approach to do with data set object.Kindly help me