Topic: Stuck again

Hi Dmitry,


I was trying to put together something with scripts you have provided kindly. However, I stuck again. I think I'm getting relational linking wrong but I may be totally wrong. I have highlighted the issues on the project form1/customers tab.


Please see the attached sample project.


ps/. Sorry for the topic subject. I couldn't think of proper one.

Post's attachments

Attachment icon Tables Fields and Relations.zip 51.21 kb, 353 downloads since 2016-11-14 

Adam
God... please help me become the person my dog thinks I am.

Re: Stuck again

Fixed.

Post's attachments

Attachment icon Tables Fields and Relations _fixed.zip 50.68 kb, 373 downloads since 2016-11-15 

Dmitry.

Re: Stuck again

Thank you VERY much Dmitry............

Adam
God... please help me become the person my dog thinks I am.

4 (edited by AD1408 2016-11-17 16:50:48)

Re: Stuck again

Hi Dmitry,


Sorry to bother you again. I wanted apply same pulling data as in customers tab tgCust_InvInfo on products tab but failed.


I have highlighted the issues on the project form1/customers tab.


Please see the attached sample project.


-----------------------------
edit:
Please ignore formating tGrid column numbers note on the sample project note above "tgCust_InvInfo" I've done it thanks to your script.
Just displaying customers that purchased selected products issue on Products tab.


edit2:
I thought I got  "tgCust_InvInfo" grid column values formatting right but it seems not. I used the following script:

//Formatting FORM1 tgCust_InvInfo columns and footer
procedure Form1_tgCust_InvInfo_OnChange (Sender: string);
var
    i,c: integer;
begin
    Form1.tgCust_InvInfo.BeginUpdate;

    c := Form1.tgCust_InvInfo.RowCount - 1;
    for i := 0 to c do
    begin
        Form1.tgCust_InvInfo.Cells[6, i] := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Cell[6, i].AsFloat);
        Form1.tgCust_InvInfo.Cells[7, i] := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Cell[7, i].AsFloat);
        Form1.tgCust_InvInfo.Cells[9, i] := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Cell[9, i].AsFloat);
        Form1.tgCust_InvInfo.Cells[10, i] := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Cell[10, i].AsFloat);
    end;

    Form1.tgCust_InvInfo.Columns[9].Footer.Caption := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Columns[9].Footer.FormulaValue);
    Form1.tgCust_InvInfo.Columns[10].Footer.Caption := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Columns[10].Footer.FormulaValue);

    Form1.tgCust_InvInfo.EndUpdate;
end;

Numbers are formatted OK but when clicking on add inv item button on inv header I get the following error:
" is not a valid floating point value.

Post's attachments

Attachment icon Tables Fields and Relations2.zip 393.42 kb, 368 downloads since 2016-11-17 

Adam
God... please help me become the person my dog thinks I am.

Re: Stuck again

AD1408
I just can't run your project, to many mistakes. I think you have errors in the calculated fields.
Also you have wrong database structure, too many relationships between tables.

Dmitry.