1

(10 replies, posted in General)

mr Ehwagner,

actually my project wasnt all that complicated.  i think everyone got scared when they saw the words billiards and 8 ball. you could just as well put in the word soccer or just about any other sport. all of the statistics are just basic  math.  you could have said how many times a player handled the ball, how many times he passed it and how many time he made a goal instead of how many rounds he won or lost, or what is total score for the night was.  i did in fact many months ago ask about someone doing the project for me and got no response. about 30 years ago i majored in computer science and the teaching language at that time was pascal.  i loved it then. havent used it at all since and dont remember a bit of it. i was going to do this in visual basic and microsofts database but saw that it was going to take learning sql for most of it. i chose mvd so that i wouldnt have to learn a new language and yet here i am.

2

(10 replies, posted in General)

Dmitry,

this is sample.  i want only the names with the highest acctot to show on the grid

3

(10 replies, posted in General)

hello Dmitry,  Mathias

Dmitry,

as noted before you dont understand my project so to include the whole thing would probably be fruitless. i do include a screen shot of the form i have questions about so you can get an idea of what i am talking about. as you can see, names appear several times down the list.  i want to clean the list up and show only the latest occurrence of a name.

Mathias,

is that a line i would put in the filter area of the tablegrid settings?

thanks for your help
lee

4

(10 replies, posted in General)

i have a tablegrid with several rows of entries. each row consists of a name and several columns of figures. the same name will appear in several rows with different data in the columns. the rows consist of more than one name and data.  how can i show only the latest occurrence of each name and data?

5

(10 replies, posted in General)

#10 and #13 are ascii for line feed and carriage return

lee

6

(5 replies, posted in Script)

you probably want to reset a variable if you repurpose it.  for instance if you let t be the total amount of red and green apples in a basket and then further on let t be the total amount of purple and green grapes in a basket. if you dont set t to 0 before the second basket you get a weird tasting smoothie. ;-)

lee

7

(3 replies, posted in SQL queries)

hi again Mathias

i dont know if this is what you want or not but its what i use and i think thats what its doing.

asset_name := SQLExecute('SELECT IFNULL(MAX(asset.asset_name),0)  FROM asset WHERE asset.id = 30000');

lee

8

(5 replies, posted in Script)

hi Mathias

if you are talking about resetting i, you dont need to if you are going to use it in another 'for' loop. using it in the loop automatically resets it.

lee

9

(1 replies, posted in General)

and then think of a way all of us with below poverty level incomes are going to pay for all of it.

just my two cents

10

(32 replies, posted in General)

the problem turns out to be that 1 divided by anything gives the result of 0.  i am not sure what is causing it. i havent been able to figure out why. it may be a bug, i dont know. maybe Dmitry can figure out that part for you. everything else in the zip file looks to be ok.

11

(32 replies, posted in General)

try changing line 23: futurval := Power((futurval DIV initialval),period) -1;
to read: futurval := Power((futurval DIV initialval),(1 DIV period)) -1;  he was using period and your formula calls for the reciprocal of period

12

(32 replies, posted in General)

i have no idea what the steps are to do what ou are trying to do.  actually i have no idea what you are trying to do.  i have no education in the area you are working in.

13

(32 replies, posted in General)

Hi.
i think it should be OutputFuturevalue := InitalValue * Power((1 + GrowthRate), Periods);

the other way included initalvalue in the power and i dont think that is what he wanted.

lee

14

(32 replies, posted in General)

that will do it a whole lot easier. i was doing it with a for/next loop which apparently neither one of us knows how to code in MVD

thanks
lee

15

(32 replies, posted in General)

not going to be much hepin the coding department. i will try and get you started but you will have to look up the syntax of the for loop. i am assuming the ^ notation is a power like a number squared or cubed etc. anyway that is what the for loop does is take a number to a certain power.

set s = 1+r
set j = 1+r

for p= 1 to x-1
        n = j * s
         j = n
next p

y = a(j)

OutputFutureValue := InitialValue * (1 + GrowthRate) ^ Periods;


//CALCULATIONS
procedure Form1_Button3_OnClick (Sender: string; var Cancel: boolean);
var    //---> First declare your variables (pay attention to the type, integers take no decimals, real can have decimals and so on ...)

    //INPUT VARIABLES
    InitialValue : Currency;
    Periods, GrowthRate,s, j, n, p : Real;

    //OUTPUT VARIABLES
    OutputFutureValue : Currency;


