Re: Newbie. Reports & SQL.
From: Glenn Someone (dontspamme_at_whydoyouneedmyaddressspammers.com)
Date: 08/09/04
- Next message: Fons: "Re: TFieldDef.Required exists but TFieldDef.Unique ?"
- Previous message: Fons: "Re: TFieldDef.Required exists but TFieldDef.Unique ?"
- In reply to: Trevor: "Re: Newbie. Reports & SQL."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 09 Aug 2004 11:47:25 -0500
Yes basically what I was saying was that. Define two variables
(consultant_total, grand_total), add your values as you fetch in each
row and then when the consultant changes, display your sub-footer and
zero out the consultant total. Then when you finish pulling in all
your data, display the bottom footer from your total variable. Yes
it's that simple.
The other option really is a bad option, and is bad form for many many
reasons. That involves writing SQL to produce a SUM value for each
consultant, and then producing an SQL to produce a SUM value for the
whole table. One thing about becoming a good programmer is to be able
to figure out many options and select the best option, weeding out
the bad. And this is a bad one, so it's not really worth considering
if you want some advice, since the supporting code mentioned above
will be so much faster/easier all the way around in every way
imaginable.
SQL references. I'm not aware of any good ones on the web, but my
favorite books I've come across are ones by Rick van der Laans and Joe
Celko, since they seem general and focused on the standard and not any
particular product. Related Amazon links are below that should give
you more information. Keep in mind, though, that Access is really
just a glorified file system, and you won't get much out of it SQL
wise. But these should be a good start if you're looking for a book
or two on it.
http://www.amazon.com/exec/obidos/tg/detail/-/0201596180/qid=1092069932/sr=1-1/ref=sr_1_1/002-4860131-4320844?v=glance&s=books
http://www.amazon.com/exec/obidos/tg/detail/-/1558605762/qid=1092069786/sr=1-1/ref=sr_1_1/002-4860131-4320844?v=glance&s=books
On Mon, 9 Aug 2004 20:53:12 +1000, "Trevor" <trevorf@myaccess.com.au>
wrote:
>Hi Again; Thanks for the reply..
>
>So lets see if I understand this, Your saying that in the report I can
>add actual code to sum a field into a temp variable, as it is retrieved,
>and then display that temp variable, on the form in a matching field...?
>If I have this correct then yes that should be relatively simple.. :-)
>Lets just see how hard I can make it..
>
>I'm also interested in your other option, use multiple select statements,
>and output the results that way. The database is small, and is self standing
>on a single machine with only one user, (who by the way has bad eyesight..)
>so speed is not really a huge issue. But still interesting point to be aware of
>in the development stage.
>
>I get the feeling that I need to improve my SQL, do you know any
>good references or web sites.
- Next message: Fons: "Re: TFieldDef.Required exists but TFieldDef.Unique ?"
- Previous message: Fons: "Re: TFieldDef.Required exists but TFieldDef.Unique ?"
- In reply to: Trevor: "Re: Newbie. Reports & SQL."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|