Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

printing differenr subreport depending by id

edited October 2011 in General


Hi,

i need to print a report fo r 20 records

every record on one sheet

i need to print same report dependind by id

if id is 1,3,5,7,9 i need to print subreportdispari
if id is 2,4,6,8,10 i need to print subreportpari

please can you tell me how can i do?

i need to create two subreport with 'section'

or i need other?

can you help me?

thanks





--- posted by geoForum on http://www.newswhat.com

Comments

  • edited October 2011
    Hi Ennio,

    How are you obtaining the ID? Is this a field in the DB or is the user
    giving this value before printing the report?

    Either way, I would suggest creating a group on the key field of your DB
    with the NewPage property set to true. Then place two Subreports inside
    the detail band, both set Visible False.

    Next inside the Band.BeforePrint event, toggle the visibility of each
    subreport based on the value of the ID.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.