Monday, March 19, 2012
custom report item test justification.
i need to extend the functionality of the textbox in reporting services to
implement text justification align.
i made a research and found the concept of "custom report items" but it's
implmented as image i also see the sample of polygonCL in SDK extention
samples
i am asking if there are a way to take all the functionality of textbox and
on just extend the required functionality' or develop a new textbox and
render it as image?
thanksWhat do you mean by text justification?
If you mean you want to center, right align, or left align - those are
already availiable. Just click on the text box and clikc one of the
Justifications.
I dont think this is the problem you are facing. What, exactly, is the
issue? and what is it your tryingto accomplish?|||thanks a lot for your replaying
i mean by text justification is the text width is the same for all line
inside textbox
if you look at word u will see right, left, center and justify align
i need to use a justify align for textbox
by the way i am using RS 2005
thanks
"sorcerdon@.gmail.com" wrote:
> What do you mean by text justification?
> If you mean you want to center, right align, or left align - those are
> already availiable. Just click on the text box and clikc one of the
> Justifications.
> I dont think this is the problem you are facing. What, exactly, is the
> issue? and what is it your tryingto accomplish?
>
Thursday, March 8, 2012
Custom Groups
In your case, you could create a group that uses an expression to return 1 if the value starts with A-G, return 2 if the value starts with H-P, and so on. The expression would look something like this, it assumes only upper case ASCII characters.
=Switch("ABCDEFGH".Contains(Fields!Name.Value.Substring(0,1)), 1, "IJKLMNOP".Contains(Fields!Name.Value.Substring(0,1)), 2, "QRSTUVWXYZ".Contains(Fields!Name.Value.Substring(0,1)), 3)
or
(use 64 since Choose uses the 1-based index into the array)
=Choose(Convert.ToInt32(Fields!Name.Value.Chars(0)) - 64, {1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3})
If you want something a little cleaner, then I would use a custom function that takes the first character as an argument and determines the appropriate value using regular control statements.|||
Thanks Ian!
Instead of editing the report, I decided to just add a field to my SQL statement to group on. It looks something like this:
select case
when left(lname,1) between 'a' and 'h' then 'A-H'
when left(lname,1) between 'i' and 'p' then 'I-P'
when left(lname,1) between 'q' and 'z' then 'Q-Z'
end as NameType from employee
I then created a group on the NameType field.
This worked great and my group headers were named properly as well.
|||I am trying something similar, but for some reason it does not like the syntax near AS. I see that it creates field called "NameType"...but does 'Employee' refer to the table the lname is coming from?|||Yes, the 'AS NameType' clause specifies the name for the result of the case statement, and 'lname' is a field in the 'Employee' table.What is your query? Can you post it? I'm happy to take a look at it and see if there is something I can spot that would result in the syntax error.
Ian
Custom Groups
In your case, you could create a group that uses an expression to return 1 if the value starts with A-G, return 2 if the value starts with H-P, and so on. The expression would look something like this, it assumes only upper case ASCII characters.
=Switch("ABCDEFGH".Contains(Fields!Name.Value.Substring(0,1)), 1, "IJKLMNOP".Contains(Fields!Name.Value.Substring(0,1)), 2, "QRSTUVWXYZ".Contains(Fields!Name.Value.Substring(0,1)), 3)
or
(use 64 since Choose uses the 1-based index into the array)
=Choose(Convert.ToInt32(Fields!Name.Value.Chars(0)) - 64, {1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3})
If you want something a little cleaner, then I would use a custom function that takes the first character as an argument and determines the appropriate value using regular control statements.|||
Thanks Ian!
Instead of editing the report, I decided to just add a field to my SQL statement to group on. It looks something like this:
select case
when left(lname,1) between 'a' and 'h' then 'A-H'
when left(lname,1) between 'i' and 'p' then 'I-P'
when left(lname,1) between 'q' and 'z' then 'Q-Z'
end as NameType from employee
I then created a group on the NameType field.
This worked great and my group headers were named properly as well.
|||I am trying something similar, but for some reason it does not like the syntax near AS. I see that it creates field called "NameType"...but does 'Employee' refer to the table the lname is coming from?|||Yes, the 'AS NameType' clause specifies the name for the result of the case statement, and 'lname' is a field in the 'Employee' table.What is your query? Can you post it? I'm happy to take a look at it and see if there is something I can spot that would result in the syntax error.
Ian
Friday, February 24, 2012
Custom Code in SSAS
Hi,
in AS2000 you could register an own dll to add functionality in MDX for calculations. What is the equivalent in AS2005?
Thanks...
The same except now it is a .NET assembly.
Mosha has some interesting examples on his web site and in his blog.
http://www.mosha.com
http://www.sqljunkies.com/WebLog/mosha/
Enjoy.
_-_-_ Dave
|||
Dave,
thanks, I'll have a look at it...