Showing posts with label rendering. Show all posts
Showing posts with label rendering. Show all posts

Wednesday, March 28, 2012

Images rendering poorly?

Has anyone else out there had any problems with images rendering improperly
in the reports? When I add our company logo (a gif) to a report, it looks
fine in the development environment. Also, when I export the reports (say,
to a pdf) the images are fine, but when I view the report in a browser
(through the reporting services) the image is slightly skewed. Has anyone
else run across this, and if so, any idea on how to fix this?
Thanks for any help offered.Yes Hammer I have also had this problem for some time now. I have tried all
forms of image input into the report (embedded, project, database, and web)
and all have the same results; a lower quality image.
Anyone else?
"The Hammer" <david.hamilton@.datashapers.com> wrote in message
news:OCHYNpw1EHA.1296@.TK2MSFTNGP10.phx.gbl...
> Has anyone else out there had any problems with images rendering
> improperly
> in the reports? When I add our company logo (a gif) to a report, it looks
> fine in the development environment. Also, when I export the reports (say,
> to a pdf) the images are fine, but when I view the report in a browser
> (through the reporting services) the image is slightly skewed. Has anyone
> else run across this, and if so, any idea on how to fix this?
> Thanks for any help offered.
>

Friday, March 23, 2012

Image rendering with IIS Virtual Directory

Iâ'm trying to show images in my report using a url path since I the pics are
many and ever changing. Iâ've set the image source=external;
Image value= http://<webserver>/<IISVirtualDirectoryName>/filename.jpg
If I set the IIS Directory security to â'Anonymous Accessâ' with a proper
Account name/pass, the image renders properly.
If I try to set the IIS Directory security to â'Windows authenticationâ', the
image does not render-- even though all the other report fields are populated.
So it appears to me the credentials are not being passed to IIS for the
virtual directory authentication when the report is rendered.
How can I pass the report credentials to IIS?
Btw-Iâ'm running SP1 on Win2K, and have set the unattended user/pass, and
have tried various datasource options in Report Manager without success.Tony,
I am not sure if this is what you are looking for but this is what we did.
We generated the image in an aspx page that only contains the image. We then
set the image value = to the URL of that aspx page and works without a hitch.
In our case we were generating Trend graphs in a third party graphing tool
and exporting them as bitmaps and having Reporting Services display the
image. We had to do this because Reporting Services graphing ability is
rather lacking and we are in the process of moving all of the companies
reports to reporting services.
Hope this helps
"Tony Ballman" wrote:
> Iâ'm trying to show images in my report using a url path since I the pics are
> many and ever changing. Iâ've set the image source=external;
> Image value= http://<webserver>/<IISVirtualDirectoryName>/filename.jpg
> If I set the IIS Directory security to â'Anonymous Accessâ' with a proper
> Account name/pass, the image renders properly.
> If I try to set the IIS Directory security to â'Windows authenticationâ', the
> image does not render-- even though all the other report fields are populated.
> So it appears to me the credentials are not being passed to IIS for the
> virtual directory authentication when the report is rendered.
> How can I pass the report credentials to IIS?
> Btw-Iâ'm running SP1 on Win2K, and have set the unattended user/pass, and
> have tried various datasource options in Report Manager without success.
>|||Thanks that's a great idea. I suppose you're also able to thumbnail or reduce
the image size that way too.
My thought was to create an IIS web site set to localhost of the box running
the report server, and then placing the IIS Virtual directory there with
anonymous access- so the virtual directory access is at least limited to
inside the firewall.
"KBurnell" wrote:
> Tony,
> I am not sure if this is what you are looking for but this is what we did.
> We generated the image in an aspx page that only contains the image. We then
> set the image value = to the URL of that aspx page and works without a hitch.
> In our case we were generating Trend graphs in a third party graphing tool
> and exporting them as bitmaps and having Reporting Services display the
> image. We had to do this because Reporting Services graphing ability is
> rather lacking and we are in the process of moving all of the companies
> reports to reporting services.
> Hope this helps
> "Tony Ballman" wrote:
> > Iâ'm trying to show images in my report using a url path since I the pics are
> > many and ever changing. Iâ've set the image source=external;
> > Image value= http://<webserver>/<IISVirtualDirectoryName>/filename.jpg
> > If I set the IIS Directory security to â'Anonymous Accessâ' with a proper
> > Account name/pass, the image renders properly.
> > If I try to set the IIS Directory security to â'Windows authenticationâ', the
> > image does not render-- even though all the other report fields are populated.
> > So it appears to me the credentials are not being passed to IIS for the
> > virtual directory authentication when the report is rendered.
> >
> > How can I pass the report credentials to IIS?
> >
> > Btw-Iâ'm running SP1 on Win2K, and have set the unattended user/pass, and
> > have tried various datasource options in Report Manager without success.
> >

Image Rendering Problem with Custom Assembly

Hi,

Can you pls suggest what could be the problem the same report with images[same for test] from DB and custom assembly [it takes a id and return image as array of stream ]works fine in Visual Studio[i ve deployed to private assembly and to the reportserver-bin folder].

However the same assembly doesnot work after deploying to webserver.

Note that images works fine with CUstom Assembly in Visual Studio and i ve deployed the dll to both

C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin

and to

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies

i also tried GAced but with no result.The sameassemby although rendered fine with the Vs studio.

Also it was strange that even though i am supply the value from custom assmebly i have supply the image source as DB to get the same rendered in VS studio[preview mode]

Below is the RDL:-
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="AdventureWorks">
<ConnectionProperties>
<IntegratedSecurity>true</IntegratedSecurity>
<ConnectString>Data Source=Myservername;Initial Catalog=AdventureWorks</ConnectString>
<DataProvider>SQL</DataProvider>
</ConnectionProperties>
<rd:DataSourceID>ac9242f7-c779-47e6-bbd9-4dfadb9f51fe</rd:DataSourceID>
</DataSource>
</DataSources>
<BottomMargin>1in</BottomMargin>
<RightMargin>1in</RightMargin>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Body>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<ZIndex>1</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Verdana</FontFamily>
<FontSize>16pt</FontSize>
<Color>DarkRed</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Height>0.3in</Height>
<Value>ProductionPhotoReport</Value>
</Textbox>
<Table Name="table1">
<DataSetName>AdventureWorks</DataSetName>
<Top>0.3in</Top>
<Details>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Image Name="image1">
<Sizing>AutoSize</Sizing>
<MIMEType>image/bmp</MIMEType>
<ZIndex>4</ZIndex>
<Source>Database</Source>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
</Style>
<Value>=Fields!ThumbNailPhoto.Value</Value>
</Image>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Image Name="image2">
<Sizing>AutoSize</Sizing>
<MIMEType>image/bmp</MIMEType>
<ZIndex>3</ZIndex>
<Source>Database</Source>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
</Style>
<Value>=Fields!LargePhoto.Value</Value>
</Image>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="ProductPhotoID">
<rd:DefaultName>ProductPhotoID</rd:DefaultName>
<ZIndex>2</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Verdana</FontFamily>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!ProductPhotoID.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="Primary">
<rd:DefaultName>Primary</rd:DefaultName>
<ZIndex>1</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Verdana</FontFamily>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!Primary.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Image Name="image3">
<Sizing>AutoSize</Sizing>
<MIMEType>image/bmp</MIMEType>
<Source>Database</Source>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
</Style>
<Value>=MyClassLibrary.ImageManager.getimagesfromDB(Fields!ProductPhotoID.Value)</Value>
</Image>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.21in</Height>
</TableRow>
</TableRows>
</Details>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<ZIndex>9</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Verdana</FontFamily>
<FontWeight>700</FontWeight>
<FontSize>11pt</FontSize>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<BackgroundColor>#4e0000</BackgroundColor>
<Color>White</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Thumb Nail Photo</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<rd:DefaultName>textbox3</rd:DefaultName>
<ZIndex>8</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Verdana</FontFamily>
<FontWeight>700</FontWeight>
<FontSize>11pt</FontSize>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<BackgroundColor>#4e0000</BackgroundColor>
<Color>White</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Large Photo</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox4">
<rd:DefaultName>textbox4</rd:DefaultName>
<ZIndex>7</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Verdana</FontFamily>
<FontWeight>700</FontWeight>
<FontSize>11pt</FontSize>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<BackgroundColor>#4e0000</BackgroundColor>
<Color>White</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Product Photo ID</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox5">
<rd:DefaultName>textbox5</rd:DefaultName>
<ZIndex>6</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Verdana</FontFamily>
<FontWeight>700</FontWeight>
<FontSize>11pt</FontSize>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<BackgroundColor>#4e0000</BackgroundColor>
<Color>White</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Primary</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox6">
<rd:DefaultName>textbox6</rd:DefaultName>
<ZIndex>5</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Verdana</FontFamily>
<FontWeight>700</FontWeight>
<FontSize>11pt</FontSize>
<BorderColor>
<Default>LightGrey</Default>
</BorderColor>
<BackgroundColor>#4e0000</BackgroundColor>
<Color>White</Color>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>FROM CUSTOM ASSEMBLY</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.22in</Height>
</TableRow>
</TableRows>
<RepeatOnNewPage>true</RepeatOnNewPage>
</Header>
<TableColumns>
<TableColumn>
<Width>1in</Width>
</TableColumn>
<TableColumn>
<Width>1in</Width>
</TableColumn>
<TableColumn>
<Width>1in</Width>
</TableColumn>
<TableColumn>
<Width>1in</Width>
</TableColumn>
<TableColumn>
<Width>1.625in</Width>
</TableColumn>
</TableColumns>
</Table>
</ReportItems>
<Height>0.73in</Height>
</Body>
<rd:ReportID>84ed04b0-68eb-472b-aafd-621ce3a0c00f</rd:ReportID>
<LeftMargin>1in</LeftMargin>
<DataSets>
<DataSet Name="AdventureWorks">
<Query>
<CommandText>SELECT Production.ProductPhoto.ThumbNailPhoto, Production.ProductPhoto.LargePhoto, Production.ProductPhoto.ProductPhotoID,
Production.ProductProductPhoto.[Primary]
FROM Production.ProductPhoto INNER JOIN
Production.ProductProductPhoto ON Production.ProductPhoto.ProductPhotoID = Production.ProductProductPhoto.ProductPhotoID
WHERE (Production.ProductPhoto.ProductPhotoID &lt;&gt; 1)</CommandText>
<DataSourceName>AdventureWorks</DataSourceName>
</Query>
<Fields>
<Field Name="ThumbNailPhoto">
<rd:TypeName>System.Byte[]</rd:TypeName>
<DataField>ThumbNailPhoto</DataField>
</Field>
<Field Name="LargePhoto">
<rd:TypeName>System.Byte[]</rd:TypeName>
<DataField>LargePhoto</DataField>
</Field>
<Field Name="ProductPhotoID">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>ProductPhotoID</DataField>
</Field>
<Field Name="Primary">
<rd:TypeName>System.Boolean</rd:TypeName>
<DataField>Primary</DataField>
</Field>
</Fields>
</DataSet>
</DataSets>
<CodeModules>
<CodeModule>MyClassLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</CodeModule>
</CodeModules>
<Code />
<Width>5.625in</Width>
<InteractiveHeight>11in</InteractiveHeight>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>


