Showing posts with label significant. Show all posts
Showing posts with label significant. Show all posts

Monday, March 12, 2012

Non significant '0' removed from alphanumeric code

Hi all,

I have a problem with alphanumeric codes in SSIS.

I have a sql table with a varchar column which contains codes like '080101000', in my SSIS dataflow I have a lookup against this table and the column whith the code is used as output column for my lookup transformation.

In the advance editor the output column datatype is DT_WSTR, but when the code contains only numbers like the code '080101000' the first '0' is removed! It's like the code is at some point transformed to numeric and then inserted in the output column as a string. This in nonsense!!

Does anyone have an idea how to avoid this ?

Double check all of your metadata links and double check on the advanced editor screens that you don't inadvertently have that column cast as a numeric data type.|||Already done twice! ;-)|||

Sbastien Nunes wrote:

Already done twice! ;-)

Then I'm missing something. A DT_WSTR will not drop leading zeros.|||Are you using SQL in your lookup transformation?|||Yes I am.|||

Sebastion,

Did you get this resolved?

Did you try using data viewers across the Data flow to see at what point the leading zero gets removed...what type of destination are you using...may the probelm be there?

|||

Hi,

No it's not resolved. Yes I tried using Data Viewers, the column where the 0 is removed is an output column from a Lookup Transformation. The Lookup is based on a SQL query.

I have checked the MetaData and everything seems allright.

Thanks for your help.

|||

That is weird...

What type of OLE DB source you are using in the lookup transform?

Did you get same results when running the same query in a native query tool (e.g. SSMS if SQL Server)?

What happens if you try to explicitly cast that column to string type in the lookup query?

|||

Thanks for your answer Rafael, I didn't had the time to test that today, I'll try on monday and I'll let you know what happens.

Non significant '0' removed from alphanumeric code

Hi all,

I have a problem with alphanumeric codes in SSIS.

I have a sql table with a varchar column which contains codes like '080101000', in my SSIS dataflow I have a lookup against this table and the column whith the code is used as output column for my lookup transformation.

In the advance editor the output column datatype is DT_WSTR, but when the code contains only numbers like the code '080101000' the first '0' is removed! It's like the code is at some point transformed to numeric and then inserted in the output column as a string. This in nonsense!!

Does anyone have an idea how to avoid this ?

Double check all of your metadata links and double check on the advanced editor screens that you don't inadvertently have that column cast as a numeric data type.|||Already done twice! ;-)|||

Sbastien Nunes wrote:

Already done twice! ;-)

Then I'm missing something. A DT_WSTR will not drop leading zeros.|||Are you using SQL in your lookup transformation?|||Yes I am.|||

Sebastion,

Did you get this resolved?

Did you try using data viewers across the Data flow to see at what point the leading zero gets removed...what type of destination are you using...may the probelm be there?

|||

Hi,

No it's not resolved. Yes I tried using Data Viewers, the column where the 0 is removed is an output column from a Lookup Transformation. The Lookup is based on a SQL query.

I have checked the MetaData and everything seems allright.

Thanks for your help.

|||

That is weird...

What type of OLE DB source you are using in the lookup transform?

Did you get same results when running the same query in a native query tool (e.g. SSMS if SQL Server)?

What happens if you try to explicitly cast that column to string type in the lookup query?

|||

Thanks for your answer Rafael, I didn't had the time to test that today, I'll try on monday and I'll let you know what happens.

Saturday, February 25, 2012

No XML export

