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
Missing ouput table fields
Moderators: Moderators, Tech Support
-
- Program Development
- Posts: 1225
- Joined: Fri Sep 05, 2003 11:43 am
- Location: PowerChurch Software
- Contact:
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.
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,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.
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
-
- Program Development
- Posts: 1225
- Joined: Fri Sep 05, 2003 11:43 am
- Location: PowerChurch Software
- Contact:
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.
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.