Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Changing bound-to type of derived columns (Read 2339 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Changing bound-to type of derived columns
Reply #15 - Apr 4th, 2007 at 6:27pm
Print Post Print Post  
Found out what was going wrong with Running_Total.  I had both "Running_Total" and "COLUMN Running_Total" programmed.  I took out the programming in "COLUMN Running_Total" and the doubling stopped.

Thanks for all your help, Ray.
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Changing bound-to type of derived columns
Reply #16 - Apr 4th, 2007 at 6:30pm
Print Post Print Post  
Infinity wrote on Apr 4th, 2007 at 5:58pm:
What finally fixed it, and got me a successful retrieve, was spelling out the complete path to MonthTotals.db (Sesame didn't like the relative at all, even though my main app and MonthTotals.db are in the same directory).


The relative path needs to be from the CWD of the Sesame Executable so if the CWD of Sesame is C:\Sesame then the relative path would be Miara\MonthTotals.db. The only change I can recommend to that code is to wrap the @XLookup in an @ToNumber() or @ToMoney() that way Sesame is not guessing on how to do the conversion. I forgot it in my code example, sorry about that, too many things at once.

Quote:
I'm still doubling the value of the first invoice in my Running_Total column; setting Running_Total = 0 in Global code did not change this.


Hmm. How many events do you have the programming in that adds the value of the invoice to the Running_Total? I'm wondering if perhaps on an element in the group or view header as well as in an element in the group body(which is where it should be)

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Changing bound-to type of derived columns
Reply #17 - Apr 4th, 2007 at 6:50pm
Print Post Print Post  
Quote:
The relative path needs to be from the CWD of the Sesame Executable so if the CWD of Sesame is C:\Sesame then the relative path would be Miara\MonthTotals.db.

The exe is in C:\Sesame\Program, so I'm not sure how to navigate from there.  But it's not important, because eventually the db will be on the server, and I'm sure that will change everything.  For now it's no trouble to point straight at it, the lookup is working well, thanks again for your guidance.
Quote:
The only change I can recommend to that code is to wrap the @XLookup in an @ToNumber() or @ToMoney() that way Sesame is not guessing on how to do the conversion. I forgot it in my code example, sorry about that, too many things at once.

I have now done that, @ToMoney, and thanks for the suggestion.  I'm going to post a note above my monitor to remind me to specify these things in the future so I don't have to make Sesame do more work than is needed.  Or you, for that matter.  Take a break, you've earned your pay today, the coffee and doughnuts are on me!
Quote:
Hmm. How many events do you have the programming in that adds the value of the invoice to the Running_Total? I'm wondering if perhaps on an element in the group or view header as well as in an element in the group body(which is where it should be)

You guessed it!  (Or did you peek?) I'm still unfamiliar with programming reports so I wasn't aware of the  "doubling" of header names and elements and didn't scroll far enough down when choosing the element to program, so I was fighting with the Q&A programming that was already there.  These Q&A reports are a pain in the ass, probably easier to start from scratch than try to redesign them all.

Thanks again, Ray, I can't say thanks enough!
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Changing bound-to type of derived columns
Reply #18 - Apr 4th, 2007 at 7:02pm
Print Post Print Post  
Infinity wrote on Apr 4th, 2007 at 6:50pm:
I have now done that, @ToMoney, and thanks for the suggestion.  I'm going to post a note above my monitor to remind me to specify these things in the future so I don't have to make Sesame do more work than is needed.

It's not that Sesame would have to do more work, it's just best to not make Sesame or computers in general guess at what you want them to do.

Quote:
Take a break, you've earned your pay today, the coffee and doughnuts are on me!

Thanks Scott but I got a bit too much work to do right now to take a break.

Quote:
You guessed it!  (Or did you peek?)

Nah I didn't peek, I just guessed it.

Quote:
Thanks again, Ray, I can't say thanks enough!

You are welcome.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Changing bound-to type of derived columns
Reply #19 - Apr 5th, 2007 at 7:18pm
Print Post Print Post  
I also want to give another shout out to Bob for this:
Quote:
I frequently have a one record database for Company where I can store various values for lookups, comparisons, etc.  It includes the normal address/fax/web site info, Fed and State Tax ID, and any other fields that might be somewhat constant and used in reports, headers, etc..  In yours case, could include fields for Billings: MTD, YTD, Last Month.  These would all be updated at the end of each month, but be available to include in reports, analysis, etc. during the month.

Great idea Bob, it's working beautifully, thanks so much.
  

**
Captain Infinity
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Changing bound-to type of derived columns
Reply #20 - Apr 6th, 2007 at 2:07am
Print Post Print Post  
Glad it was useful.

So you can show us how you are using this at our SANE meeting in May?
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Changing bound-to type of derived columns
Reply #21 - Apr 6th, 2007 at 11:10am
Print Post Print Post  
If I can, I will.  Depends on NDA restrictions.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Changing bound-to type of derived columns
Reply #22 - Apr 6th, 2007 at 12:27pm
Print Post Print Post  
Infinity wrote on Apr 4th, 2007 at 6:50pm:
The exe is in C:\Sesame\Program, so I'm not sure how to navigate from there. 


Scott,

It doesn't matter where the exe is. It matters where your current working directory is. This is the the directory in the Start In property of your shortcut.. If you are running from command line, it is the current directory shown by the command line.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print