If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > how to use a form's calculated field in a report

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-10-04, 05:39
fepsy fepsy is offline
Registered User
 
Join Date: Jan 2004
Location: amsterdam
Posts: 31
how to use a form's calculated field in a report

Is it possible to use a calculated field that is made in a form into a report other than to recalculate it in the report? The calculated field does not have a name although it has a field number.
Reply With Quote
  #2 (permalink)  
Old 03-11-04, 19:23
Yuri Korin Yuri Korin is offline
Registered User
 
Join Date: Feb 2004
Location: Gold Coast, Queensland, Australia
Posts: 15
Red face Re: how to use a form's calculated field in a report

Originally posted by fepsy
Is it possible to use a calculated field that is made in a form into a report other than to recalculate it in the report? The calculated field does not have a name although it has a field number.

There is only one way that I know of and that is to store your field in a work table and then reference that table in your report.
__________________
YuriK
Reply With Quote
  #3 (permalink)  
Old 03-16-04, 06:15
fepsy fepsy is offline
Registered User
 
Join Date: Jan 2004
Location: amsterdam
Posts: 31
A work table? I don't know that concept, can't find it in the guides. Can you please explain. My solution for now is to add fields in the form and calculate the content in ObjectPal. Then the field is available in the report.
Reply With Quote
  #4 (permalink)  
Old 03-22-04, 21:48
Yuri Korin Yuri Korin is offline
Registered User
 
Join Date: Feb 2004
Location: Gold Coast, Queensland, Australia
Posts: 15
Talking

Originally posted by fepsy
A work table? I don't know that concept, can't find it in the guides. Can you please explain. My solution for now is to add fields in the form and calculate the content in ObjectPal. Then the field is available in the report.

Sorry, I've been off the air for a while and haven't had the time to even get a reply posted.
The concept of a work table is simply an application implementation. The idea is that you create a table that probably only ever has one record in it. It is best to put it into your private directory. The record can consist of any number of fields that are relevant to your needs e.g. if you need to pass an amount from a form to a report, you would define one of the fields with those characteristics. You then populate the value of the field in the form, call your report and hey presto, the value that you are passing is in the first record of the work table. The general assumption with this concept is that the contents of the field are only meant for a short life span i.e. it simply "transports" the value from one object to another where there is no other apparent "transport" available. I hope this helps you.

Cheers.
__________________
YuriK
Reply With Quote
  #5 (permalink)  
Old 03-23-04, 09:21
lmckelvy lmckelvy is offline
Registered User
 
Join Date: Oct 2003
Posts: 107
> Is it possible to use a calculated field that is made in a form into a
> report other than to recalculate it in the report? The calculated field
> does not have a name although it has a field number.

In reading this thread, I think that the solution you want may lie in adding a new field to the table your report is based on, then running some objectPAL against it before calling the report. That way the data is calculated before the report is run and you simply display the field in the report.

pseudocode:

open table
start scan loop
field.value = My Calculation Equation
end scan loop
call report
Reply With Quote
  #6 (permalink)  
Old 03-23-04, 09:36
fepsy fepsy is offline
Registered User
 
Join Date: Jan 2004
Location: amsterdam
Posts: 31
Quote:
Originally posted by lmckelvy
> Is it possible to use a calculated field that is made in a form into a
> report other than to recalculate it in the report? The calculated field
> does not have a name although it has a field number.

In reading this thread, I think that the solution you want may lie in adding a new field to the table your report is based on, then running some objectPAL against it before calling the report. That way the data is calculated before the report is run and you simply display the field in the report.

pseudocode:

open table
start scan loop
field.value = My Calculation Equation
end scan loop
call report

All good solutions! Thank you for your help.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On