I am developing a genealogy site, http://www.nzgdb.co.nz, and want to be able to produce the standard family tree charts: ancestors, descendents, etc. For example, a descendents chart of Hannah OLD might show her and her husband John BARNES on the top row, with their children
on the next level.
Of course it gets more complicated in a real situation where you might have multiple partners, there may be multiple generations, and you might have to cope with cousin (etc) marriage, etc, but I have dealt with this by developing a T-SQL procedure that calculates the position for each person. Thus, given the key of the OLD, Hannah record I can produce the following in a temporary table: -
Name (dates), Line, Position
OLD, Hannah (1860-1939) 0 0
BARNES, John (1959-1925) 0 2
BARNES, John William (1882-1959) 1 0
BARNES, Hannah Francis(1884-1966) 1 1
BARNES, Harold Victor(1904-1976) 1 2
So far so good, but what do I do with this? I want a way of getting this tabular data into a chart, which might take several pages, and print out this chart.
Is SSRS a possibility? This is a kind of report, so perhaps SSRS is applicable.
I did think that I could read the temporary table at the start of a report, place the boxes in the appropriate positions on an indefinitely-large page , and then have the print command break this page into printable pages the way that Excel will print a large spreadsheet. The boxes could be text boxes or labels, as long as I could place data in them, control the border and background colour, and draw lines between them. Lines could be zero-height or zero-width labels with a border.
However I couldn’t find any event structure in SSRS allowing me to read the records at a “start of report” event, nor create a virtual page and have SSRS break this into A4 pages as it printed the chart. Should I be looking at Crystal Reports, or system drawing/GDI+, or does this need a third party control?
I am currently using Visual Studio 2005 Express, with SQL Server 2005, but I’ll upgrade to Visual Studio 2008 if required.
Thank you, Robert Barnes