Print Area

Migrating from flexcel3 to flexcel6, i've found some problems with print area. With flexcel3 the print area was moving down when the rows increase. Now, it keeps fixed.

How can easily configure the report to mantain the old behaviour?

Thanks in advance.

Hi,

Print area should for sure move down in FlexCel 6 too, this is basic behavior. (The print area is just a named range, and of course named ranges should move down when you insert rows).

You can see an example in 
FlexCelVCLNT\Demo\Delphi\Modules\20.Reports\83.HTML

Here the original print_area in the template is A1:C13, while in the final file it is A1:C203

There are other demos showing also the print area, but as said this is basic functionality and it should be working fine.

The only reason I can think for it to not move is if it shouldn't move: For example if you have a range (not range) which goes from A1 to C1 and the print area goes from A1 to D1, then it won't move down since some cells should move (columns A to C) and others shouldn't (column D)

Can you send me the template you are using and the result file you are getting to adrian@tmssoftware.com so I can take a look? Or maybe some sample code that shows what you are seeing?

Sent, First of all thanks for your quick support.

As I mention in the email, It seems that the final row of a print area must not match with other named range (I only tested “__” ranges).

Waiting your comments.

Regards

Hi,


It isn't about matching other named ranges, but just the range of the print area. In the "Ok" tempates, the printarea goes to row 8, while in the "Fail" template the printarea goes to row 7.

You always need an extra row in order to insert files, this was the same in FlexCel 3, and it is the same in Excel.

If you want to understand why it is working this way, do the following:
1)Open Template.Fail1.xls in Excel.
2)Select rows 1 to 7  (Which is the one you are going to copy in the report)
3)ctrl-C to copy, then select row 8, right click and select "Insert Copied cells"
You'll see the print area doesn't grow, because you are copying in row 8, and the printarea goes up to row 7.

If you do the same in the "OK" templates, you'll see how the range grows in Excel.

All 3 of them: Excel, FlexCel 3 and FlexCel 6 behave the same: You need an extra row in the print range. If you don't want that extra row in the final report, just rename the range from CONTADOR to __CONTADOR__X

"X" ranges remove the last row, and are designed for cases like this.

Yes, you're right. Thanks again.