Wednesday, March 28, 2012

Report Designer - Importing Excel Files Into Datasets

Using the MS SQL Server 2005 CTP on os win2k prof.
I have set up two datasets in a report that are supposed to be referencing
to separate data sources where the following connection strings are aimed at
separate files in the same target folder: -
DataSource1: -
Dsn=Excel
Files;dbq=<drive>:\<folder>\<file1.xls>;defaultdir=<drive>:\<folder>;driverid=790;maxbuffersize=2048;pagetimeout=5
DataSource2: -
Dsn=Excel
Files;dbq=<drive>:\<folder>\<file2.xls>;defaultdir=<drive>:\<folder>;driverid=790;maxbuffersize=2048;pagetimeout=5
I can correctly import the columns of File1.xls to DataSet1 but when
attempting to import File2.xls to DataSet2, the columns of DataSet1 are only
visible.
I have definitely referenced the correct data sources to each dataset.
Any ideas why DataSource2 is not appearing?
Cheers
TrevI have found the solution - set up individual File DSNs for each file and
point to these; they can be generic too.
Thx to those who may have provided feedback if I had not answered my own
question!!!
"auldreidy" wrote:
> Using the MS SQL Server 2005 CTP on os win2k prof.
> I have set up two datasets in a report that are supposed to be referencing
> to separate data sources where the following connection strings are aimed at
> separate files in the same target folder: -
> DataSource1: -
> Dsn=Excel
> Files;dbq=<drive>:\<folder>\<file1.xls>;defaultdir=<drive>:\<folder>;driverid=790;maxbuffersize=2048;pagetimeout=5
> DataSource2: -
> Dsn=Excel
> Files;dbq=<drive>:\<folder>\<file2.xls>;defaultdir=<drive>:\<folder>;driverid=790;maxbuffersize=2048;pagetimeout=5
> I can correctly import the columns of File1.xls to DataSet1 but when
> attempting to import File2.xls to DataSet2, the columns of DataSet1 are only
> visible.
> I have definitely referenced the correct data sources to each dataset.
> Any ideas why DataSource2 is not appearing?
> Cheers
> Trev|||how did you get the excel file to import into the dataset?
i can't seem to figure this out in the Query String window after setting up
the dsn...
"auldreidy" <auldreidy@.discussions.microsoft.com> wrote in message
news:E7921576-2D35-45CC-A742-540C46D2E13B@.microsoft.com...
> Using the MS SQL Server 2005 CTP on os win2k prof.
> I have set up two datasets in a report that are supposed to be referencing
> to separate data sources where the following connection strings are aimed
> at
> separate files in the same target folder: -
> DataSource1: -
> Dsn=Excel
> Files;dbq=<drive>:\<folder>\<file1.xls>;defaultdir=<drive>:\<folder>;driverid=790;maxbuffersize=2048;pagetimeout=5
> DataSource2: -
> Dsn=Excel
> Files;dbq=<drive>:\<folder>\<file2.xls>;defaultdir=<drive>:\<folder>;driverid=790;maxbuffersize=2048;pagetimeout=5
> I can correctly import the columns of File1.xls to DataSet1 but when
> attempting to import File2.xls to DataSet2, the columns of DataSet1 are
> only
> visible.
> I have definitely referenced the correct data sources to each dataset.
> Any ideas why DataSource2 is not appearing?
> Cheers
> Trev|||I set up a shared data source and then referenced it in the report dataset.
When you're setting up the data source, RD allows you to browse for the dsn
so you don't need to figure it out!
Trev
"TroyS" wrote:
> how did you get the excel file to import into the dataset?
> i can't seem to figure this out in the Query String window after setting up
> the dsn...
>
> "auldreidy" <auldreidy@.discussions.microsoft.com> wrote in message
> news:E7921576-2D35-45CC-A742-540C46D2E13B@.microsoft.com...
> > Using the MS SQL Server 2005 CTP on os win2k prof.
> >
> > I have set up two datasets in a report that are supposed to be referencing
> > to separate data sources where the following connection strings are aimed
> > at
> > separate files in the same target folder: -
> >
> > DataSource1: -
> >
> > Dsn=Excel
> > Files;dbq=<drive>:\<folder>\<file1.xls>;defaultdir=<drive>:\<folder>;driverid=790;maxbuffersize=2048;pagetimeout=5
> >
> > DataSource2: -
> >
> > Dsn=Excel
> > Files;dbq=<drive>:\<folder>\<file2.xls>;defaultdir=<drive>:\<folder>;driverid=790;maxbuffersize=2048;pagetimeout=5
> >
> > I can correctly import the columns of File1.xls to DataSet1 but when
> > attempting to import File2.xls to DataSet2, the columns of DataSet1 are
> > only
> > visible.
> >
> > I have definitely referenced the correct data sources to each dataset.
> >
> > Any ideas why DataSource2 is not appearing?
> >
> > Cheers
> > Trev
>
>

No comments:

Post a Comment