How to break a record and print on different page

edited January 2004 in FastReport 2.xx VCL
Hello
Everyone

I am facing the following problem .

I have a record that has around 25-30 columns.

Rec No | Name | Description | City |......................................25 .

Problem is I cannot fit in all the columns in single page . Now is it possible to
print say 1st 15 columns in one page and remaining coulmns in next page .

What I mean is :

"Page 1"

Rec No | Name | Description | City |..........................column15
________________________________________________________

1 | Rec1 | Testing | NY

________________________________________________________

2 | Rec2 | Testing | PH
________________________________________________________

"Page 2"

Rec No | Dummy field16 | Dummy Field 17 |................column25
________________________________________________________

1 | Hello every one | Thanks for listening
________________________________________________________

2 | Please suggest |
________________________________________________________


It will be of great help if could suggest me a solution.
Regards
Amar

Comments

  • edited 1:54PM
    Try to solve the problem with the scripting language. Define a variable in the data-dictionary and icrease this in the master-data band. Set the attribute formnewpage in dependence of the variable. I haven't try this but it should be the way to solve your problem.

    regards
    frank
  • edited 1:54PM
    And wha about the next 2 pages? Are they change each other? One page with the first 15 column and one page with the remaining? Please clearify the problem. Because if the order doesn't matter, You can use 2 design pages and put the required fields on them separately. When You print the report the pages belongs to the first design page will be printed first and the pages of the second design page will be printed later.

    Regards: Alex
  • edited 1:54PM
    Frank, Alex

    Thanks for the response.

    Alex : There is problem using your appraoch .
    Except 2 fields , I don't know which all fields are going to be there ,
    And even I don't know their order.

    So how do I do it ?

    Frank :
    I am working on your suggestion. But how do I link
    "formnewpage" attribute of Master data band with the
    Variable created in Data - dictionary .

    What I have done is in the variable's expression property chose
    the fn ..."NEWPAGE" ...am I doing it right.

    Waiting for inputs from you . Thanks once again
    Regards
    Amar
  • edited 1:54PM
    Ok. I got it. I didn't understand your problem fully. See the \demos\prntbl1,
    \demos\prntbl2 or \demos\prntbl3 example reports. Or You can read the documentation in the fr_eng.doc file at the page 133 titled "Printing of column reports with variable or unknown number of columns".

    I hope this will help.

    Alex
  • edited 1:54PM
    Hello All

    Thanks for the suggestion basswar .
    My problem still not solved ;) .

    I reffered to the printing unknown number of columns example.
    But it doesn't solve my problem completely.

    I'll try to explain my problem once again .
    There is record having 23 fields . ID, Name ,Type,Safetyrelated ........fld23 .
    Now as I cannot fit them in one page I need print few fields on 1st page and
    remaining on the next page . Now the catch is if I break the record in to two
    pages I need to have the primary fields is both the fields(in this ex ID and Name)
    Eg : Page 1
    ID, Name , Type.....Fld10

    Page 2
    ID, Name ,Safety related

    So how do i do it ? Any code snippets will be of great help .

    Regards
    Amar
  • gordkgordk St.Catherines On. Canada.
    edited 1:54PM
    Hi
    try this
    put fields you want on design page1 mdband
    put fields you want on design page2 mdpand
    set reportcomponent type prop to rtmultiple and its datasetproperty to the correct dataset.
    regards ;)

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.