...Newbie alert...
I am picking up a project that makes significant use of SQL2005 reporting
services. The app, as it is currently, triggers the report by launching a new
window with a URL pointing at the report server and including the parameters
rs:Command=Render&rs:clearsession=true&rs:format=HTML4.0
The new window shows the "Report is being generated" message and eventually
it is displayed. I want to get the XML version of the report, but the EXPORT
drop down only offers Excel and PDF.
This seems to be consistent with a .net report viewer control in "local
mode" (whatever that is), but I don't think that this is what's going on.
If I go to the reportserver virtual directory, there is a
ReportServer.config file. It contains, in part the following:
<ExcludedRenderFormats>
<RenderingExtension>HTMLOWC</RenderingExtension>
<RenderingExtension>NULL</RenderingExtension>
<RenderingExtension>RGDI</RenderingExtension>
</ExcludedRenderFormats>
under <Delivery> for various <Extension Name="..."> tags
It also shows
<Render>
<Extension Name="XML"
Type="Microsoft.ReportingServices.Rendering.XmlDataRenderer.XmlDataReport,Microsoft.ReportingServices.XmlRendering"/>
...
So it doesn't seem to actively exclude xml rendering and it does seem to
provide a renderer for the file type.
I've done this using the client's service provider and also on my own
out-of-the-box SQL2005 installation and have the same result on each.
I'm obviously missing something silly, but I can't figure out what it is.
Thx
MarcOn Sep 17, 3:08 pm, MarcG <JoePt...@.newsgroup.nospam> wrote:
> ...Newbie alert...
> I am picking up a project that makes significant use of SQL2005 reporting
> services. The app, as it is currently, triggers the report by launching a new
> window with a URL pointing at the report server and including the parameters
> rs:Command=Render&rs:clearsession=true&rs:format=HTML4.0
> The new window shows the "Report is being generated" message and eventually
> it is displayed. I want to get the XML version of the report, but the EXPORT
> drop down only offers Excel and PDF.
> This seems to be consistent with a .net report viewer control in "local
> mode" (whatever that is), but I don't think that this is what's going on.
> If I go to the reportserver virtual directory, there is a
> ReportServer.config file. It contains, in part the following:
> <ExcludedRenderFormats>
> <RenderingExtension>HTMLOWC</RenderingExtension>
> <RenderingExtension>NULL</RenderingExtension>
> <RenderingExtension>RGDI</RenderingExtension>
> </ExcludedRenderFormats>
> under <Delivery> for various <Extension Name="..."> tags
> It also shows
> <Render>
> <Extension Name="XML"
> Type="Microsoft.ReportingServices.Rendering.XmlDataRenderer.XmlDataReport,Microsoft.ReportingServices.XmlRendering"/>
> ...
> So it doesn't seem to actively exclude xml rendering and it does seem to
> provide a renderer for the file type.
> I've done this using the client's service provider and also on my own
> out-of-the-box SQL2005 installation and have the same result on each.
> I'm obviously missing something silly, but I can't figure out what it is.
> Thx
> Marc
If you are using SQL Server 2005 Express Edition w/Advanced Services,
according to MS's documentation, you will not be able to export to XML
(refer to: http://technet.microsoft.com/en-us/library/ms157153.aspx );
however, I'm using that version w/SP2 and can export to Tiff and XML.
If you don't have SP2 installed, you may want to do that. Hope this
helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Enrique,
I'm not sure how to find the equivalent of "Help|About" to get the version
info, but the SQL Server Configuration Manager at the hosted site shows
Version-9.2.3042.00 and File Version 2005.090.3054.00. I can't find the
equivalent information for the Report Server.
Marc|||Actually, I didn't report this properly...
Both the hosting service and my test machine have near identical
reReportServer.config files.
They differ only in <dsn>, IInstallationID>,<UrlRoot>, and
WebServiceAccount> tags.
On the hosting service, Export offers only Excel and PDF. On my test host, I
get Excel, PDF, XML, csv, TIFF, and Web Archive, as expected.
So it appears that the answer is not in the config file. Is there a way that
I can confirm that the required renderers are installed on the hosting
service?
Thx|||Hello Joe,
I would like to know this issue more clearly.
Do you mean that you want to develop a windows form application to access
the Report via web access and you want to Export it via XML?
If so, please let me know whether you could Export the report to XML
directly in Report Server.
The Render Extension for the Reporting Services is specified in the
ReportServer.config file
Also, you could try to use the command parameter like this to export the
report to XML directly.
rs:Command=Render&rs:clearsession=true&rs:format=XML
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Wei,
I want to have the report viewer that is used by default in IE. I DO NOT
want to use the .NET report viewer control. I want to leave the initial
display in HTML for viewing but allow for exporting and saving in XML. As I
said in the previous post, the rsreportserver.config files are effectively
identical on the two machines and I get the XML export optioin on my local XP
system but not on the hosted one.
I am a little confused about the installation that I am seeing on the
hosting service. Using the IIS Manager, I see the following...
Local Computer
Application Pools
AppPoolforRS
RManager (a "gear" icon, path is <ICCS>/RManager)
RServer (a "gear" icon, path is <ICCS>/RServer)
DefaultAppPool
Default Application (empty)
Default Application (empty)
Reports (empty)
ReportServer (empty)
MSSharePointAppPool
Root (empty)
Default Application (empty)
Web Sites
Default Web Site (stopped)
Microsoft SHarePoint Administration
ICCS
Reports ("gear" icon, path is C:\Program Files\Microsoft SQL
Server\MSSQL.2\Reporting Services\ReportManager)
ReportServer ("gear" icon, path is C:\Program Files\Microsoft SQL
Server\MSSQL.2\Reporting Services\ReportServer)
RManager ("gear" icon, path is C:\Program Files\Microsoft SQL
Server\MSSQL.2\Reporting Services\ReportManager)
RServer ("gear" icon, path is C:\Program Files\Microsoft SQL
Server\MSSQL.2\Reporting Services\ReportServer)
In the ReportServer directory, I have (with other files),
rsreportserver.config
rsreportserversp2update.config
rssrvrpolicy.config
web.config
These files match (by name) the files I have in the same directory on my
local WinXP test machine. There is no file named "reportserver.config" on
either machine.
By way of an experiment, on the hosted system I made copies of
rsreportserver.config and rsreportserversp2update.config and renamed them
reportserver.config and reportserversp2update.config. I then stopped and
restarted the ICCS web site and stopped and restarted the AppPoolforRS. This
made no difference.|||Hell Joe,
Sorry for mistyping. It should be rsreportserver.config.
The <Render> part in my side is like this:
<Render>
<Extension Name="XML"
Type="Microsoft.ReportingServices.Rendering.XmlDataRenderer.XmlDataReport,Mi
crosoft.ReportingServices.XmlRendering"/>
<Extension Name="NULL"
Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsof
t.ReportingServices.NullRendering" Visible="false"/>
<Extension Name="CSV"
Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.
ReportingServices.CsvRendering"/>
<Extension Name="IMAGE"
Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageReport,Micros
oft.ReportingServices.ImageRendering"/>
<Extension Name="PDF"
Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport,Microsof
t.ReportingServices.ImageRendering"/>
<Extension Name="RGDI"
Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RemoteGdiReport,Mi
crosoft.ReportingServices.ImageRendering" Visible="false"
LogAllExecutionRequests="false"/>
<Extension Name="HTML4.0"
Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExte
nsion,Microsoft.ReportingServices.HtmlRendering" Visible="false"
LogAllExecutionRequests="false"/>
<Extension Name="HTML3.2"
Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html32RenderingExte
nsion,Microsoft.ReportingServices.HtmlRendering" Visible="false"/>
<Extension Name="MHTML"
Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExten
sion,Microsoft.ReportingServices.HtmlRendering"/>
<Extension Name="EXCEL"
Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Micr
osoft.ReportingServices.ExcelRendering"/>
</Render>
You need to check whether you have this
Microsoft.ReportingServices.XmlRendering.dll under the folder:
C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting
Services\ReportServer\bin
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Wei Lu,
Unfortunately, my config matches what you sent me exactly, and
Microsoft.ReportingServices.XmlRendering.dll is in C:\Program Files\Microsoft
SQL Server\MSSQL.2\Reporting Services\ReportServer\bin
File version is 9.0.3042.0
'
Marc|||Hello Marc,
I would like to get the screenshot of your issue.
Also, have you applied the latest service pack of SQL 2005?
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Wei Lu,
I'm not sure what you want for a screen shot. I am looking at an IE5 browser
window with the HTML version of the report displayed. There is a drop down
box that says "Select a Format" and when you click it, it offers only
"Acrobat (PDF) File", and "Excel" If you send me an email address, I'll send
you the screen shot.
As noted earlier, I don't know how to ask SQL2005 what its SP level is. I
provided you with the file version numbers for the relevant DLL's
Marc|||Hello Marc,
You may send the email to me. Please remove the ONLINE in my display email
address. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.