multiple tables in report

Ok, I have generated a part of my report, and have some questions…

First,I have the normal sections, header, body, footer. The body section groups by the date of the data.

Ok, now, I have to put some data in the header area from a second table, In addition, in the footer I need to put a field from the data in the body.

How can I add a second table to the report, and print the one field in the footer?

You can do it two ways.

  1. Use the SQL JOIN statement to join two or more tables into a single recordset.
  2. In the beforeprint event of a field look up the data you want and use me.text = to assign the data to the string.

Ok, that helps… Is there a way to add a section to the report? I have section called a group header, is there a way to add a group footer?


If you have a group header you’ll also have a group footer, they’re added together although you can shrink either one to 0 height. And there doesn’t appear to be any way to select it after you’ve made it 0 height so you can’t expand it again.

If you simply want to display some information in the header or in the foot that is already available in the calling window, you could do something like the following in the beforePrinting event handler of a report field you add:

if the calling window is window1 and the company name is on that window in a filed called companyName…

add a report field called company to the footer. In the beforePrinting event handler for the field called “company” add the following code

company.text = window1.companyName.text

If you needed to load multiple fields, you could probably call a function to load a recordset and display the fields using this event

I think I will give it a go…:slight_smile:

It works!
in the beforePrinting event handler for, say, the reportLabel that heads the report, one can place a method call. In that method, a recordset can be instantiated, provided that the calling window has access to the unique ID of the the table from which one wants to build a recordset. Then, using the recordset, one can change reportable text, or reportField text. One caveat - this doesn’t work if the report field has a DataField with information contained in it.