Tuesday, March 27, 2012
Ability to load a TextBox with RichText ?
component with the contents of a RichText file (i.e. from a saved file
'testRpt.rtf') ?
Any suggestions would be appreciated.
Thanks in advance ...
SteveNo but yes I can solve your problem!
You can't get RTF text neatly formatted into a Reporting Services Textbox
control. - you could create a .NET function to strip the RTF content and
just display the raw text - but that's not what you really want is it?
So what you can do is create a .NET function in a custom assembly that you
pass the RTF into and have it return an image stream and what you then do is
bind that image data to a Reporting Services Image control.
(in the function you'll need to use the CreateGraphics() method.)
Hope that helps. If you need help on creating custom assemblies Chapter 9 of
our book does a great job showing how to progress and how to get Code Access
Security properly configured. We had intended to include the RTF example
but time and space meant that we didn't. I'll probably be doing an article
on this RTF example in the coming months in the Premium area of our web
site.
Peter Blackburn
www.sqlreportingservices.net
"Steve_S3T" <SteveS3T@.discussions.microsoft.com> wrote in message
news:BC061D8B-5FCC-4465-BE99-233BF1CFB292@.microsoft.com...
> Is it possible (using SQL Server Reporting Services) to load a 'TextBox'
> component with the contents of a RichText file (i.e. from a saved file
> 'testRpt.rtf') ?
> Any suggestions would be appreciated.
> Thanks in advance ...
> Steve|||Due to the fact that there's no direct route with this - I'm going to leave
it well alone. :(
Much least of all because I hate doing excessive coding if there's a more
direct approach - in this case I've found an alternate route via DataDynamics
ActiveReports - cue many groans ...
I'm still waiting on a copy of your book - it's been on order a while now.
I'll give that chapter a look through when the book finally gets to me ...
Steve
"Peter Blackburn (www.sqlreportingservice" wrote:
> No but yes I can solve your problem!
> You can't get RTF text neatly formatted into a Reporting Services Textbox
> control. - you could create a .NET function to strip the RTF content and
> just display the raw text - but that's not what you really want is it?
> So what you can do is create a .NET function in a custom assembly that you
> pass the RTF into and have it return an image stream and what you then do is
> bind that image data to a Reporting Services Image control.
> (in the function you'll need to use the CreateGraphics() method.)
> Hope that helps. If you need help on creating custom assemblies Chapter 9 of
> our book does a great job showing how to progress and how to get Code Access
> Security properly configured. We had intended to include the RTF example
> but time and space meant that we didn't. I'll probably be doing an article
> on this RTF example in the coming months in the Premium area of our web
> site.
> Peter Blackburn
> www.sqlreportingservices.net
>
>
> "Steve_S3T" <SteveS3T@.discussions.microsoft.com> wrote in message
> news:BC061D8B-5FCC-4465-BE99-233BF1CFB292@.microsoft.com...
> > Is it possible (using SQL Server Reporting Services) to load a 'TextBox'
> > component with the contents of a RichText file (i.e. from a saved file
> > 'testRpt.rtf') ?
> > Any suggestions would be appreciated.
> > Thanks in advance ...
> > Steve
>
>
Monday, March 19, 2012
A third dynamic assembly loading problem ;)
Hi!
From the dll I've installed in SQL Server I load a dll via reflection.assembly.load from the GAC . I know the dll can load the dll when I test it outside SQL Server but when I run it via a store procedure from within the SQL Server I keep getting a System.IO.FileNotFoundException.
How does this work? Isn't all dll in the GAC loaded by SQL Server? Is this impossible to achieve?
Thanks in advance
Richard Hallgren
There are only a sub-set (13 or something like that, all of them system assemblies) of assemblies that are allowed to leaded from the GAC inside of SQL Server. No user assemblies are allowed to be loaded from the GAC.So what you need to do is to catalog the assemblies you want to load dynamically in the database, and it should work.
Niels
|||Thanks Niels!
But the dependency tree for the assemblies I like to reference is kind of big and guess I have to catalog all of those as well (that is the assemblies that the assembly I like to reference depend on). Some of them contains unmanaged code as well but I guess as long as I set the unsafe permission mode on those I should be able to catalog those as well. Right?|||
Richard Hallgren wrote:
But the dependency tree for the assemblies I like to reference is kind of big and guess I have to catalog all of those as well (that is the assemblies that the assembly I like to reference depend on). Some of them contains unmanaged code as well but I guess as long as I set the unsafe permission mode on those I should be able to catalog those as well. Right?
You basically need to catalog all assemblies that will be loaded, either directly or indirectly.
Niels