none
How to use multiple bands in VFP 9 SP2 report RRS feed

  • Question

  • Hello Dear All,

    I want to prepare a report like (its an example) :


    NUMBERS
    --- Title 1 --- (Title Band 1)
    1
    2
    3
    -- Detail 1 --- (Detail Band 1)
    ALPHABET
    --- Title 2 --- (Title Band 2)
    A
    B
    C
    -- Detail 2 --- (Detail Band 2)


    Data in both detail bands will be fetch from two different tables.
    No. of lines will be same for both table.
    Title shouldn't be repeat with records.

    Any idea how to do that ?

    With Best Regards
    ShahidSQL (India)


    • Edited by ShahidSQL Monday, November 26, 2018 12:30 PM
    Monday, November 26, 2018 12:29 PM

Answers

  • Note three Detail bands in the report and Target aliases used in the last two bands.

    To define some headings for your detail bands should be easy.

    • Marked as answer by ShahidSQL Tuesday, December 11, 2018 11:30 AM
    Monday, December 10, 2018 12:33 PM
    Moderator

All replies

  • Would setting Print Repeated Values to No and Remove Line if Blank work for what you need?

    Tamar

    Monday, November 26, 2018 9:55 PM
    Moderator
  • You will need one more (header) table for this purpose.

    So create a new table or cursor with just one column (or more if you wish). This column should contain info which will be used for table relations so it can be integer containing value 0 or 1.

    Add the same column and values to your two tables and set the relation from the header table to these two tables. It is not necessary to update original tables structure if you know how to do this from cursors created in SQL query.

    Create the report and add two new detail bands to this report. These two new bands must have Target alias defined. Just double click the band and you'll see. The main Detail band can remain empty.

    And now select the header table and preview the report. You should see the results immediately.

    Now you may add header bands to optional detail bands.

    Sunday, December 9, 2018 2:46 PM
    Moderator
  • Thanks for reply,

    I did this actually. In both table I set the relation with a common column and used in two different band but despite that its printing like :

    NUMBERS
    1
    ALPHABET
    A
    NUMBERS
    2
    ALPHABET
    B
    NUMBERS
    3
    ALPHABET
    C

    Actually for above printing we can easily done from one band only, but I need to print like :

    NUMBERS
    1
    2
    3

    ALPHABET
    A
    B
    C



    • Edited by ShahidSQL Sunday, December 9, 2018 4:55 PM
    Sunday, December 9, 2018 4:49 PM
  • You need to setup your data so the childtables are scanned first, that's needing a 1:n relationship, besides SET RELATION into numbertable and alphabettable you also need to SET SKIP TO numberstable and SET SKIP TO alphabettable.

    Bye, Olaf

    Sunday, December 9, 2018 5:02 PM
  • Two different table is being used, one has alpha values and other has numeric value, both table has setup in different bands like :

    but its printing like :

    NUMBERS
    1
    ALPHABET
    A
    NUMBERS
    2
    ALPHABET
    B
    NUMBERS
    3
    ALPHABET
    C

    Monday, December 10, 2018 9:52 AM
  • Note three Detail bands in the report and Target aliases used in the last two bands.

    To define some headings for your detail bands should be easy.

    • Marked as answer by ShahidSQL Tuesday, December 11, 2018 11:30 AM
    Monday, December 10, 2018 12:33 PM
    Moderator
  • Thank you so much Pavel Celba

    I got the result now as you suggested.

    result is now :

    With Best Ragards

    ShahidSQL (India)

    Tuesday, December 11, 2018 11:32 AM