Horizontally expandable TfrxCrossView?

Hello everyone,

Sorry if this is already explained somewhere - I need to use a non-DB grid (I tried with TfrxCrossView) which has only two columns, but if it can't fit on the page I would like it to expand horizontally (i.e. repeat the columns) instead of getting several pages with just two narrow columns.

In other words, instead of

C1 C2
11 21
12 22
13 23
.
.
.
1N 2N

I would like to get something like:

C1 C2 C1 C2 ... C1 C2
11 21 17 27 1N 2N
12 22 18 28
13 23 19 29

I tried using BeforePrint but I'm not sure how to calculate the max columns/rows that can fit on the page... I tried with band columns but it doesn't work with TfrxCrossView (?)

Regards,
Milos

Comments

  • edited 8:05AM
    OK, I'm trying to make my own crossview (grid).

    I inherited TfrxStretcheable, with no actual drawing done.

    In the BeforePrint procedure I make a (inherited) TfrxMemoView for each grid cell (I believe that is what crossview does as well).

    In the overriden TfrxMemoView.Draw procedure of the first memo I make sure that all memos are arranged correctly.

    This all works if the entire grid fits on one page, but I don't know how to handle grids larger than the page. If I just keep increasing the vertical offset eventually the memos leave the page boundaries. If I call Engine.NewPage I get a bunch of new pages (hundreds) because apparently it causes some re-creating and re-drawing and looping and gives me crazy results - and besides all the memos seem to get lost somewhere.

    Any ideas?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.