Just to confirm - with "preview mode" you mean the stand-alone preview (F5),
"billd" <billd@discussions.microsoft.com> wrote in message
news:25CD29CE-E6C7-41A0-AC56-D29020643B37@microsoft.com...
> Thanks. This is a tricky process. I was able to get a gauge to appear in a
> deployed report on one development computer, but not on any others. They
all
> work fine in preview mode. The config files are identical on all machines.
>
> Odds are that it is a securty problem. But are there logs (or any other
> indicatior) that will give me information of what is going wrong beyond
just
> seeing the broken image icon?
>
> Regards,
> Bill
>
>
> "Robert Bruckner [MSFT]" wrote:
>
> > If you are working based on RS 2000, the policy files contain already a
> > Fulltrust entry for the Dundas chart control. If the Dundas Gauge
library
> > has the same public key blob, then it will also get Fulltrust
privileges. If
> > the library uses a different public key blob, you need to explicitly add
> > Fulltrust permissions to the configuration files.
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "billd" <billd@discussions.microsoft.com> wrote in message
> > news:94169FB2-8542-4F42-AEA1-AE46D1ABAA10@microsoft.com...
> > > Robert,
> > >
> > > I just need to add a reference to my custom assembly?
> > >
> > > Is there no need to add a "fulltrust" entry for the Dundas .dll in the
> > > report services configuration file? (I am using the Gauge library)
> > >
> > > Thx,
> > > Bill
> > >
> > >
> > >
> > > "Robert Bruckner [MSFT]" wrote:
> > >
> > > > There can be several issues here. The first thing I would check is
that
> > your
> > > > custom assembly works correctly in the "stand-alone preview" of
report
> > > > designer:
> > > > * Load the report project in report designer.
> > > > * Hit F5 (to startup the stand-alone preview and run the report)
> > > >
> > > > If the report does not work there, then missing security permission
> > asserts
> > > > in rsPreviewPolicy.config as well as in rsSrvPolicy.config cause the
> > issue.
> > > > If you are using the Dundas chart library your custom assembly will
need
> > to
> > > > have Fulltrust permissions and assert these security permissions
before
> > > > invoking any Dundas API methods and properties.
> > > >
> > > > The static function call in the custom assembly would need to look
like
> > this
> > > > when asserting the permissions through attributes (C#):
> > > >
> > > > [PermissionSet(SecurityAction.Assert, Unrestricted=true)]
> > > > public static byte[] GenerateChart()
> > > > {
> > > > // chart rendering code
> > > > // ...
> > > >
> > > > }
> > > >
> > > > In addition you need to add the FullTrust permissions in the config
> > files.
> > > > Make sure to have them in the correct location inside the config
files -
> > > > position matters!
> > > >
> > > > <CodeGroup class="UnionCodeGroup"
> > > > version="1"
> > > > PermissionSetName="FullTrust"
> > > > Name="MyNewCodeGroup"
> > > > Description="A special code group for my
> > custom
> > > > assembly.">
> > > > <IMembershipCondition
> > > > class="UrlMembershipCondition"
> > > > version="1.0.0.0"
> > > > Url="C:\MyCustomAssembly.dll"/>
> > > > </CodeGroup>
> > > >
> > > > See also:
> > > >
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp
> > > >
> > > >
> > > > HTH,
> > > > Robert
> > > >
> > > > --
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > >
> > > >
> > > >
> > > > "billd" <billd@discussions.microsoft.com> wrote in message
> > > > news:62AF0CC1-7444-4B85-891A-62D088C86F01@microsoft.com...
> > > > > I am trying to display a chart from the Dundas chart library via a
> > custom
> > > > > assembly.
> > > > >
> > > > > I followed Robert Bruckner's method (below) from a previos thread
in
> > this
> > > > > news group. The chart displays fine in the designer preview, but
> > appears
> > > > as
> > > > > an 'X' image when deployed to the report server.
> > > > >
> > > > > I'm pretty sure I've copied the .dlls to the right spot and added
the
> > > > > references correctly. I am able to display simple text from my
> > assembly
> > > > into
> > > > > a text box when deployed to the server ... but not an image.
> > > > >
> > > > > Has anyone been able to display a Dundas chart via a custom
assembly?
> > Are
> > > > > there specific Code Access Security Settings for the Dundas .dll
that
> > must
> > > > be
> > > > > set in the Rept Svcs config file?
> > > > >
> > > > > Thanks,
> > > > > Bill
> > > > >
> > > > > -----------------------------
> > > > > From Robert Bruckner:
> > > > >
> > > > > Please try this:
> > > > > * Add an image to your report
> > > > > * Set the image type to Database
> > > > > * Set the image mimetype to e.g. image/png
> > > > > * For the image value use an expression like
> > > > > =MyCustomAssembly.GenerateChart()
> > > > >
> > > > > Note: your custom assembly call has to return the image as byte[].
> > > > > Here is a code snippet which should convert the Dundas chart
output
> > into a
> > > > > byte array:
> > > > >
> > > > > public static byte[] GenerateChart()
> > > > > {
> > > > > // chart rendering code
> > > > > ...
> > > > >
> > > > > // save chart image to byte[]
> > > > > System.IO.MemoryStream renderedImage = new MemoryStream();