Numeric is stores as a text internally, so it will be slower than
double. If you are working specifically with two decimals, you can
convert to currency and back to round, or use the BRND() or ROUND()
functions. Don't leave the value with more decimal places than you need.
I have worked with a database that had this done, and the additions did
not work properly because of the trailing digits.
Albert
Jim Belisle wrote:
On this one report I am updating, I use a lot of Double type for the
calculations. Would it be better to use Numeric and would using double
slow it down?
Jim
------------------------------------------------------------------------
*From:* [email protected] [mailto:[EMAIL PROTECTED] *On Behalf Of
*jan johansen
*Sent:* Friday, November 07, 2008 11:38 AM
*To:* RBASE-L Mailing List
*Subject:* [RBASE-L] - Re: report
Jim,
If you are running it from there then that is the only place to put
your code.
Jan
-----Original Message-----
From: "Jim Belisle" <[EMAIL PROTECTED]>
To: [email protected] (RBASE-L Mailing List)
Date: Fri, 7 Nov 2008 11:26:00 -0600
Subject: [RBASE-L] - Re: report
Jan,
I am not running this in an application but just from the reports
screen so my question is where exactly would I place the code if
not in the report itself?
Jim
------------------------------------------------------------------------
*From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of
*jan johansen
*Sent:* Friday, November 07, 2008 11:20 AM
*To:* RBASE-L Mailing List
*Subject:* [RBASE-L] - Re: report
Jim,
I don't want to tell you that you are barking up the wrong tree
because there are many ways to do things.
However I don't think that the OnBeforeGenerate is appropriate here.
If you create the report based on the temporary view then you can
take the code and place it just before calling the report i.e.
SET ERROR MESSAGE 677 OFF
DROP VIEW speedywork
SET VAR vspdy text
FILLIN vspdy USING 'Speedy trailer number we are processing.'
CREATE TEMPORARY VIEW speedywork (procnum, procdesc, tottime) AS
SELECT +
procnum, procdesc, SUM(timeout-timein)/100 FROM workinfo WHERE +
procnum = 'spdy-82' AND procdesc CONTAINS .vspdy GROUP BY procnum,
procdesc
SET ERROR MESSAGE 677 ON
PRINT myreport OPTION SCREEN
This way the report only generates what your selection was on.
-----Original Message-----
From: "Jim Belisle" <[EMAIL PROTECTED]>
To: [email protected] (RBASE-L Mailing List)
Date: Fri, 7 Nov 2008 10:44:39 -0600
Subject: [RBASE-L] - Re: report
So far this is the code I have in an ‘on before generate’ EEP
for the report.
SET ERROR MESSAGE 677 OFF
DROP VIEW speedywork
SET VAR vspdy text
FILLIN vspdy USING 'Speedy trailer number we are processing.'
CREATE TEMPORARY VIEW speedywork (procnum, procdesc, tottime)
AS SELECT +
procnum, procdesc, SUM(timeout-timein)/100 FROM workinfo WHERE +
procnum = 'spdy-82' AND procdesc CONTAINS .vspdy GROUP BY
procnum, procdesc
SET ERROR MESSAGE 677 ON
Since this is the first time (for me) creating a report that
uses information received ‘on the fly’ so to speak, How do I
get the report to use this information? If I am on the wrong
tract, please let me know.
Jim
------------------------------------------------------------------------
*From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On
Behalf Of *jan johansen
*Sent:* Friday, November 07, 2008 10:25 AM
*To:* RBASE-L Mailing List
*Subject:* [RBASE-L] - Re: report
Jim,
I forget. What version are you in?
Jan
-----Original Message-----
From: "Jim Belisle" <[EMAIL PROTECTED]>
To: [email protected] (RBASE-L Mailing List)
Date: Fri, 7 Nov 2008 10:09:42 -0600
Subject: [RBASE-L] - report
Now that I have this temporary view working, below is how
I want to use it.
I have a report based on a view that gives me all the
costs associated with the products the company makes. This
works fine for most of our products.
On our larger products however, I need to insert the labor
into the report by adding the total hours to assemble a
specific model. Each model is different based on the “add
ons” the customer wants so the labor to assembly that
model is “job specific”.
So what I want is to keep the existing report structure
that gives me the material and labor for the parts
associated with this model and then at the end go to the
WORKINFO table and insert the hours for the assembly of
that model.
Would the best approach be to create a temporary table or
view to insert the specific info into? (That is what I
just did with the view you folks helped me with) If that
is the case then I would need to know how best to put that
into the report. I assume I would need to create an EEP
within the report for this task. I have never run reports
off temporary tables though I have created temporary
tables & views within a command file.
Jim