Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Line Break?

Author  Topic 

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-03-30 : 15:28:03
I need a little help here. I don't want my output to have line break but I think base on my expression it is doing that. Here's my expression:

=iif(Parameters!Location.Value = "10",
"10" & Fields!ID.Value & Parameters
Location.Value, "NONE")

The output seems to look like this:

10100
10

I want it to look like this:

1010010

Any suggestions? The expression box seems a little small to fit all those in one line.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-30 : 15:30:23
It's the size of the field that is causing you the problem, not the size of the expression box. Make sure to select the option on the field to expand to accomodate its contents.

Tara
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-03-30 : 15:36:54
Yes. Thanks. I figure it was that posting.
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-03-30 : 15:54:23
Tara,

After unchecking the can grow property, it's working but somehow it's also cutting section of what it outputs. Any ideas how to get it to work correctly?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-30 : 15:57:54
I don't understand what you mean.

Tara
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-03-30 : 16:26:10
YOu know how I describe earlier that the height is adjusting to fight the content that it is output even though it's only about 10 digits in length.

Example how it looks like in textbox:

*I1010
022*

After I uncheck the textbox height "Can increase to accommodate contents" it seems to work as intended, but now a portion is missing.

Like this:

*I1010

That's it. "022*" is missing from that section. Not sure why it's doing this. I can see it if I expand the textbox, but then there's a lot of white space in between the numbers.

Example:

*I1010................................022*

Any suggestions?

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-30 : 16:27:43
So does your data contain a line break? If you want to remove spaces using T-SQL, check out the REPLACE option.

Tara
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-03-30 : 16:32:35
OMG!!! Could this be it? You may be right.

SELECT ID, DESCRIPTION
FROM ORDER
WHERE (LEN(ID) = 3)
ORDER BY ID

So for the Replace option, is that within SQL or is that within reporting services?
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-03-30 : 16:39:44
When I run that query in query analyzer, it does output lots of blank spaces after what it outputs.

Is it possible to use a rtrim to get rid of the spaces in reporting services?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-30 : 16:41:44
REPLACE, RTRIM, LTRIM are T-SQL things and not RS. So you'd use these in your stored procedure.

Tara
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-03-30 : 16:44:25
Got the RTRIM to work in Reporting services. Thanks Tara for pointing that out.

Go to Top of Page
   

- Advertisement -