Fixed report bugs

svn: r1066
This commit is contained in:
Don Allingham 2002-07-02 19:36:03 +00:00
parent 5c9100a9d3
commit a22394fbda
4 changed files with 9 additions and 8 deletions

View File

@ -116,7 +116,7 @@ class DescendantReport:
#
#------------------------------------------------------------------------
class DescendantReportDialog(TextReportDialog):
def __init__(self,person,database):
def __init__(self,database,person):
TextReportDialog.__init__(self,database,person)
#------------------------------------------------------------------------

View File

@ -168,7 +168,7 @@ class DetAncestorReport(Report):
self.doc.write_text(_("- %s Born: %s Died: %s") % \
(name, birth.getPlaceName(), death.getDate())) # 6
elif death.getPlaceName() != "":
self.doc.write_text(_("- %s Born: %s %s Died: %s") % \
self.doc.write_text(_("- %s Born: %s Died: %s") % \
(name, birth.getPlaceName(), death.getPlaceName())) # 5
else: self.doc.write_text(_("- %s Born: %s") % \
(name, birth.getPlaceName())) # 4

View File

@ -644,7 +644,8 @@ class DetDescendantReport(Report):
generation = 0
need_header = 1
for generation in xrange(self.max_generations):
# for generation in xrange(self.max_generations):
for generation in xrange(len(self.genKeys)):
if self.pgbrk and generation > 0:
self.doc.page_break()
self.doc.start_paragraph("Generation")
@ -655,7 +656,6 @@ class DetDescendantReport(Report):
self.prevGenIDs= self.genIDs.copy()
self.genIDs.clear()
for key in self.genKeys[generation]:
person = self.map[key]
self.genIDs[person.getId()]= key
@ -799,7 +799,7 @@ class DetDescendantReportDialog(TextReportDialog):
ReportDialog.parse_report_options_frame(self)
# get values from the widgets
if self.use_link.get_active():
if self.first_name_option.get_active():
self.firstName = reportOptions.Yes
else:
self.firstName = reportOptions.No

View File

@ -234,9 +234,10 @@ class IndividualPage:
object = photo_list[0].getReference()
if object.getMimeType()[0:5] == "image":
file = object.getPath()
self.doc.start_paragraph("Data")
self.doc.add_photo(file,"row",4.0,4.0)
self.doc.end_paragraph()
if os.path.isfile(file):
self.doc.start_paragraph("Data")
self.doc.add_photo(file,"row",4.0,4.0)
self.doc.end_paragraph()
# Start the first table, which consists of basic information, including
# name, gender, and parents