Jump to content
TNG Community
Appelmus

Change of column titles in a report

Recommended Posts

Appelmus

Hello! 

Where can I change the column headings, e.g. parents _ age to Eltern-Alter?

Screenshot_2019_06_03_18_54_33.jpg

Share this post


Link to post
Share on other sites
Appelmus

Does no one know anything? 🙁

Share this post


Link to post
Share on other sites
theKiwi

If you post the code of the query/report then someone might be better able to help you.

Roger

Share this post


Link to post
Share on other sites
Appelmus

Ok

SELECT YEAR(p.birthdatetr)-YEAR(father.birthdatetr) AS parents_age, COUNT(*) AS Number_, RPAD(' ',COUNT(*)/20,'M') AS Graph FROM tng_children AS ch LEFT JOIN tng_people AS p ON (ch.personID=p.personID AND ch.gedcom=p.gedcom) LEFT JOIN tng_families AS f ON (ch.familyID=f.familyID AND ch.gedcom=f.gedcom) LEFT JOIN tng_people AS father ON (father.personID=f.husband AND father.gedcom=f.gedcom) WHERE p.birthdatetr<>"0000-00-00" AND father.birthdatetr<>"0000-00-00" AND YEAR(p.birthdatetr)-YEAR(father.birthdatetr)>15 AND YEAR(p.birthdatetr)-YEAR(father.birthdatetr)<60 GROUP BY parents_age UNION SELECT YEAR(p.birthdatetr)-YEAR(mother.birthdatetr) AS parents_age, COUNT(*) AS Number_, RPAD(' ',COUNT(*)/20,'F') AS Graph FROM tng_children AS ch LEFT JOIN tng_people AS p ON (ch.personID=p.personID AND ch.gedcom=p.gedcom) LEFT JOIN tng_families AS f ON (ch.familyID=f.familyID AND ch.gedcom=f.gedcom) LEFT JOIN tng_people AS mother ON (mother.personID=f.wife AND mother.gedcom=f.gedcom) WHERE p.birthdatetr<>"0000-00-00" AND mother.birthdatetr<>"0000-00-00" AND YEAR(p.birthdatetr)-YEAR(mother.birthdatetr)>15 AND YEAR(p.birthdatetr)-YEAR(mother.birthdatetr)<60 GROUP BY parents_age ORDER BY parents_age

 

I have replaced „parents _ age“ with „Eltern_Alter“ in all places. However, the query then stopped working.

 

Share this post


Link to post
Share on other sites
theKiwi

That works for me, even when I change the 5 instances of parents_age to Eltern_Alter - are you sure you changed ALL instances of parents_age?

Roger

Share this post


Link to post
Share on other sites
Appelmus

Hello Roger, thank you for your support.  I changed the expressions parents_age in succession and not in total  and that did not work.

Best regards

Bernd

Share this post


Link to post
Share on other sites
Brett

I edited the report as supplied. No problem running as Roger said.

SELECT YEAR(p.birthdatetr)-YEAR(father.birthdatetr) AS Eltern_Alter, COUNT(*) AS Number_, RPAD(' ',COUNT(*)/20,'M') AS Graph FROM tng_children AS ch LEFT JOIN tng_people AS p ON (ch.personID=p.personID AND ch.gedcom=p.gedcom) LEFT JOIN tng_families AS f ON (ch.familyID=f.familyID AND ch.gedcom=f.gedcom) LEFT JOIN tng_people AS father ON (father.personID=f.husband AND father.gedcom=f.gedcom) WHERE p.birthdatetr<>"0000-00-00" AND father.birthdatetr<>"0000-00-00" AND YEAR(p.birthdatetr)-YEAR(father.birthdatetr)>15 AND YEAR(p.birthdatetr)-YEAR(father.birthdatetr)<60 GROUP BY Eltern_Alter UNION SELECT YEAR(p.birthdatetr)-YEAR(mother.birthdatetr) AS Eltern_Alter, COUNT(*) AS Number_, RPAD(' ',COUNT(*)/20,'F') AS Graph FROM tng_children AS ch LEFT JOIN tng_people AS p ON (ch.personID=p.personID AND ch.gedcom=p.gedcom) LEFT JOIN tng_families AS f ON (ch.familyID=f.familyID AND ch.gedcom=f.gedcom) LEFT JOIN tng_people AS mother ON (mother.personID=f.wife AND mother.gedcom=f.gedcom) WHERE p.birthdatetr<>"0000-00-00" AND mother.birthdatetr<>"0000-00-00" AND YEAR(p.birthdatetr)-YEAR(mother.birthdatetr)>15 AND YEAR(p.birthdatetr)-YEAR(mother.birthdatetr)<60 GROUP BY Eltern_Alter ORDER BY Eltern_Alter

Share this post


Link to post
Share on other sites
Appelmus

Thank you, Brett🙂

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×