Friday, March 30, 2012

Print Multi table report with a range of parameters.

We have a work order print that is called from a web page using a URL. The
print consists of 4 tables. All of the recordsets use the same parameters
but come from different data sets. I have a request to make it print
multiple work orders at a time.
When I use a select for multiple work orders it prints it all in one set of
tables but I want a seperate set of tables for each work order. Is there a
way to group the tables together?
Any other ideas?You need to use a list control, and if your reports are in RS 2000, you need
to do some hand editing of the xml.
First create your list, then add the table which displays the actual data +
any textboxes for headings and such.
Then you mark your list, and set the Grouping property to the Work Order ID.
If you're working with RS 2005, right click on the list in the report,
choose Properties. Click on the "Edit Details Group" Button. Select "Page
Break at end". (Or start, if you want.)
If you're working with RS 2000, you need to hand edit your RDL like this:
Open the code version of the report
Find your list
In the Grouping section, add <PageBreakAtEnd>true</PageBreakAtEnd>
Your code should look something like this:
<List Name="List1">
<Style>
<FontFamily>Times New Roman</FontFamily>
<FontSize>18pt</FontSize>
<Color>Maroon</Color>
<FontWeight>900</FontWeight>
</Style>
<Top>0.875in</Top>
<Grouping Name="ListGrouping">
<GroupExpressions>
<GroupExpression>=Fields(Parameters!PageGroupingParameter1.Value).Value</GroupExpression>
<GroupExpression>=Fields(Parameters!PageGroupingParameter2.Value).Value</GroupExpression>
</GroupExpressions>
<PageBreakAtEnd>true</PageBreakAtEnd>
</Grouping>
Save the code, and test the report. Did it work?
Kaisa M. Lindahl Lervik
"msc" <matt@.dontspam.com> wrote in message
news:6C0D2B4C-DCED-4559-A849-18B260FA7C03@.microsoft.com...
> We have a work order print that is called from a web page using a URL.
> The
> print consists of 4 tables. All of the recordsets use the same parameters
> but come from different data sets. I have a request to make it print
> multiple work orders at a time.
> When I use a select for multiple work orders it prints it all in one set
> of
> tables but I want a seperate set of tables for each work order. Is there
> a
> way to group the tables together?
> Any other ideas?
>sql

No comments:

Post a Comment