Hi All
I am trying to execute a stored procedure that does a very simple
lookup and returns a text field. However, when I try to execute it, I
am getting a rather strange error that I can't seem to fix!
There is defiantely information coming back as I have tested this in
Query Analyzer. The error actuall comes on my oCmd.ExecuteNonQuery();
String[1]: the Size property has an invalid size of 0.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: String[1]: the
Size property has an invalid size of 0.
Many thanks in advance for your help
Darren
STORED PROC CODE
=================
ALTER PROCEDURE [dbo].[sp_ReadSessionXML]
-- Add the parameters for the stored procedure here
@.iID int,
@.tXML text = null output
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT @.tXML = [XML] FROM T_Requests WHERE ResponseID = @.iID
pRINT @.tXML
END
C# CODE
=======
SqlConnection oConn = new SqlConnection();
oConn.ConnectionString = m_sConnectionString;
oConn.Open();
SqlCommand oCmd = new SqlCommand("sp_ReadSessionXML",
oConn);
oCmd.Connection = oConn;
oCmd.CommandType = CommandType.StoredProcedure;
SqlParameter spID = oCmd.Parameters.Add("@.iID",
SqlDbType.Int);
spID.Direction = ParameterDirection.Input;
spID.Value = iSQLCacheID;
SqlParameter spXML = oCmd.Parameters.Add("@.tXML",
SqlDbType.Text);
spXML.Direction = ParameterDirection.Output;
oCmd.ExecuteNonQuery();
oConn.Close();
XmlDocument xdDBCache = new XmlDocument();
xdDBCache.LoadXml(oCmd.Parameters["@.tXML"].Value.ToString());
return xdDBCache;
}Just a guess, but since the sp is going to return data, I don't think you
should use ExecuteNonQuery. ExecuteNonQuery is used for executing statements
that don't return a result set (like UPDATE or DELETE).
"daz_oldham" wrote:
> Hi All
> I am trying to execute a stored procedure that does a very simple
> lookup and returns a text field. However, when I try to execute it, I
> am getting a rather strange error that I can't seem to fix!
> There is defiantely information coming back as I have tested this in
> Query Analyzer. The error actuall comes on my oCmd.ExecuteNonQuery();
> String[1]: the Size property has an invalid size of 0.
> Description: An unhandled exception occurred during the execution of
> the current web request. Please review the stack trace for more
> information about the error and where it originated in the code.
> Exception Details: System.InvalidOperationException: String[1]: the
> Size property has an invalid size of 0.
> Many thanks in advance for your help
> Darren
> STORED PROC CODE
> =================
> ALTER PROCEDURE [dbo].[sp_ReadSessionXML]
> -- Add the parameters for the stored procedure here
> @.iID int,
> @.tXML text = null output
> AS
> BEGIN
> -- SET NOCOUNT ON added to prevent extra result sets from
> -- interfering with SELECT statements.
> SET NOCOUNT ON;
> -- Insert statements for procedure here
> SELECT @.tXML = [XML] FROM T_Requests WHERE ResponseID = @.iID
> pRINT @.tXML
> END
>
> C# CODE
> =======
> SqlConnection oConn = new SqlConnection();
> oConn.ConnectionString = m_sConnectionString;
> oConn.Open();
> SqlCommand oCmd = new SqlCommand("sp_ReadSessionXML",
> oConn);
> oCmd.Connection = oConn;
> oCmd.CommandType = CommandType.StoredProcedure;
> SqlParameter spID = oCmd.Parameters.Add("@.iID",
> SqlDbType.Int);
> spID.Direction = ParameterDirection.Input;
> spID.Value = iSQLCacheID;
> SqlParameter spXML = oCmd.Parameters.Add("@.tXML",
> SqlDbType.Text);
> spXML.Direction = ParameterDirection.Output;
> oCmd.ExecuteNonQuery();
> oConn.Close();
> XmlDocument xdDBCache = new XmlDocument();
> xdDBCache.LoadXml(oCmd.Parameters["@.tXML"].Value.ToString());
> return xdDBCache;
> }
>|||daz_oldham (Darren.Ratcliffe@.gmail.com) writes:
> There is defiantely information coming back as I have tested this in
> Query Analyzer. The error actuall comes on my oCmd.ExecuteNonQuery();
> String[1]: the Size property has an invalid size of 0.
> Description: An unhandled exception occurred during the execution of
> the current web request. Please review the stack trace for more
> information about the error and where it originated in the code.
The error message is unknown to me, and I can't say where it's coming
from. However, I do spot an error:
> @.tXML text = null output
This won't fly. text for output parameters is bound to fail. You
cannot assign to variables of the type text.
If you are on SQL 2005, use varchar(MAX) instead. Or even better the
xml data type.
If you are on SQL 2000, return the XML column as a result set instead.
(In which case you must use something different than ExecuteNonQuery
to retrieve the data.)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Mark Williams (MarkWilliams@.discussions.microsoft.com) writes:
> Just a guess, but since the sp is going to return data, I don't think
> you should use ExecuteNonQuery. ExecuteNonQuery is used for executing
> statements that don't return a result set (like UPDATE or DELETE).
But Daz's procedure does not return any result set, but returns data in
an OUTPUT parameter (or would have returned, had he chosen a data type
that is eligible for output parameters). The procedure also includes a
PRINT statement. Both of these are fine with ExecuteNonQuery. (To get
the data from the PRINT statement you need an InfoMessage event handler.)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Hi Erland
I have changed this to get the value out via a data reader, and it is
spot on.
I have never been aware in the past about having a text value as an
output parameter, but I know now!
I am currently using SQL 2000 so can't take advantage of the added XML
benefits in 2005 which is a shame really.
Many thanks for your help - and everyone else too.
Regards
Darren
Showing posts with label size. Show all posts
Showing posts with label size. Show all posts
Thursday, March 29, 2012
Sunday, February 19, 2012
Excel Report - Large File
SQL Server 2005 reporting service is being used to generate a large excel
report with about 30,000 rows. The size of file generated is ~15MB. but if
the same file is opened in Excel 2003 and saved back in XLS format itself,
the size of the file reduces to approximately 50% of the original size.
One of the initial guesses why this is occuring is that SQL Server 2005
reporting service generates unicode strings for the report data elements,
while excel saving it back, saves it as ANSI. (the report is in english only).
Let me know if the assumption is correct. If so what are means of fixing
this issue or else, is there any other option.On Oct 30, 12:46 am, Madhan Raj J
<MadhanR...@.discussions.microsoft.com> wrote:
> SQL Server 2005 reporting service is being used to generate a large excel
> report with about 30,000 rows. The size of file generated is ~15MB. but if
> the same file is opened in Excel 2003 and saved back in XLS format itself,
> the size of the file reduces to approximately 50% of the original size.
> One of the initial guesses why this is occuring is that SQL Server 2005
> reporting service generates unicode strings for the report data elements,
> while excel saving it back, saves it as ANSI. (the report is in english only).
> Let me know if the assumption is correct. If so what are means of fixing
> this issue or else, is there any other option.
This is just a thought, but it might be related to the Excel export
driver that is used in SSRS: to your point, that it could be adding
extra items. One way to check this out is to probably run a comparison
between the 2 files (maybe using something like a trial version of
Araxis Merge >> http://www.araxis.com/merge/ ). Also, I'm not sure if
you want to go this far, but if the size is a major issue you can
either zip the excel file programmatically with a third party DLL (a
few open source ones available) -or- create a small ASP.NET
application (or console EXE) that basically reads in the Excel file
(via streamreader) and does a string replace on all occurrences of the
undesired format in question and stream it back out (via
streamwriter). Of course, I'm not 100% sure that this will work with
Excel; however, it's worth a shot. Also, I think that there is a
technology called Automation in .NET that might be able to help w/
this. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||You got me curious so I did a little investiaging. I don't know if Excel
export is doing as you say. I do know that CSV export defaults to unicode.
You can change CSV to export in ASCII by making the following change in
rsreportserver.config (note commenting out the original line):
<!--
<Extension Name="CSV"
Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering"/>
-->
<Extension Name="CSV"
Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
<Configuration>
<DeviceInfo>
<Encoding>ASCII</Encoding>
</DeviceInfo>
</Configuration>
</Extension>
You could see if exporting to CSV ASCII format makes for a smaller file.
This will open up appropriately in Excel 2003 (Unicode shoves each row into
a single cell).
I decided to try the same thing with the Excel entry but I did not see any
difference.
If you make the CSV change go to the RS configuration tool click on Server
Status and stop and start Report Server. It only takes a few seconds to do
this. It will cause the configuration file changes to be processed.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Madhan Raj J" <MadhanRajJ@.discussions.microsoft.com> wrote in message
news:54B53C11-1569-468B-AF12-3A6EAD6904BE@.microsoft.com...
> SQL Server 2005 reporting service is being used to generate a large excel
> report with about 30,000 rows. The size of file generated is ~15MB. but if
> the same file is opened in Excel 2003 and saved back in XLS format itself,
> the size of the file reduces to approximately 50% of the original size.
> One of the initial guesses why this is occuring is that SQL Server 2005
> reporting service generates unicode strings for the report data elements,
> while excel saving it back, saves it as ANSI. (the report is in english
> only).
> Let me know if the assumption is correct. If so what are means of fixing
> this issue or else, is there any other option.|||Thanks of rthe reply..
But my client needs to the report to be exported to excel only, as there is
significant formatting around the data. As you have observed, the device
setting for excel does not have the encoding options as in CSV.
"Bruce L-C [MVP]" wrote:
> You got me curious so I did a little investiaging. I don't know if Excel
> export is doing as you say. I do know that CSV export defaults to unicode.
> You can change CSV to export in ASCII by making the following change in
> rsreportserver.config (note commenting out the original line):
> <!--
> <Extension Name="CSV"
> Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering"/>
> -->
> <Extension Name="CSV"
> Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
> <Configuration>
> <DeviceInfo>
> <Encoding>ASCII</Encoding>
> </DeviceInfo>
> </Configuration>
> </Extension>
> You could see if exporting to CSV ASCII format makes for a smaller file.
> This will open up appropriately in Excel 2003 (Unicode shoves each row into
> a single cell).
> I decided to try the same thing with the Excel entry but I did not see any
> difference.
> If you make the CSV change go to the RS configuration tool click on Server
> Status and stop and start Report Server. It only takes a few seconds to do
> this. It will cause the configuration file changes to be processed.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Madhan Raj J" <MadhanRajJ@.discussions.microsoft.com> wrote in message
> news:54B53C11-1569-468B-AF12-3A6EAD6904BE@.microsoft.com...
> > SQL Server 2005 reporting service is being used to generate a large excel
> > report with about 30,000 rows. The size of file generated is ~15MB. but if
> > the same file is opened in Excel 2003 and saved back in XLS format itself,
> > the size of the file reduces to approximately 50% of the original size.
> >
> > One of the initial guesses why this is occuring is that SQL Server 2005
> > reporting service generates unicode strings for the report data elements,
> > while excel saving it back, saves it as ANSI. (the report is in english
> > only).
> >
> > Let me know if the assumption is correct. If so what are means of fixing
> > this issue or else, is there any other option.
>
>|||Perhaps it is the formatting making the difference but I am not seeing any
difference in size when I save from Excel (versus the Excel created by RS).
One other issue, are you on SP2?
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Madhan Raj J" <MadhanRajJ@.discussions.microsoft.com> wrote in message
news:A5146FAB-7087-45C7-A00E-9CA8A734AB7A@.microsoft.com...
> Thanks of rthe reply..
> But my client needs to the report to be exported to excel only, as there
> is
> significant formatting around the data. As you have observed, the device
> setting for excel does not have the encoding options as in CSV.
> "Bruce L-C [MVP]" wrote:
>> You got me curious so I did a little investiaging. I don't know if Excel
>> export is doing as you say. I do know that CSV export defaults to
>> unicode.
>> You can change CSV to export in ASCII by making the following change in
>> rsreportserver.config (note commenting out the original line):
>> <!--
>> <Extension Name="CSV"
>> Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering"/>
>> -->
>> <Extension Name="CSV"
>> Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
>> <Configuration>
>> <DeviceInfo>
>> <Encoding>ASCII</Encoding>
>> </DeviceInfo>
>> </Configuration>
>> </Extension>
>> You could see if exporting to CSV ASCII format makes for a smaller file.
>> This will open up appropriately in Excel 2003 (Unicode shoves each row
>> into
>> a single cell).
>> I decided to try the same thing with the Excel entry but I did not see
>> any
>> difference.
>> If you make the CSV change go to the RS configuration tool click on
>> Server
>> Status and stop and start Report Server. It only takes a few seconds to
>> do
>> this. It will cause the configuration file changes to be processed.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Madhan Raj J" <MadhanRajJ@.discussions.microsoft.com> wrote in message
>> news:54B53C11-1569-468B-AF12-3A6EAD6904BE@.microsoft.com...
>> > SQL Server 2005 reporting service is being used to generate a large
>> > excel
>> > report with about 30,000 rows. The size of file generated is ~15MB. but
>> > if
>> > the same file is opened in Excel 2003 and saved back in XLS format
>> > itself,
>> > the size of the file reduces to approximately 50% of the original size.
>> >
>> > One of the initial guesses why this is occuring is that SQL Server 2005
>> > reporting service generates unicode strings for the report data
>> > elements,
>> > while excel saving it back, saves it as ANSI. (the report is in english
>> > only).
>> >
>> > Let me know if the assumption is correct. If so what are means of
>> > fixing
>> > this issue or else, is there any other option.
>>|||I have the same issue. When save directly from Reporting Services, the file
is 8 MB, but when opened in excel and than saved, it's 1.6 MB, which rules
out Unicode. When I opened the excel file in notepad, I noticed there's lots
of binary data in the tail of the 8 MB file, but the 1.6MB file doesn't have
them. I am still investigating, please let me know if you find a solution.
There's not much formatting in the report, just the column headings, so I
can't figure out what the excess binary data is.
Thanks.
"Madhan Raj J" wrote:
> SQL Server 2005 reporting service is being used to generate a large excel
> report with about 30,000 rows. The size of file generated is ~15MB. but if
> the same file is opened in Excel 2003 and saved back in XLS format itself,
> the size of the file reduces to approximately 50% of the original size.
> One of the initial guesses why this is occuring is that SQL Server 2005
> reporting service generates unicode strings for the report data elements,
> while excel saving it back, saves it as ANSI. (the report is in english only).
> Let me know if the assumption is correct. If so what are means of fixing
> this issue or else, is there any other option.|||I spoke too soon - it could be Unicode issue after all. In the large file,
the characters take two spaces, eg. "n e w " vs. "new" (in the smaller file).
"Pranil" wrote:
> I have the same issue. When save directly from Reporting Services, the file
> is 8 MB, but when opened in excel and than saved, it's 1.6 MB, which rules
> out Unicode. When I opened the excel file in notepad, I noticed there's lots
> of binary data in the tail of the 8 MB file, but the 1.6MB file doesn't have
> them. I am still investigating, please let me know if you find a solution.
> There's not much formatting in the report, just the column headings, so I
> can't figure out what the excess binary data is.
> Thanks.
> "Madhan Raj J" wrote:
> > SQL Server 2005 reporting service is being used to generate a large excel
> > report with about 30,000 rows. The size of file generated is ~15MB. but if
> > the same file is opened in Excel 2003 and saved back in XLS format itself,
> > the size of the file reduces to approximately 50% of the original size.
> >
> > One of the initial guesses why this is occuring is that SQL Server 2005
> > reporting service generates unicode strings for the report data elements,
> > while excel saving it back, saves it as ANSI. (the report is in english only).
> >
> > Let me know if the assumption is correct. If so what are means of fixing
> > this issue or else, is there any other option.
report with about 30,000 rows. The size of file generated is ~15MB. but if
the same file is opened in Excel 2003 and saved back in XLS format itself,
the size of the file reduces to approximately 50% of the original size.
One of the initial guesses why this is occuring is that SQL Server 2005
reporting service generates unicode strings for the report data elements,
while excel saving it back, saves it as ANSI. (the report is in english only).
Let me know if the assumption is correct. If so what are means of fixing
this issue or else, is there any other option.On Oct 30, 12:46 am, Madhan Raj J
<MadhanR...@.discussions.microsoft.com> wrote:
> SQL Server 2005 reporting service is being used to generate a large excel
> report with about 30,000 rows. The size of file generated is ~15MB. but if
> the same file is opened in Excel 2003 and saved back in XLS format itself,
> the size of the file reduces to approximately 50% of the original size.
> One of the initial guesses why this is occuring is that SQL Server 2005
> reporting service generates unicode strings for the report data elements,
> while excel saving it back, saves it as ANSI. (the report is in english only).
> Let me know if the assumption is correct. If so what are means of fixing
> this issue or else, is there any other option.
This is just a thought, but it might be related to the Excel export
driver that is used in SSRS: to your point, that it could be adding
extra items. One way to check this out is to probably run a comparison
between the 2 files (maybe using something like a trial version of
Araxis Merge >> http://www.araxis.com/merge/ ). Also, I'm not sure if
you want to go this far, but if the size is a major issue you can
either zip the excel file programmatically with a third party DLL (a
few open source ones available) -or- create a small ASP.NET
application (or console EXE) that basically reads in the Excel file
(via streamreader) and does a string replace on all occurrences of the
undesired format in question and stream it back out (via
streamwriter). Of course, I'm not 100% sure that this will work with
Excel; however, it's worth a shot. Also, I think that there is a
technology called Automation in .NET that might be able to help w/
this. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||You got me curious so I did a little investiaging. I don't know if Excel
export is doing as you say. I do know that CSV export defaults to unicode.
You can change CSV to export in ASCII by making the following change in
rsreportserver.config (note commenting out the original line):
<!--
<Extension Name="CSV"
Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering"/>
-->
<Extension Name="CSV"
Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
<Configuration>
<DeviceInfo>
<Encoding>ASCII</Encoding>
</DeviceInfo>
</Configuration>
</Extension>
You could see if exporting to CSV ASCII format makes for a smaller file.
This will open up appropriately in Excel 2003 (Unicode shoves each row into
a single cell).
I decided to try the same thing with the Excel entry but I did not see any
difference.
If you make the CSV change go to the RS configuration tool click on Server
Status and stop and start Report Server. It only takes a few seconds to do
this. It will cause the configuration file changes to be processed.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Madhan Raj J" <MadhanRajJ@.discussions.microsoft.com> wrote in message
news:54B53C11-1569-468B-AF12-3A6EAD6904BE@.microsoft.com...
> SQL Server 2005 reporting service is being used to generate a large excel
> report with about 30,000 rows. The size of file generated is ~15MB. but if
> the same file is opened in Excel 2003 and saved back in XLS format itself,
> the size of the file reduces to approximately 50% of the original size.
> One of the initial guesses why this is occuring is that SQL Server 2005
> reporting service generates unicode strings for the report data elements,
> while excel saving it back, saves it as ANSI. (the report is in english
> only).
> Let me know if the assumption is correct. If so what are means of fixing
> this issue or else, is there any other option.|||Thanks of rthe reply..
But my client needs to the report to be exported to excel only, as there is
significant formatting around the data. As you have observed, the device
setting for excel does not have the encoding options as in CSV.
"Bruce L-C [MVP]" wrote:
> You got me curious so I did a little investiaging. I don't know if Excel
> export is doing as you say. I do know that CSV export defaults to unicode.
> You can change CSV to export in ASCII by making the following change in
> rsreportserver.config (note commenting out the original line):
> <!--
> <Extension Name="CSV"
> Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering"/>
> -->
> <Extension Name="CSV"
> Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
> <Configuration>
> <DeviceInfo>
> <Encoding>ASCII</Encoding>
> </DeviceInfo>
> </Configuration>
> </Extension>
> You could see if exporting to CSV ASCII format makes for a smaller file.
> This will open up appropriately in Excel 2003 (Unicode shoves each row into
> a single cell).
> I decided to try the same thing with the Excel entry but I did not see any
> difference.
> If you make the CSV change go to the RS configuration tool click on Server
> Status and stop and start Report Server. It only takes a few seconds to do
> this. It will cause the configuration file changes to be processed.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Madhan Raj J" <MadhanRajJ@.discussions.microsoft.com> wrote in message
> news:54B53C11-1569-468B-AF12-3A6EAD6904BE@.microsoft.com...
> > SQL Server 2005 reporting service is being used to generate a large excel
> > report with about 30,000 rows. The size of file generated is ~15MB. but if
> > the same file is opened in Excel 2003 and saved back in XLS format itself,
> > the size of the file reduces to approximately 50% of the original size.
> >
> > One of the initial guesses why this is occuring is that SQL Server 2005
> > reporting service generates unicode strings for the report data elements,
> > while excel saving it back, saves it as ANSI. (the report is in english
> > only).
> >
> > Let me know if the assumption is correct. If so what are means of fixing
> > this issue or else, is there any other option.
>
>|||Perhaps it is the formatting making the difference but I am not seeing any
difference in size when I save from Excel (versus the Excel created by RS).
One other issue, are you on SP2?
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Madhan Raj J" <MadhanRajJ@.discussions.microsoft.com> wrote in message
news:A5146FAB-7087-45C7-A00E-9CA8A734AB7A@.microsoft.com...
> Thanks of rthe reply..
> But my client needs to the report to be exported to excel only, as there
> is
> significant formatting around the data. As you have observed, the device
> setting for excel does not have the encoding options as in CSV.
> "Bruce L-C [MVP]" wrote:
>> You got me curious so I did a little investiaging. I don't know if Excel
>> export is doing as you say. I do know that CSV export defaults to
>> unicode.
>> You can change CSV to export in ASCII by making the following change in
>> rsreportserver.config (note commenting out the original line):
>> <!--
>> <Extension Name="CSV"
>> Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering"/>
>> -->
>> <Extension Name="CSV"
>> Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
>> <Configuration>
>> <DeviceInfo>
>> <Encoding>ASCII</Encoding>
>> </DeviceInfo>
>> </Configuration>
>> </Extension>
>> You could see if exporting to CSV ASCII format makes for a smaller file.
>> This will open up appropriately in Excel 2003 (Unicode shoves each row
>> into
>> a single cell).
>> I decided to try the same thing with the Excel entry but I did not see
>> any
>> difference.
>> If you make the CSV change go to the RS configuration tool click on
>> Server
>> Status and stop and start Report Server. It only takes a few seconds to
>> do
>> this. It will cause the configuration file changes to be processed.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Madhan Raj J" <MadhanRajJ@.discussions.microsoft.com> wrote in message
>> news:54B53C11-1569-468B-AF12-3A6EAD6904BE@.microsoft.com...
>> > SQL Server 2005 reporting service is being used to generate a large
>> > excel
>> > report with about 30,000 rows. The size of file generated is ~15MB. but
>> > if
>> > the same file is opened in Excel 2003 and saved back in XLS format
>> > itself,
>> > the size of the file reduces to approximately 50% of the original size.
>> >
>> > One of the initial guesses why this is occuring is that SQL Server 2005
>> > reporting service generates unicode strings for the report data
>> > elements,
>> > while excel saving it back, saves it as ANSI. (the report is in english
>> > only).
>> >
>> > Let me know if the assumption is correct. If so what are means of
>> > fixing
>> > this issue or else, is there any other option.
>>|||I have the same issue. When save directly from Reporting Services, the file
is 8 MB, but when opened in excel and than saved, it's 1.6 MB, which rules
out Unicode. When I opened the excel file in notepad, I noticed there's lots
of binary data in the tail of the 8 MB file, but the 1.6MB file doesn't have
them. I am still investigating, please let me know if you find a solution.
There's not much formatting in the report, just the column headings, so I
can't figure out what the excess binary data is.
Thanks.
"Madhan Raj J" wrote:
> SQL Server 2005 reporting service is being used to generate a large excel
> report with about 30,000 rows. The size of file generated is ~15MB. but if
> the same file is opened in Excel 2003 and saved back in XLS format itself,
> the size of the file reduces to approximately 50% of the original size.
> One of the initial guesses why this is occuring is that SQL Server 2005
> reporting service generates unicode strings for the report data elements,
> while excel saving it back, saves it as ANSI. (the report is in english only).
> Let me know if the assumption is correct. If so what are means of fixing
> this issue or else, is there any other option.|||I spoke too soon - it could be Unicode issue after all. In the large file,
the characters take two spaces, eg. "n e w " vs. "new" (in the smaller file).
"Pranil" wrote:
> I have the same issue. When save directly from Reporting Services, the file
> is 8 MB, but when opened in excel and than saved, it's 1.6 MB, which rules
> out Unicode. When I opened the excel file in notepad, I noticed there's lots
> of binary data in the tail of the 8 MB file, but the 1.6MB file doesn't have
> them. I am still investigating, please let me know if you find a solution.
> There's not much formatting in the report, just the column headings, so I
> can't figure out what the excess binary data is.
> Thanks.
> "Madhan Raj J" wrote:
> > SQL Server 2005 reporting service is being used to generate a large excel
> > report with about 30,000 rows. The size of file generated is ~15MB. but if
> > the same file is opened in Excel 2003 and saved back in XLS format itself,
> > the size of the file reduces to approximately 50% of the original size.
> >
> > One of the initial guesses why this is occuring is that SQL Server 2005
> > reporting service generates unicode strings for the report data elements,
> > while excel saving it back, saves it as ANSI. (the report is in english only).
> >
> > Let me know if the assumption is correct. If so what are means of fixing
> > this issue or else, is there any other option.
Subscribe to:
Posts (Atom)