Showing posts with label position. Show all posts
Showing posts with label position. Show all posts

Wednesday, March 7, 2012

Charts, aligning plot area vertically

Say you have a few charts which you want to align vertically. Both left and
right side of the charts should be at same vertical position. This is
especially important if you have same measurement and scale for the x-axis
for two charts and want to compare values across two diagrams. I have not
found a way to get vertical aligment (yet).
The area for the plot area seems to be determined by the text size needed to
print the y-axis labels. And this is of course dependent on the actual data.
Apparently, the chart component is licensed from www.dundas.com. On that
site, I found a white paper suggesting you can do this using an
AlignWithChartArea property. However, I can't find such in RD. Am I correct
in assuming that this feature is missing from RD?
Any ideas on how to accomplish this?
TIA
Tibor Karaszi
SQL Server MVPYou could make the charts the same size and do the alignment using Layout
toolbar in the Designer (Align Left/Align Right toolbuttons.)
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uzkCwqaiEHA.2848@.TK2MSFTNGP10.phx.gbl...
> Say you have a few charts which you want to align vertically. Both left
and
> right side of the charts should be at same vertical position. This is
> especially important if you have same measurement and scale for the x-axis
> for two charts and want to compare values across two diagrams. I have not
> found a way to get vertical aligment (yet).
> The area for the plot area seems to be determined by the text size needed
to
> print the y-axis labels. And this is of course dependent on the actual
data.
> Apparently, the chart component is licensed from www.dundas.com. On that
> site, I found a white paper suggesting you can do this using an
> AlignWithChartArea property. However, I can't find such in RD. Am I
correct
> in assuming that this feature is missing from RD?
> Any ideas on how to accomplish this?
> TIA
> Tibor Karaszi
> SQL Server MVP
>|||Yes, but unfortunately this applies to the control per se. I.e., the Chart Area. What I need to be aligned is
the *Plot Area*.
The size of the plot area seem to be dynamically adjusted based on the text to fill in to the left/right of
the diagram (the part which is in the Chart Area but isn't the Plot Area). This text is drawn from the data,
so I cannot know in advance how long strings it will be.
(This is so I can match scales (vertical lines) across several diagrams.)
Thanks
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
news:%23f0aB%23eiEHA.2340@.TK2MSFTNGP11.phx.gbl...
> You could make the charts the same size and do the alignment using Layout
> toolbar in the Designer (Align Left/Align Right toolbuttons.)
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:uzkCwqaiEHA.2848@.TK2MSFTNGP10.phx.gbl...
> > Say you have a few charts which you want to align vertically. Both left
> and
> > right side of the charts should be at same vertical position. This is
> > especially important if you have same measurement and scale for the x-axis
> > for two charts and want to compare values across two diagrams. I have not
> > found a way to get vertical aligment (yet).
> >
> > The area for the plot area seems to be determined by the text size needed
> to
> > print the y-axis labels. And this is of course dependent on the actual
> data.
> >
> > Apparently, the chart component is licensed from www.dundas.com. On that
> > site, I found a white paper suggesting you can do this using an
> > AlignWithChartArea property. However, I can't find such in RD. Am I
> correct
> > in assuming that this feature is missing from RD?
> >
> > Any ideas on how to accomplish this?
> >
> > TIA
> > Tibor Karaszi
> > SQL Server MVP
> >
> >
>

Thursday, February 16, 2012

CHARINDEX returns zero in TEXT column

I'm running into an issue where CHARINDEX on a text datatype column returns
0
if the expression I'm searching for exists at a position greater than 8000.
For example:
use pubs;
select charindex('New Moon Books',pr_info,8000)
from pub_info
returns zero, even though I know 'New Moon Books' exists past character
8000. Is this a known issue, and is there a workaround? It's causing my
search and replace procedure (using the UPDATETEXT function) to fail, i.e.
LIKE '%searchfor%'
is true but
CHARINDEX('searchfor',textColumn)
is zero.
Any help is appreciated.Did you try PATINDEX?
"Alan Smithee" <AlanSmithee@.discussions.microsoft.com> wrote in message
news:F8D5F76C-9114-47F1-A584-96035BFA38B6@.microsoft.com...
> I'm running into an issue where CHARINDEX on a text datatype column
> returns 0
> if the expression I'm searching for exists at a position greater than
> 8000.
> For example:
> use pubs;
> select charindex('New Moon Books',pr_info,8000)
> from pub_info
> returns zero, even though I know 'New Moon Books' exists past character
> 8000. Is this a known issue, and is there a workaround? It's causing my
> search and replace procedure (using the UPDATETEXT function) to fail, i.e.
> LIKE '%searchfor%'
> is true but
> CHARINDEX('searchfor',textColumn)
> is zero.
> Any help is appreciated.|||CHARINDEX will not work for strings larger than 8000. To work with TEXT
fields larger than this size, you will need to use the TEXT functions in SQL
Server 2000 like READTEXT, WRITETEXT etc.
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
"Alan Smithee" <AlanSmithee@.discussions.microsoft.com> wrote in message
news:F8D5F76C-9114-47F1-A584-96035BFA38B6@.microsoft.com...
> I'm running into an issue where CHARINDEX on a text datatype column
> returns 0
> if the expression I'm searching for exists at a position greater than
> 8000.
> For example:
> use pubs;
> select charindex('New Moon Books',pr_info,8000)
> from pub_info
> returns zero, even though I know 'New Moon Books' exists past character
> 8000. Is this a known issue, and is there a workaround? It's causing my
> search and replace procedure (using the UPDATETEXT function) to fail, i.e.
> LIKE '%searchfor%'
> is true but
> CHARINDEX('searchfor',textColumn)
> is zero.
> Any help is appreciated.|||charindex won't work with text datatype. Use patindex|||Thanks Aaron, you of course are correct, PATINDEX works! (I was sure I had
tried that before, but I think I left out the wildcard character).
Anyway, much thanks (and thanks to Omnibuzz too!)
A.S.
"Aaron Bertrand [SQL Server MVP]" wrote:

> Did you try PATINDEX?
>
> "Alan Smithee" <AlanSmithee@.discussions.microsoft.com> wrote in message
> news:F8D5F76C-9114-47F1-A584-96035BFA38B6@.microsoft.com...
>
>

CHARINDEX

I find that CHARINDEX does not seem to return the position of a matching
phrase when the token being searched contains punctuation after the phrase.
In other words CHARINDEX('Birthday', 'Hope you have a happy Birthday!', 0)
does NOT return the position of Birthday in the phrase!!
Please can anyone advise me on this.
Thanks
Bryan
I get 23 from both SQL 2000 SP4, and SQL 2005 SP2.
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCTS: SQL Server 2005