Completely build report manually?

I'm trying to find out if there is a way to COMPLETELY build the report manually from the ground up. For instance, I want to do this in Delphi code (not script):

while something do
begin
newpage 1
//fill out page manually

if toobig then newpage1

end;

In other words, I want to control the page creation instead of band creation. I then need to have a handle to the page to assign all the fields manually. There are too many fields to do this with a dataset and I don't know how many pages the report is going to be until I'm creating it... I've looked at OnManualBuild but it fires after the page has been created... Any ideas? Thank in advance!

Ryan

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:28PM
    Ryan you do not build the output of the report you build the design page of the report,
    the report engine then process the design page and creates the output pages as needed.
    a design page is not limited to the height of the physical outputpage, you can set it to larger by setting the page options property large height in design mode.
    The on manual build event allows you to control how the output of the design is formed.
    Read the programmers manual chapter on creating a report from code, remembering that this is how to create a design page.
  • edited 5:28PM
    Ok, that is not exactly what I was looking for. Basically, I have a "pre-printed" style form that needs continuation pages if it won't all fit on one. This is not a banded report... I have the page (only 1) designed in the designer, but I really wanted to be able to say "create a new page of page 1" and then fill the fields manually (because there are so many, it is unwieldy to use a dataset). It is like I want to use the OnManualBuild but to control the page creation level instead of just the band level.
    gordk wrote: »
    Ryan you do not build the output of the report you build the design page of the report,
    the report engine then process the design page and creates the output pages as needed.
    a design page is not limited to the height of the physical outputpage, you can set it to larger by setting the page options property large height in design mode.
    The on manual build event allows you to control how the output of the design is formed.
    Read the programmers manual chapter on creating a report from code, remembering that this is how to create a design page.
  • gordkgordk St.Catherines On. Canada.
    edited 5:28PM
    there are a number of ways to acheive this.
    Basicly we have a design page with a number of memoviews located on the page at specified positions that contain certain values, theses can be datafields or variables or static text.
    based on some criteria(the need to fill the same memoviews with other values).

    You could add design page(s) as needed and duplicate the layout of design page1 by selecting all the objects,
    then copy and paste them into designpage2 and design page3 etc.
    you can make decisions at the delphi level when the report is loaded as to which design pages will be visible, and use the page obpevent to iterate through the pages objects and set their contents.

    anoher way
    Place a masterdata band around all the objects on the page the bands height will be
    the height of the page - 1or 2 pixels. this databand does not connect to a datasource but has a rowcount propertt which alue will be set equal to the number of pages required, this value can be passed in from delphi in the normal fashion.
    now you can write code for the obp event of the memo objects to change their contents.
    ie if <page> = 2 then
    begin
    memo1.text := what ever:
    end;
    another method is to use categorized variables with no expression in the memo
    this triggers the ongetvalue event of the tfrxreport component where you can put whatever data you want into the variable just retrive the value of the line# Variable it will be = to the page number

    the possibilities are many, much will depend upon where your datavalues come from, and how you determine the no of pages reqd.
    i need more info to be more specific.
  • edited 5:28PM
    I think the masterdata thing is going to work best and will do what is needed. Thanks for the quick help!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.