Topic: Help for print

Dmitry if I send you my software could you please help me how to fix a button to print a report ?

Thank you in advance

Re: Help for print

Please attach your project and describe the steps to repeat the error.

Dmitry.

3 (edited by v_pozidis 2018-03-28 08:53:29)

Re: Help for print

Except the forum in which e-mail can I send my software ?
I do not want to use the forum.

4 (edited by v_pozidis 2018-03-28 10:21:29)

Re: Help for print

I found the address  support@drive-software.com from an old e-mail so I have send it there.
Running the software you will see step by step from which form I need the print report.
The report should contain all what we see in the form including only two tables (tablegrid1 and tablegrid3)
My zip file is the Print.zip

Re: Help for print

I have sent fixed project.

Dmitry.

6 (edited by v_pozidis 2018-03-28 15:09:02)

Re: Help for print

Thank's
I do not understand how you did it, I must read it and learn it.
But how can I include the rest of the Form in the attached picture ? https://ibb.co/hFipS7 ,
from the software I send you ?

Re: Help for print

Just add these fields to SQL query of button "New print"


try to understand this example
http://myvisualdatabase.com/forum/viewtopic.php?id=1664

Dmitry.

Re: Help for print

I will try. In case I need help I let you know. Thank' s anyway

9 (edited by v_pozidis 2018-03-29 05:54:38)

Re: Help for print

I understand the way it works but somewhere I am confused

Where is the  mistake when I like to add The KatA, KatB, KatC, KatD record in my software I send you.

SQLQuery('SELECT id, id_KatA, id_KatB,id_KatC,id_KatD, strftime(''%d.%m.%Y'', Mera) as "Ypothesi.Mera", Gegonos FROM Ypothesi 

WHERE id = ' + IntToStr(frmCreateYpothesi.bSave.dbGeneralTableId), Ypothesi);

I need the KatA KatB KatC KatD

Re: Help for print

    SQLQuery('SELECT Ypothesi.id, KatA.KatA, KatB.KatB, KatC.KatC, KatD.KatD, strftime(''%d.%m.%Y'', Mera) as "Ypothesi.Mera", Gegonos FROM Ypothesi LEFT OUTER JOIN KatA ON KatA.id=Ypothesi.id_KatA LEFT OUTER JOIN KatB ON KatB.id=Ypothesi.id_KatB LEFT OUTER JOIN KatC ON KatC.id=Ypothesi.id_KatC LEFT OUTER JOIN KatD ON KatD.id=Ypothesi.id_KatD WHERE Ypothesi.id = ' + IntToStr(frmCreateYpothesi.bSave.dbGeneralTableId), Ypothesi);
Dmitry.

11 (edited by v_pozidis 2018-03-30 14:47:33)

Re: Help for print

Before I send my question to you I have used the script you send me but for a reason it didn't work.

Anyway, In my Form there are 4 ComboBoxes (2 LastNames, and 2 SNames  [id_Stoixeia,id_Stoixeia1,id_Stoixeia3,id_Stoixeia4])
, When I use the following script I get only the values from the  first LastNames and SName (id_Stoixeia,idStoixeia1) I cant get The other LastName and SName for the id_Stoixeia3, id_Stoixeia4. Can you please check it ?


    SQLQuery('SELECT Ypothesi.id, Stoixeia.LastName, Stoixeia.SName, KatA.KatA, KatB.KatB, KatC.KatC, KatD.KatD, strftime(''%d.%m.%Y'', Mera) as "Ypothesi.Mera", Gegonos FROM Ypothesi LEFT OUTER JOIN KatA ON KatA.id=Ypothesi.id_KatA LEFT OUTER JOIN KatB ON KatB.id=Ypothesi.id_KatB LEFT OUTER JOIN KatC ON KatC.id=Ypothesi.id_KatC LEFT OUTER JOIN KatD ON KatD.id=Ypothesi.id_KatD LEFT OUTER JOIN Stoixeia ON Stoixeia.id=Ypothesi.id_Stoixeia WHERE Ypothesi.id = ' + IntToStr(frmCreateYpothesi.bSave.dbGeneralTableId), Ypothesi);

Re: Help for print

Check it out

SQLQuery('SELECT Ypothesi.id, Stoixeia.LastName, Stoixeia.SName, S1.LastName, S1.SName, S2.LastName, S2.SName, S3.LastName, S3.SName, S4.LastName, S4.SName, S5.LastName, S5.SName, KatA.KatA, KatB.KatB, KatC.KatC, KatD.KatD, strftime(''%d.%m.%Y'', Mera) as "Ypothesi.Mera", Gegonos FROM Ypothesi'+
    ' LEFT OUTER JOIN KatA ON KatA.id=Ypothesi.id_KatA'+
    ' LEFT OUTER JOIN KatB ON KatB.id=Ypothesi.id_KatB'+
    ' LEFT OUTER JOIN KatC ON KatC.id=Ypothesi.id_KatC'+
    ' LEFT OUTER JOIN KatD ON KatD.id=Ypothesi.id_KatD'+
    ' LEFT OUTER JOIN Stoixeia ON Stoixeia.id=Ypothesi.id_Stoixeia'+
    ' LEFT OUTER JOIN Stoixeia S1 ON S1.id=Ypothesi.id_Stoixeia1'+
    ' LEFT OUTER JOIN Stoixeia S2 ON S2.id=Ypothesi.id_Stoixeia2'+
    ' LEFT OUTER JOIN Stoixeia S3 ON S3.id=Ypothesi.id_Stoixeia3'+
    ' LEFT OUTER JOIN Stoixeia S4 ON S4.id=Ypothesi.id_Stoixeia4'+
    ' LEFT OUTER JOIN Stoixeia S5 ON S5.id=Ypothesi.id_Stoixeia5'+
    ' WHERE Ypothesi.id = ' + IntToStr(frmCreateYpothesi.bSave.dbGeneralTableId), Ypothesi);
Dmitry.

Re: Help for print

I do not have words for the great job.
Thank you for one more time.

14 (edited by v_pozidis 2018-04-04 16:29:38)

Re: Help for print

Dmirty, I resend you my project to help me find out where I am missing something and I can not print .
I have create a report , i Have added the database but what else ????
From the first form press the first button and then from the new form chose any record from the tablegrid. And then press the print button from the other form

You will find my project  in your e-mail (support@drive-software.com) with the name Printing.zip
Please keep in mind to send it back  to my e-mail

Thank you in advance

Re: Help for print

I think that I found my error, but if you be so kind to have also your answer