begin
    //---> Second, assign the variables you have declared to your edit fields
    //Input Variables
    InitialValue := Form1.EdInitialValue.Value;
    Periods := Form1.EdPeriods.Value;
    GrowthRate := Form1.EdGrowthRate.Value;


    if (Trim(Form1.EdInitialValue.Text) = '') OR  (Trim(Form1.EdPeriods.Text) = '') OR  (Trim(Form1.EdGrowthRate.Text) = '') then //if any of the field is empty
        begin
            Cancel := True; //Stop the operation
            ShowMessage('All fields marked with an asterisk (*) are required. Calculation can only be performed when all required fields are filled.'); //display the warning
        end

    else //None of the fields are empty, let's continue
        begin

            //---> Third, perform your calculations
                        s := 1 + GrowthRate;
                        j := 1 + GrowthRate;
                        for p := 1 to (periods - 1)
                                  n := j * s
                                   j := n
                         next p;
                         OutputFutureValue := InitialValue * j;
//like i said, i am not sure of the coding and i am assuming ^ is a power symbol. i dont recal having run ito it before so i am not sure. hope this was of some help

lee
                        OutputFutureValue := InitialValue * (1 + GrowthRate) ^ Periods;
                        Form1.EdOutputFutureValue.Value := OutputFutureValue;

16

(32 replies, posted in General)

I can tell you how to imlement the formula but you will have to go thru the steps. the formula is y=a(1+r)^x

declare your variables.

set s = 1+r
set j = 1+r

for p= 1 to x-1
        n = j * s
         j = n
next p

y = a(n)

i think this will work for you

lee

17

(9 replies, posted in SQL queries)

i have a table venue. i use this command>;
sqlexecute('insert into venue values ("'+8 Ball+'")');
i get an error ) expected at 5:47
where am i going wrong?

lee

18

(9 replies, posted in SQL queries)

hello Mathias

that was a big help. nowhere did i see or read anything that indicated i needed to use a variable in the statement. as for the update. an example  would be a person with a numeric handicap in one table and is continually recalculated in a form. i have thought of calculated fields but then i run into problems when i do reports and think the update is the easiest solution

19

(9 replies, posted in SQL queries)

i need working sample sqlexecute update and sqlexecute insert statements using plain text, a text box and a combobox. every time i try to use one of these statements i always get a missing ) or a missing ; message and i dont seem to be able to find the problem. thanks

lee

20

(13 replies, posted in Reports)

hello ehwagner

i am not sure which version you were looking at but i think it may have been an older one. in one of my posts just before my last one i enclosed a totally new schema the way i thought it should be from what i could get from the various instructional videos. i have just added more to it and attach it with this. i will try to explain it as i think i have learned.:
there are 2 venues and each can have many leagues. each league can have only one venue so a one to many relationship there. each league can have many seasons and each season one league. another one to many relationship. each season can have many teams and team can  play on many seasons. a many to many relationship which requires another entity in between (weeks). each team can play many matches and a match can be played by many teams. another many to many relationship requiring an entity in between.( team statistics). a team can have many team mates but a team mate can only be on one team. a one to many relationship. a team mate can have many players and a player only be one team mate. a one to many relationship.

Derek seems to understand my project fairly well and has been a tremendous amount of help and i am very grateful for that. he has his own thing he has to take care of and is unable to devote much time also. he does help when he can though.

i want to thank you also for taking the time to help me. it has been a very frustrating journey so far.

lee

21

(13 replies, posted in Reports)

hello again Dmitry

my project in its basic form is not all that complicate and would apply to almost any sport. almost every sport has a national organization running it. under it are the various areas represented (my leagues). each area represented has its teams that play and the members that play on the team. there are reports of all the team members, the team statistics and player statistics. my project in a nutshell manages everything from the area to the reports. i submitted my erd the way i thought it should be. if that met with your approval i could get on with my project and my  questions could be more specific to a particular problem i am having at the time.

thank you again for your help for me and the others

lee

22

(13 replies, posted in Reports)

hello Dmtry

please answer this so i can fix it and go on with the project. i really dont want to have to trash this after spending so much time on it.

lhimes wrote:

good morning Dmitry

i am confused.  in a previous post on this subject you wrote "But I noticed that your database structure have many mistakes, thus I can't write for you correctly SQL queries.". i am trying to fix the problem not knowing what it is. i dont seem to be able to find out what exactly it is i am trying to fix. what was it that you noticed were the many mistakes?

23

(13 replies, posted in Reports)

can i get a answer to my last post

24

(13 replies, posted in Reports)

good morning Dmitry

i am confused.  in a previous post on this subject you wrote "But I noticed that your database structure have many mistakes, thus I can't write for you correctly SQL queries.". i am trying to fix the problem not knowing what it is. i dont seem to be able to find out what exactly it is i am trying to fix. what was it that you noticed were the many mistakes?

25

(13 replies, posted in Reports)

hello dmitry

previously you told me there were several structural mistakes in my database. i asked what they were. i restructured my db and am asking if this structure is without mistakes.

lee