OK... How to articulate my problem...
Background - I have a database that records hazards. Now a hazard can have a cause, that cause could also have subcauses and each cause or subcause can have a solution. So [FONT="]simplistically[/FONT],
This is all recorded in a set of linked tables, displayed with a tree control (much like the text above) to enable the various levels to be expanded and collapsed. All works fine until I try and report it. Ideally I would have liked to have made a recursive report-subreport, one that calls itself down the tree structure until it gets to the bottom, then rolls back up to the next hazard. However, I haven't found a way to do this. So what I do have is a set of subreports - essentially identical that are called in a nested set of report-subreports. This goes down to 8 nested subreports (access's limit). Each level of the report-subreport is working on the same data, it looks at a field in the table that says if it is a cause or a subcause and displays if that level has data - passed by the master/child relationship.
The report looks fine. I can publish it to pdf and it looks great. However, the problem comes because I actually want the report to be in HTML format - for inclusion in a web enabled package with bookmarks and hyperlinks. The only way I know to do this is to export the report to word, do some post-processing and save as a single page html file from word. Access cannot save reports as single page html files (can it??).
So the problem is in the RTF export of the report. It looses some of the formatting (I can live with the loss of the lines and graphic). However, I get parts of the text repeated, parts in the wrong place, whole lines (fields) inserted into the middle of other fields. This is unacceptable - as it undermines the validity of the whole project!
So, what am I asking? - without giving the code away, its difficult to be specific. So:
Background - I have a database that records hazards. Now a hazard can have a cause, that cause could also have subcauses and each cause or subcause can have a solution. So [FONT="]simplistically[/FONT],
- The floor is wet (hazard) this is caused by
- A leaking pipe (Cause). The leak could be caused by
- poor maintenance (subcause) - solved by
- training the maintainer (solution)
- corrosion (subcause) - solved by
- the use of plastic pipe (solution),
- or damage (subcause) - solved by
- protecting the pipe from accidental impact (solution).
- poor maintenance (subcause) - solved by
- A leaking pipe (Cause). The leak could be caused by
This is all recorded in a set of linked tables, displayed with a tree control (much like the text above) to enable the various levels to be expanded and collapsed. All works fine until I try and report it. Ideally I would have liked to have made a recursive report-subreport, one that calls itself down the tree structure until it gets to the bottom, then rolls back up to the next hazard. However, I haven't found a way to do this. So what I do have is a set of subreports - essentially identical that are called in a nested set of report-subreports. This goes down to 8 nested subreports (access's limit). Each level of the report-subreport is working on the same data, it looks at a field in the table that says if it is a cause or a subcause and displays if that level has data - passed by the master/child relationship.
The report looks fine. I can publish it to pdf and it looks great. However, the problem comes because I actually want the report to be in HTML format - for inclusion in a web enabled package with bookmarks and hyperlinks. The only way I know to do this is to export the report to word, do some post-processing and save as a single page html file from word. Access cannot save reports as single page html files (can it??).
So the problem is in the RTF export of the report. It looses some of the formatting (I can live with the loss of the lines and graphic). However, I get parts of the text repeated, parts in the wrong place, whole lines (fields) inserted into the middle of other fields. This is unacceptable - as it undermines the validity of the whole project!
So, what am I asking? - without giving the code away, its difficult to be specific. So:
- is there a way to export a report in html (as a single file)?
- can I include bookmarks and hyperlinks programmatically into the report?
- is there an issue with exporting rtf if you use lots of subreports?
- is there a way of making a recursive report/subreport?
Last edited: