Wednesday, March 7, 2012

Keeping Multiple Detail Lines in a Table Together

I have a table in my report. The table has two detail lines per detail item. My problem is that the two lines really need to be kept together, and the table will page break between the lines when the end of page is reached. I have been looking through the different table properties, and I have not been able to locate anything that lends a hand to my issue. I did some quick searches, and I couldn't find another thread requesting this information. I may just be missing something obvious.

Any help and/or advice would be great! Thanks.

Curtis

P.S.

This is what I am working with

Detail 1 = Product Description, Product Number

Detail 2 = Various Pricing and Units of Measure, Barcode

It makes it a little difficult if these two lines are not kept together! Thanks again!

I have not come up with a solution for my "Keeping Multiple Detail Lines in a Table Together", but I have thought up a work around that I would like to use. I wanted to page break at a specified line number to reduce or eliminate the detail lines being separated, because of where they fall on the page. The problem is, I cannot get the work around to function.


Page Breaks
In some reports, you may want to place a page break at the end of a specified number of rows instead of, or in addition to, on groups or report items. To do this, create a group in a data region (typically a group immediately outside the detail), add a page break to the group, and then add a group expression to group by a specified number of rows.

The following expression, when placed in the group expression, assigns a number to each set of 25 rows. When a page break is defined for the group, this results in a page break every 25 rows.

=Int((RowNumber(Nothing)-1)/25)


The preceding information was located in a help file that I found. (ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.SQL.v2005.en/rptsrvr9/html/87ddb651-a1d0-4a42-8ea9-04dea3f6afa4.htm to reference the help file) I created a group immediately outside my details. In the expression for the group I inserted the code verbatim.

I clicked preview, and the page break broke the report. I received the following error:

[rsInvalidGroupExpressionScope] A group expression for the table ‘table1’ uses the RowNumber function with a scope parameter that is not valid. When used in a group expression, the value of the scope parameter of RowNumber must equal the name of the group directly containing the current group.

So, what do I insert for "Nothing" that would give me the desired results?

Any help/advice is greatly appreciated!

Thanks

Curtis

|||One way of doing this is to created a rectangle and embed it in your detail line. This means that you have to use text boxes to display your data rather than the table cells, but it does resolve the problem with keeping the lines together.

No comments:

Post a Comment