Viewer.Print throws exception
I have a strange problem which I do not believe I can reproduce in a small app. I have a collection of similar reports, each of which may contain a subreport which is assigned dynamically. Of these 7 or 8 similar reports, all but one work correctly. The one which fails to work properly throws an exception when Viewer.Print is called.
The exception message is: TppPage.AddDrawCommand: Cannot add more than one draw outline command per page.
I am not doing anything I can identify which should lead to such an exception. What seems very odd to me is that the report is presented correctly in the viewer. If the subreport is not attached, the Print operation succeeds. In other similar reports, the Print succeeds with or without the subreport.
So one question I have is: If the report is apparently well formed in the Viewer, should the Print command not produce a PDF without difficulty?
The exception message is: TppPage.AddDrawCommand: Cannot add more than one draw outline command per page.
I am not doing anything I can identify which should lead to such an exception. What seems very odd to me is that the report is presented correctly in the viewer. If the subreport is not attached, the Print operation succeeds. In other similar reports, the Print succeeds with or without the subreport.
So one question I have is: If the report is apparently well formed in the Viewer, should the Print command not produce a PDF without difficulty?
Comments