Showing posts with label textbox. Show all posts
Showing posts with label textbox. Show all posts

Tuesday, March 27, 2012

Ability to load a TextBox with RichText ?

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 ...
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
>
>

Sunday, March 25, 2012

A way to reference the value in the current cell, not by name?

Is there any way to reference the value in the current table cell (Textbox)
from within formulas in that cell? I am curious because there are many places,
like 'Visiblity' where I would like to set it based on the current value,
but need to duplicate the formula I use for "Value". I would rather not
reference the name of the cell (like textbox4, etc), because that ALSO does
not change if I rename the cell, leaving yet another dangling reference.
I have many forumlas in the 'Visiblity->Expression' field that look like
this :
=Fields!with_xxxx_value.Value < 1
When I would like to have this (or something to that effect)
= CurrentObj.Value < 1, where CurrentObj would = the textbox, and Value
would = the "Value" expression for it.
Thanks,
// Andrew
P.S. Why does "Visibility->Expression:" seem to have the opposite effect?
If I want to HIDE a field when the value is < 0, then I have to set the
formula to "= Fields!the_value.Value < 1", which of course evaluates to TRUE
when I want to set Visible to False. Verrrrry funny.Hey Andrew,
I haven't actually tried this, but you the "ME" keyword might be what
your looking for i.e. Me.value
Michael
"Andrew Backer" wrote:
> Is there any way to reference the value in the current table cell (Textbox)
> from within formulas in that cell? I am curious because there are many places,
> like 'Visiblity' where I would like to set it based on the current value,
> but need to duplicate the formula I use for "Value". I would rather not
> reference the name of the cell (like textbox4, etc), because that ALSO does
> not change if I rename the cell, leaving yet another dangling reference.
> I have many forumlas in the 'Visiblity->Expression' field that look like
> this :
> =Fields!with_xxxx_value.Value < 1
> When I would like to have this (or something to that effect)
> = CurrentObj.Value < 1, where CurrentObj would = the textbox, and Value
> would = the "Value" expression for it.
> Thanks,
> // Andrew
> P.S. Why does "Visibility->Expression:" seem to have the opposite effect?
> If I want to HIDE a field when the value is < 0, then I have to set the
> formula to "= Fields!the_value.Value < 1", which of course evaluates to TRUE
> when I want to set Visible to False. Verrrrry funny.
>
>

Thursday, March 8, 2012

A Severe error occured ...

Hi,

i am using the HTML Textbox from activeup.com. I get a strange error when i put to much text inside the HTML textbox and insert it into my SQL Server with an SP. Myquestion is: is there a limit on a field in SQL of the type Text or what could it else be (error in HTML Textbox?)can you post some code.