My plan

Posted by RussCAp12602 on May 08, 2008

After exploring a number of available components, including looking at Rave Reports, I have decided on the following plan of attack to handle my output pagination requirements.

I will produce my report for viewing in the RichEdit window. By clicking on a "Print" button, I will set a "Printing" boolean variable to True and regenerate the report within the RE, this time including appropriate pagination. I will place heading lines in the appropriate spots, with a Form Feed character in the first column.

Once the entire report has been thus set up, I will do a rexxxx.StreamOut() call to write the RTF data to a memory stream.

I will then read the above memory stream and write the data to another memory stream. Each input line will be scanned for the presence of the FF character. WHen found, the FF will be removed, and the RTF line "\par \page" placed in the outgoing memory stream, followed by the line that contained the FF.

Next, the new memory stream will be loaded back into the RE control, and the actual print performed.

Then the Printing flag will be cleared and the online report will be recreated.

Now, if there is a simpler way I'd dearly like to know what it might be. I know it seems like a lot of fooling about to accomplish what should be a very simple process. Unfortunately the RE controls that I have investigated do not offer any output pagination control that I am aware of. I know the RE keeps separate track of the RTF data and text data, but I don't have a clue as to how to cause a "\par \page" line to be placed in the RTF stream within the RE itself. That would make the project so simple!

I do not understand the reluctance to give the user control over these ordinarily simple processes.

Related articles

       

Follow Ups