I'd like to format a textfield with newline. In Preview everything looks ok. After exporting to pdf all newlines are gone. I use the following text inside the textbox:
+++
=controlchars.Newline &
controlchars.Newline &
controlchars.Newline &
controlchars.Newline &
First(Fields!NameKunde.Value, "Absender") & vbnewline &
First(Fields!Ort.Value, "Absender") & vbnewline &
First(Fields!BenutzerAnmeldename.Value, "Absender") & vbnewline &
First(Fields!Vorname.Value, "Absender") & " " & First(Fields!Name.Value, "Absender") & vbnewline &
today
+++
As you see, I tried controlchars.Newline, vbnewline. No differenc in pdf.
Thanks for help
NickiThis looks like a bug. As a workaround you could handle the formatting
using a rectangle that contains a series of textboxes. The sample report at
the end of this posting demonstrates how to accomplish this.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Nicki" <Nicki@.discussions.microsoft.com> wrote in message
news:4AF42D93-C526-4235-80A7-DF83133A1A48@.microsoft.com...
> I'd like to format a textfield with newline. In Preview everything looks
ok. After exporting to pdf all newlines are gone. I use the following text
inside the textbox:
> +++
> =controlchars.Newline &
> controlchars.Newline &
> controlchars.Newline &
> controlchars.Newline &
> First(Fields!NameKunde.Value, "Absender") & vbnewline &
> First(Fields!Ort.Value, "Absender") & vbnewline &
> First(Fields!BenutzerAnmeldename.Value, "Absender") & vbnewline &
> First(Fields!Vorname.Value, "Absender") & " " & First(Fields!Name.Value,
"Absender") & vbnewline &
> today
> +++
> As you see, I tried controlchars.Newline, vbnewline. No differenc in pdf.
> Thanks for help
> Nicki
>
RectangleTextboxSampleReport.rdl
----
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
tion"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Rectangle Name="rectangle1">
<ReportItems>
<Textbox Name="textbox4">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>3</ZIndex>
<Top>1.625in</Top>
<rd:DefaultName>textbox4</rd:DefaultName>
<Height>0.25in</Height>
<Width>1.875in</Width>
<CanGrow>true</CanGrow>
<Value>=today</Value>
<Left>0.125in</Left>
</Textbox>
<Textbox Name="textbox3">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>2</ZIndex>
<Top>1.125in</Top>
<rd:DefaultName>textbox3</rd:DefaultName>
<Height>0.25in</Height>
<Width>1.875in</Width>
<CanGrow>true</CanGrow>
<Value>Last line of text</Value>
<Left>0.125in</Left>
</Textbox>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<Top>0.625in</Top>
<rd:DefaultName>textbox2</rd:DefaultName>
<Height>0.25in</Height>
<Width>1.875in</Width>
<CanGrow>true</CanGrow>
<Value>Second line of text</Value>
<Left>0.125in</Left>
</Textbox>
<Textbox Name="textbox1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<Top>0.375in</Top>
<rd:DefaultName>textbox1</rd:DefaultName>
<Height>0.25in</Height>
<Width>1.875in</Width>
<CanGrow>true</CanGrow>
<Value>First line of text</Value>
<Left>0.125in</Left>
</Textbox>
</ReportItems>
<Width>2.25in</Width>
<Style>
<BorderWidth>
<Default>1.5pt</Default>
</BorderWidth>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</Rectangle>
</ReportItems>
<Style />
<Height>2in</Height>
</Body>
<TopMargin>1in</TopMargin>
<Width>6.5in</Width>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>b77866c3-877c-45bc-a5dc-88760f336daf</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment