Showing posts with label area. Show all posts
Showing posts with label area. Show all posts

Friday, March 30, 2012

How to Format Text Area in Report

Hi,
I need create report that should look like a letter,
i.e. I have long, formatted text, where I should place few fields from
the record.
For instance:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dear Sir,
1. Hear goes
2. some formatted text
3. and {Fields!one_field.Value} inserted at line number 3
4. and {Fields!another_field.Value} inserted here
And text continues here
and here, and {Fields!next_filed.Value}
etc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I did not found possibility to have one text box with formatted content
and fields/ calculations inserted into it in Report Design.
I tried also divide my text area to few text boxes where static text was
separated from data fields, but I've got into the issues with spacing
between the fields. It looks good in design view, but in preview it adds
extra vertical spaces within the fields. Also it is quite hard to format
a set of text boxes to look like one formatted letter.
Is it possible insert fields into formatted text box? If no, how in
general I should build such report?
Thanks for any help,
Alexander.On Dec 25, 2:38 am, "Alexander N. Treyner" <a...@.treyner.israel.net>
wrote:
> Hi,
> I need create report that should look like a letter,
> i.e. I have long, formatted text, where I should place few fields from
> the record.
> For instance:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dear Sir,
> 1. Hear goes
> 2. some formatted text
> 3. and {Fields!one_field.Value} inserted at line number 3
> 4. and {Fields!another_field.Value} inserted here
> And text continues here
> and here, and {Fields!next_filed.Value}
> etc.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> I did not found possibility to have one text box with formatted content
> and fields/ calculations inserted into it in Report Design.
> I tried also divide my text area to few text boxes where static text was
> separated from data fields, but I've got into the issues with spacing
> between the fields. It looks good in design view, but in preview it adds
> extra vertical spaces within the fields. Also it is quite hard to format
> a set of text boxes to look like one formatted letter.
> Is it possible insert fields into formatted text box? If no, how in
> general I should build such report?
> Thanks for any help,
> Alexander.
You should consider using a table control in place of the textboxes.
This should allow for a little better layout/design flexibility. Also,
concatenating text and expressions/etc together as an expression is
fairly straight forward, i.e.,:
="and " + Fields!one_field.Value + "inserted at line number 3"
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||EMartinez wrote:
> You should consider using a table control in place of the textboxes.
> This should allow for a little better layout/design flexibility. Also,
> concatenating text and expressions/etc together as an expression is
> fairly straight forward, i.e.,:
> ="and " + Fields!one_field.Value + "inserted at line number 3"
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
I tried to use expression, but it does not allow to format text. How can
I insert CRLF in the expression? I tried chr(10)+chr(13). It looks good
in preview, when I run report from my web site, seems it just ignore it
and print report without CRLF.
I will try to use tables.
Thanks,
Alex.|||EMartinez wrote:
> You should consider using a table control in place of the textboxes.
> This should allow for a little better layout/design flexibility. Also,
> concatenating text and expressions/etc together as an expression is
> fairly straight forward, i.e.,:
> ="and " + Fields!one_field.Value + "inserted at line number 3"
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
I tried to use expression, but it does not allow to format text. How can
I insert CRLF in the expression? I tried chr(10)+chr(13). It looks good
in preview, when I run report from my web site, seems it just ignore it
and print report without CRLF.
I will try to use tables.
Thanks,
Alex.|||RS is pretty crummy at this time for this. RS 2008 will have much better
support for rich text. I have not experimented with it in pre-release
software so other than knowing the support will be better (i.e. there will
be support for rich text) I can't give you particulars.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Alexander N. Treyner" <alex@.treyner.israel.net> wrote in message
news:ufqbGGtRIHA.536@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I need create report that should look like a letter,
> i.e. I have long, formatted text, where I should place few fields from the
> record.
> For instance:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dear Sir,
> 1. Hear goes
> 2. some formatted text
> 3. and {Fields!one_field.Value} inserted at line number 3
> 4. and {Fields!another_field.Value} inserted here
> And text continues here
> and here, and {Fields!next_filed.Value}
> etc.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> I did not found possibility to have one text box with formatted content
> and fields/ calculations inserted into it in Report Design.
> I tried also divide my text area to few text boxes where static text was
> separated from data fields, but I've got into the issues with spacing
> between the fields. It looks good in design view, but in preview it adds
> extra vertical spaces within the fields. Also it is quite hard to format a
> set of text boxes to look like one formatted letter.
>
> Is it possible insert fields into formatted text box? If no, how in
> general I should build such report?
> Thanks for any help,
> Alexander.