This sounds like a permission issue, but you would need to look at the the RS logs to be sure. These are located here C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\.

In VS preview custom assemblies run with FullTrust, but when deployed to the server the code runs with the limited Execution permission set by default. See here for more information:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_rdl_8mue.asp
and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_extend_install_25ia.asp.

Since the code runs with the limited Execution permission set, you may need to follow the instructions here to access protected resources, like accessing a database:
http://msdn2.microsoft.com/fr-fr/library/ms153587.aspx.

After you have set up the policy file to allow for special access to protected resources, you need to assert that you have permission. Here is an example of opening a connection to a SQL Server within the custom assembly:

SqlClientPermission sqlPermission = new SqlClientPermission(PermissionState.Unrestricted);
try
{
sqlPermission.Assert();
SqlConnection conn = new SqlConnection("...");
conn.Open();
}

Ian|||

Thanks Ian,

Problem Solved.The issue was with the case sensitiveness in the config.

Image rendering in IE

Hi All,
I cannot get any of my images to display in reports. I have tried all type
of image storage..embedded, external and database and they preview ok but
when i display the report through report manager or URL, the images will not
show. Any ideas?
regardsIt wouldn't be security settings preventing the display of images would it?
"ACC365" <ACC365@.discussions.microsoft.com> wrote in message
news:A865D853-BA28-4FAE-8EC9-14B305F02A3B@.microsoft.com...
> Hi All,
> I cannot get any of my images to display in reports. I have tried all type
> of image storage..embedded, external and database and they preview ok but
> when i display the report through report manager or URL, the images will
not
> show. Any ideas?
> regards|||Well I have found the solution. It is to do with the name of the
server...there is an underscore in it. IE doesn't view an underscore as a
valid charecter so it cannot resolve the pictures. The solution was to either
rename the server or change the "UseSessioncookies" flag in the reporting
services db. In the table configurationInfo I changes the flag to false and
lo and behold it worked.
much happier.
Andy

