I am making a query for mailing labels that I will generate in Reporting
Services. I have a SQL Server stored procedure that returns the address using
SQL like this
SELECT Address + CHAR(13) + Address2 + CHAR(13) + City + ' ' + State + ' '
+ Zip AS FullAddress
FROM ...
Assume the data is:
Address: 123 Main Street
Address2: Suite 3
City: Bellevue
State: WA
Zip: 98111
I assign the FullAddress field to a textbox in Reporting Services. I resize
it to be several lines high. The result I get is something like this:
123 Main StreetSuite3Bellevue
WA 98111
I have tried using CHAR(10) + CHAR(13) instead of just CHAR(10), but I get
double spaces. Does RS handle CHAR() output? Do I need to use separate fields?I've done this before but in the actual field expression not in the query.
Use Fields!Address.Value + CHR(10) + Fields!Address.Value + ...
"Rick" wrote:
> I am making a query for mailing labels that I will generate in Reporting
> Services. I have a SQL Server stored procedure that returns the address using
> SQL like this
> SELECT Address + CHAR(13) + Address2 + CHAR(13) + City + ' ' + State + ' '
> + Zip AS FullAddress
> FROM ...
> Assume the data is:
> Address: 123 Main Street
> Address2: Suite 3
> City: Bellevue
> State: WA
> Zip: 98111
> I assign the FullAddress field to a textbox in Reporting Services. I resize
> it to be several lines high. The result I get is something like this:
> 123 Main StreetSuite3Bellevue
> WA 98111
> I have tried using CHAR(10) + CHAR(13) instead of just CHAR(10), but I get
> double spaces. Does RS handle CHAR() output? Do I need to use separate fields?|||Thanks. Your answer got me going in the right direction. I didn't get the
Chr(10) to work in the actual field expression, but chr(10) + chr(13) did.
For the benefit of future thread readers...I went a step further and created
a code block in the Report|Report Parameters command to make things a little
cleaner. It easily handles the common case where the second address line is
empty (Note: my query returns an empty string rather than a NULL if there is
no Address2). My code is this:
Function BuildAddress(ByVal A1 As String, ByVal A2 As String, ByVal C AS
String) As String
Dim strReturn As String
=Code.BuildAddress(Fields!Address.Value, Fields!Address2.Value,
Fields!CSZ.Value)
If A2.Length > 0 Then
strReturn += A2 + chr(10) + chr(13)
End If
strReturn += C
Return strReturn
End Function
And then I used the following expression in the textbox:
=Code.BuildAddress(
"David Bienstock" wrote:
> I've done this before but in the actual field expression not in the query.
> Use Fields!Address.Value + CHR(10) + Fields!Address.Value + ...
> "Rick" wrote:
> > I am making a query for mailing labels that I will generate in Reporting
> > Services. I have a SQL Server stored procedure that returns the address using
> > SQL like this
> >
> > SELECT Address + CHAR(13) + Address2 + CHAR(13) + City + ' ' + State + ' '
> > + Zip AS FullAddress
> > FROM ...
> >
> > Assume the data is:
> > Address: 123 Main Street
> > Address2: Suite 3
> > City: Bellevue
> > State: WA
> > Zip: 98111
> >
> > I assign the FullAddress field to a textbox in Reporting Services. I resize
> > it to be several lines high. The result I get is something like this:
> >
> > 123 Main StreetSuite3Bellevue
> > WA 98111
> >
> > I have tried using CHAR(10) + CHAR(13) instead of just CHAR(10), but I get
> > double spaces. Does RS handle CHAR() output? Do I need to use separate fields?
Showing posts with label labels. Show all posts
Showing posts with label labels. Show all posts
Thursday, March 22, 2012
Friday, February 17, 2012
Document Map - Need to Remove
I have removed the Document Map labels on my text boxes. When the report is
rendered in RS, the document map pane is still displayed with only the name
of the report in the pane.
Question: how do I make this go away?Check the properties of the textbox for Label and delete it. Moreover just
check in "View code" and see the code and search for "Label" if it is there
then you have not removed something.
Amarnath
"DONNA" wrote:
> I have removed the Document Map labels on my text boxes. When the report is
> rendered in RS, the document map pane is still displayed with only the name
> of the report in the pane.
> Question: how do I make this go away?
>|||Once I removed the labels from all of my text boxes that showed up in the
document map, I was able to show my report without any document map.
"Amarnath" wrote:
> Check the properties of the textbox for Label and delete it. Moreover just
> check in "View code" and see the code and search for "Label" if it is there
> then you have not removed something.
> Amarnath
> "DONNA" wrote:
> > I have removed the Document Map labels on my text boxes. When the report is
> > rendered in RS, the document map pane is still displayed with only the name
> > of the report in the pane.
> >
> > Question: how do I make this go away?
> >
rendered in RS, the document map pane is still displayed with only the name
of the report in the pane.
Question: how do I make this go away?Check the properties of the textbox for Label and delete it. Moreover just
check in "View code" and see the code and search for "Label" if it is there
then you have not removed something.
Amarnath
"DONNA" wrote:
> I have removed the Document Map labels on my text boxes. When the report is
> rendered in RS, the document map pane is still displayed with only the name
> of the report in the pane.
> Question: how do I make this go away?
>|||Once I removed the labels from all of my text boxes that showed up in the
document map, I was able to show my report without any document map.
"Amarnath" wrote:
> Check the properties of the textbox for Label and delete it. Moreover just
> check in "View code" and see the code and search for "Label" if it is there
> then you have not removed something.
> Amarnath
> "DONNA" wrote:
> > I have removed the Document Map labels on my text boxes. When the report is
> > rendered in RS, the document map pane is still displayed with only the name
> > of the report in the pane.
> >
> > Question: how do I make this go away?
> >
Subscribe to:
Posts (Atom)