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?

Comments

  • Sorry, that should have been Viewer.Report.Print in my post.
  • Environment is Delphi 2007, with ReportBuilder 12.04 build 77. And after hours of exploration and experimentation, I find that changing the report to landscape averts the problem. But I have also found another report in the group which is already in landscape, and errors out as this one did. And unfortunately, it is not up to me whether the report should be portrait -- for which it was clearly designed -- or landscape.
Sign In or Register to comment.