Image Render Problem

Hi,
I still have problem in rendering the Images.
I have found some suggestion regarding the Rendering the Images from the earlier posts http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.asp?frame=true
But Still my image comes with Red Cross Symbol. I can see the image created and persisted on the directory I have mentioned with StreamRoot Tag but the problem still persists. The Img Src also shows the right path but the Image does n't come up. Is due to the absense of extension name in the image file is the cause of the problem.
I appreciate your assistance,
Environment : Windows2003 Server/Reporting Services(no sp1)/IE 6
Thanks in Advance,
HolyHi
I also tried the other suggestion with Rendering Reports with External Images.
I have set the HTMLFragment Property to True and with no renderstream call.
There it seems to be partially working because of the name of Image Path is referred always of localhost. So I can see the image on the development machine but not from the other machines since the image src is referred in localhost path.
And this is the image path it is rendered.
http://localhost/ReportServer?%2fBuyBackReports%2fEmissionSummary&rs%3aSessionID=ztzoiz55mcsvgy55ha12tsya&rs%3aFormat=HTML4.0&rs%3aImageID=a6b7d061-27a8-48a6-9a31-fd1b2ce04e93
Now how can I change the localhost path?
Thanks Again,
Holysmoke
"Holysmoke" wrote:
> Hi,
> I still have problem in rendering the Images.
> I have found some suggestion regarding the Rendering the Images from the earlier posts http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.asp?frame=true
> But Still my image comes with Red Cross Symbol. I can see the image created and persisted on the directory I have mentioned with StreamRoot Tag but the problem still persists. The Img Src also shows the right path but the Image does n't come up. Is due to the absense of extension name in the image file is the cause of the problem.
> I appreciate your assistance,
> Environment : Windows2003 Server/Reporting Services(no sp1)/IE 6
> Thanks in Advance,
> Holy
>|||Hi,
You've probably checked this but your server name doesn't contain an underscore does it?
ken
"Holysmoke" wrote:
> Hi,
> I still have problem in rendering the Images.
> I have found some suggestion regarding the Rendering the Images from the earlier posts http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.asp?frame=true
> But Still my image comes with Red Cross Symbol. I can see the image created and persisted on the directory I have mentioned with StreamRoot Tag but the problem still persists. The Img Src also shows the right path but the Image does n't come up. Is due to the absense of extension name in the image file is the cause of the problem.
> I appreciate your assistance,
> Environment : Windows2003 Server/Reporting Services(no sp1)/IE 6
> Thanks in Advance,
> Holy
>|||Do your charts not show up either? We had an underscore in our server
name (sql_server) and graphics and charts would not show on the
server. We removed the underscore, and all is well.
Holysmoke <Holysmoke@.discussions.microsoft.com> wrote in message news:<41C4557D-7872-45F7-8628-944F08EA28B6@.microsoft.com>...
> Hi,
> I still have problem in rendering the Images.
> I have found some suggestion regarding the Rendering the Images from the earlier posts http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.asp?frame=true
> But Still my image comes with Red Cross Symbol. I can see the image created and persisted on the directory I have mentioned with StreamRoot Tag but the problem still persists. The Img Src also shows the right path but the Image does n't come up. Is due to the absense of extension name in the image file is the cause of the problem.
> I appreciate your assistance,
> Environment : Windows2003 Server/Reporting Services(no sp1)/IE 6
> Thanks in Advance,
> Holy|||Hi,
I am using the renderStream method, and charts does not appear
because IMG tag in the rendered report link to an image file name without
extension.
Have you found a solution for this ?
Tanks a lot
"Holysmoke" wrote:
> Hi,
> I still have problem in rendering the Images.
> I have found some suggestion regarding the Rendering the Images from the earlier posts http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.asp?frame=true
> But Still my image comes with Red Cross Symbol. I can see the image created and persisted on the directory I have mentioned with StreamRoot Tag but the problem still persists. The Img Src also shows the right path but the Image does n't come up. Is due to the absense of extension name in the image file is the cause of the problem.
> I appreciate your assistance,
> Environment : Windows2003 Server/Reporting Services(no sp1)/IE 6
> Thanks in Advance,
> Holy
>sql