Recently in Active Reports Category

More ActiveReports

| | Comments (0) | TrackBacks (0)

I've gotten some really good support from DataDynamics about ActiveReports. It's making up for the landmines I've stepped on so far. I like that as a company they're very serious about taking care of their company.

That makes me feel good.

And they just released an update that fixes several of the bugs were were butting up against previously. Bonus!

Latest ActiveReports Quirk

| | Comments (0) | TrackBacks (0)

So we found two more quirks with ActiveReports:

  1. If you are trying to dynamically adjust the height of all of the textboxes in your detail so they look like the table row, you have no real way to do that in the Detail Format event where it would make sense. Instead, in the Detail Format event, ActiveReports just paints the object to the original size you set it and fills it with text. At some point, behind the scenes it grows the textbox, but we can't seem to hook into it.
  2. When I'm creating multiple rows of controls with borders in ActiveReports, it seems to want to increment the border-size, so that the first set of controls are the border thickness I want, but each successive line has a thicker border. The only way to combat this is to set the border-style to something different than what I was using, so instead of solid lines, I'll have to use dots.
  3. ActiveReports will continue to make my life easier, but I'm going to have to build so many damn tools to make it easy to work with that I just want to curse.

Active Reports Best Practices

| | Comments (4) | TrackBacks (0)

Active Reports Best Practices
Version 1

This is a collection of best practices I've come up with for Data Dynamics Active Reports.NET so far.

  1. Create a base report shell that will contain all of the sections of your report and make use of SubReports to present the content. This allows you to add a common header and footer to the pages.
  2. Be aware that any report that is being used as a subreport does not display the page header and footer. These sections are automatically created when you create a new report, and add to the processing time of the report, but end up not being displayed. Get rid of them.
  3. You can nest subreports as deeply as you need. Make use of them to contain complex logic.
  4. For each section in your report that’s going to be run as a subreport, create a separate folder for those reports to provide some organization. So, for example, if you have two sections in your report: Loan and Borrower, create two folders: Loan and Borrower in the Project to store the individual reports for each section.
  5. Do not set any sections to “Can Shrink”. ActiveReports implementation of “Can Shrink” does not work as expected, and the formatting of your report will be wrong. Instead, create all of your controls of variable height to “Can Grow” and make them as small (height-wise) as possible. Otherwise, any whitespace you leave between controls will be preserved, so be aware that if you leave 2” of space between controls, the report will carry that space over.
  6. “Can Grow” does not grow the size of the control horizontally, only vertically. However, if you set it to “Can Grow” and not to “Multiline = True”, your text will get clipped.
  7. Labels DO NOT GROW to match the amount of data in your control. If you need the control to grow, use a textbox.
  8. Make sure that if you have several controls that need to maintain a consistent look and feel that you verify by hand the size and location of each control. Many controls that you add look the same, but are not the same size. This is not noticeable in the IDE, but will be in the final report.
  9. Sometimes in the IDE you will line up controls and the borders will look like it’s not lined up, but they are. Trust the math that goes into size and location as opposed to the visual look. It will look correct in the report.
  10. Do not rename your reports in the IDE because ActiveReports does not handle this sanely, and it will cause you heartburn.
  11. All controls on the page, except SubReport, have border and background color attributes, and those should be utilized instead of wrapping controls in the shape control, unless absolutely needed. The shape control has no concept of inner controls, and if they should grow beyond the size of the shape, you will need to programmatically change the size of the shape yourself before printing. The shape control is NOT a panel control.
  12. Be aware of the order of events that each report goes through, and what actions should be taken in each one. The three most important events you will deal with are:
    1. DataInitialize – This occurs when the datasource for the report is set. Use this event to create any datafields you may need to use in the report, and to perform any report initialization in general.
    2. DataFetch – This occurs for each record in the datasource, if the datasource is a DataTable or a DataView. The conditions for this event to fire are not clear when the datasource is a DataSet. The documentation states this event is fired each time a new row is processed, but this does not seem to hold true for a DataSet. See below for a tip on how to use this event if your DataSource is a DataSet.
    3. DetailFormat – This event is fired each time the data extracted in the DataFetch event and put into the controls in the Detail section.
  13. There are two ways to create a report: Bound and Unbound. If you create a bound report, you set each of the control’s datafields to the name of a column in your datasource, and use a datatable or dataview as your datasource. If you’re going to be using a DataSet, Array, or other IList implementation for your data, you will want to create an Unbound report. This works in the following fashion:
    1. Add a control to your report. Example: a textbox, and set the datafield to whatever name you want: “LoanName”
    2. In the DataInitialize event handler, add a field to the report that mirrors the name of the Datafield you used in the report.

      Example: Fields.Add(“LoanName”)

    3. In the FetchData event handler, assign values to the fields you’ve created.

      Example: Fields(“LoanName”).Value =Table.Rows(0)(“LoanName”)

October 2003: Monthly Archives

Pages

Powered by Movable Type 4.1

About this Archive

This page is a archive of recent entries in the Active Reports category.

Activism is the next category.

Find recent content on the main index or look in the archives to find all content.