DBReport new feature: Subreports

Now you can add SubReport element to DBReport.

Sometimes i need print info what are no easy to set in one recordset, so i need various recordsets and “adding” to a report, that is the SubReports are useful.

First, create a report which is a template for a report parent, is not required but is recommendable. Normally just contains a “Detail” band, however you can add bands, save as a normal report definition file.

On a Report, drag’n drop SubReport element to a band, the object assume all band area, but you can change the size; the height is automatically expand as needed when is printed.

Set the template property from properties panel (do not need template file anymore) you can change the SubReport doing click on Subreport tree from “Schema” panel (the Schema button button).

At last, you set the recordset before call “Designer”, “print” or “preview”, with this code:

rpt.SubReport(“NameOfSubReport”).RecordSet= rs

The “NameOfSubreport” must be same as SubReport Name and element Name.

See video here.

You can get the component from here, here or here.

Review the issue tracker at: https://bitbucket.org/lbmonsalve/dbreport/issues

Thanks and have a nice code!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s