Monday, March 26, 2012

How to force a new page inbetween Subreports

Anyone know how to force a new page inbetween Subreports?
I have for example 10 reports which I want to consolidate into a single area of work as one report (i.e. HR reports for month to date).
So Ive created a blank report and added in the subreports needed.
When I go to repreview the reports they all come across as one page.
What im looking for is each being on a separate page or at least starting on a separate page, and at best when I export to excel then the ports appearing as different tabs on the worksheet and not part of one continuous page.
Anyone have an idea on how to do this?
Anyhelp MUCH appreciated.Rectangles support before and after page breaks:
* Place empty rectangles between the subreports and set page break on the
rectangles.
* Place each subreports in a rectangle and place a page break on the
rectangle
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ryan Johnson" <RyanJohnson@.discussions.microsoft.com> wrote in message
news:801596CC-67F5-4EBF-A848-BF40FD30B185@.microsoft.com...
> Ack.. but get the following when viewed in excel.
> 'Subreports within table/matrix cells are ignored.'
> And no matter how many times I change the force new page option "page
break at end", it resets itself back to blank.
>|||Try running the report that follows this posting. It uses 2 textboxes
separated by a rectangle.
The rectangle has a page break set on it. You should get 2 pages.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"chad" <chad@.discussions.microsoft.com> wrote in message
news:D4446D8B-0122-413E-9B6A-B1C89DFA3D6E@.microsoft.com...
> rectangles do have these properties. however, these properties don't seem
to do anything for me. i selected page break before, but it does not insert
the page break.
> "Bruce Johnson [MSFT]" wrote:
> > Rectangles support before and after page breaks:
> > * Place empty rectangles between the subreports and set page break on
the
> > rectangles.
> > * Place each subreports in a rectangle and place a page break on the
> > rectangle
> >
> > --
> > Bruce Johnson [MSFT]
> > Microsoft SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Ryan Johnson" <RyanJohnson@.discussions.microsoft.com> wrote in message
> > news:801596CC-67F5-4EBF-A848-BF40FD30B185@.microsoft.com...
> > > Ack.. but get the following when viewed in excel.
> > > 'Subreports within table/matrix cells are ignored.'
> > >
> > > And no matter how many times I change the force new page option "page
> > break at end", it resets itself back to blank.
> > >
> > >
> >
> >
> >
RectangleWithPageBreak.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>
<Textbox Name="CustomerID_1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>2</ZIndex>
<Top>1.875in</Top>
<rd:DefaultName>CustomerID_1</rd:DefaultName>
<Height>0.25in</Height>
<Width>1in</Width>
<CanGrow>true</CanGrow>
<Value>Second Field</Value>
<Left>0.875in</Left>
</Textbox>
<Rectangle Name="rectangle1">
<ZIndex>1</ZIndex>
<Top>0.625in</Top>
<Height>1in</Height>
<Width>2in</Width>
<Style />
<Left>0.875in</Left>
<PageBreakAtStart>true</PageBreakAtStart>
</Rectangle>
<Textbox Name="CustomerID">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<Top>0.125in</Top>
<rd:DefaultName>CustomerID</rd:DefaultName>
<Height>0.25in</Height>
<Width>1in</Width>
<CanGrow>true</CanGrow>
<Value>First Field</Value>
<Left>0.75in</Left>
</Textbox>
</ReportItems>
<Style />
<Height>2.75in</Height>
</Body>
<TopMargin>1in</TopMargin>
<Width>6.62501in</Width>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>4f653deb-b9af-49ca-98e1-fe972d395f88</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>