Hi awu255,
I have tested the same thing you have mentioned. Everything works fine.
Below are the detailed steps for your reference:
1.Create a assembly(Class Library) that is used to generate a image. The return type must be byte[].
2.Deploy the assembly.
a. Copy the file to these folders:
> C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\
ReportServer\bin
> C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\
ReportManager\Bin
> C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies
b. Change the code security settings in rssrvpolicy.config and rsmgrpolicy.config
We need to add the following code group under element "FirstMatchCodeGroup (Description="This code group grants MyComputer code Execution permission. ")" in
rssrvpolicy.config
<CodeGroup
class="UnionCodeGroup"
version="1"
Name="SecurityExtensionCodeGroup"
Description="Code group for the sample security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\
ReportServer\bin\GenerateImage.dll" />
</CodeGroup>
We need to add the following code group under element "FirstMatchCodeGroup (Description="This code group grants MyComputer code Execution permission. ")" in
rsmgrpolicy.config
<CodeGroup
class="UnionCodeGroup"
version="1"
Name="SecurityExtensionCodeGroup"
Description="Code group for the sample security extension"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\
ReportManager\bin\GenerateImage.dll" />
</CodeGroup>
3. Call the assembly from report
a. Drag a image control to the report body.
b. Set the Image Datasource to be "
Database"
c. Set the expression for the "Use this field" textbox: =(New
NameSpace.
Class(
arguments)).
Function(
arguments)
d. Select an appropriate MIME type.
4.Deploy the report.
Please note the highlight text in the steps.
Now, we are able to generate image dynamically.
By the way, I have implemented a sample here, that will help to understand the steps:
http://cid-3c7e963ff6ccd974.skydrive.live.com/self.aspx/.Public/GenerateImageDynamically.zip(
NOTE: The configureation files in the package is just for you information. Please do
NOT replace your configuration files with these one)
Please feel free to ask, if you have any more questions.
Thanks,
Jin Chen
Jin Chen - MSFT