Missing ouput table fields

Moderators: Moderators, Tech Support

Post Reply
Tolleh
Posts: 5
Joined: Tue Feb 08, 2005 2:42 pm
Location: Zion Ev. Lutheran Church, South Milaukee

Missing ouput table fields

Post by Tolleh »

I'm building a report that displays calculated fields. Everything is fine until I close the report and try to reopen it. I'm getting a big yellow message box which displays the following message:

The report form last used with this Query contains more fields than exist in the output table.

The missing output table fields that are listed in the accompanying list box are the fields that use variables (these variables are user defined).

Is there a bug or do I need to do something special with these fields?

Thanks in advance,
Dan

Jeff
Program Development
Program Development
Posts: 1225
Joined: Fri Sep 05, 2003 11:43 am
Location: PowerChurch Software
Contact:

Post by Jeff »

Your calculated fields are you doing them with variables? If you are you must name the variables with a "m." prefix and when you use the field on the report use the "m." prefix as well.

For example if you have a variable called counter, in the variables window give it the name m.counter and then when adding that field to the report use m.counter as the expression as well.

Tolleh
Posts: 5
Joined: Tue Feb 08, 2005 2:42 pm
Location: Zion Ev. Lutheran Church, South Milaukee

Post by Tolleh »

Jeff wrote:Your calculated fields are you doing them with variables? If you are you must name the variables with a "m." prefix and when you use the field on the report use the "m." prefix as well.

For example if you have a variable called counter, in the variables window give it the name m.counter and then when adding that field to the report use m.counter as the expression as well.
Thanks Jeff,

I didn't know about the prefix! The documentation is kind of light in this area:

Is there a way to open the report for editing without running the query and then resetting the form?

Is there someplace to find the "value" of the system variables?

Can the value of a variable created in one report be held and used in another report?

Dan

Jeff
Program Development
Program Development
Posts: 1225
Joined: Fri Sep 05, 2003 11:43 am
Location: PowerChurch Software
Contact:

Post by Jeff »

Variables are a fairly advanced topic, you will find a note about including the "m." prefix on page 377 of the version 9 manual. What the program is doing is making sure that all the fields included in your report are still part of your output fields from your query. The "m." prefix is an old xbase convention that specifies this is a memory variable rather than a field name. When the program see the "m." prefix it skips trying to validate that value and assumes it is defined inside of the report.

You could try this, from the database manger you type "modify report ? <Enter>" navigate to the rpt_cust folder and select the layout file. The file names are generated off of an internal primary key so it might be a little difficult to figure out which exact file is your layout if you have lot of custom reports.

We don't really document the value of system variables as most would not be useful in the custom reports.

Variables are scoped to the report itself, so when the report exits all of its variables are destroyed as well.

Tolleh
Posts: 5
Joined: Tue Feb 08, 2005 2:42 pm
Location: Zion Ev. Lutheran Church, South Milaukee

Post by Tolleh »

Thanks Jeff,

The info was useful and the database manager solution worked great.

Thanks again,
Dan

Post Reply