Skip to Content
0
Former Member
Sep 27, 2013 at 12:58 AM

Programmatically Position Several Subreports so they "jigsaw" together

24 Views

I am struggling with getting several subreports to layout so that they kind of jigsaw together. What I mean is I want zero additional white space vertically and horizontally between my subreports. Similar to the below schema:

I have tried several things after reading many posts and am still stumped.

I got close with

  1. Placing my largest subreport in a section for which I selected "Underlay Following Sections"
  2. Positioning my subreports in individual sections to the right of the main subreport in a single column

The resulting report did not show any of the subreports until the second page so I had a whole bunch of unacceptable white space. (This thing should really be a one page report whenever the data allows).

My next attempt was to arrange subreports around the bigger subreport and then right click each subreport, selecting Format Subreport, and unchecking Keep Together.

This was also a no-go as you can see from the following image of the resulting report (black-outs for confidentiality):

Fine. I then bought a book which mentioned SubreportObject for use with RAS SDL version XI. This led me to searching com.crystaldecisions.sdk.report.definition and wondering if there is a way to grab the position of a subreport then add roughly 0.025 inches to the X and Y postions to code where the next subreport should be positioned.

My questions are really:

  1. How can I make these report objects "jigsaw" together?
  2. If this has to be done programmatically; EXACTLY what code should I be writing (gettop(), getheight(), getwidth(); then what?) & where should I be putting it? In a formula field from the size a position dialog box? Where?

I only know enough to be dangerous--no where near enough to infer any kind of usable past programming knowledge.

Please help!