Results 1 to 4 of 4

Thread: set selection formula for subreport in Crystal reports using visual basic 6.0

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Location
    india
    Posts
    11

    Unhappy set selection formula for subreport in Crystal reports using visual basic 6.0

    Hello Experts,
    I have designed a report using crystal reports 8.0.
    There are subreports also included.front end is visual basic 6.0
    I change the selection formula of the main report using
    crystalreport.selectionformula. I am not knowing how to
    set the selection formulae for the sub reports.
    can any one help me .
    sapna

  2. #2
    Hyperactive Member
    Join Date
    Oct 2000
    Location
    Sydney Australia
    Posts
    476
    Hi s

    You tell the Crystel report which subreport you want to change and simply make the changes to that sub report as if it were the main report. In the code below I set the SubreportToChange property to the correct sub report. I then set its selection formula, and then set the focus back to the main report with the last line.
    VB Code:
    1. CrystalReport1.SubreportToChange = <<sub report name>>
    2.     CrystalReport1.SelectionFormula  = <<your selection formula>>
    3.     CrystalReport1.SubreportToChange = ""
    Good luck

    FW

  3. #3
    Registered User
    Join Date
    Feb 2014
    Posts
    1

    Cool Re: set selection formula for subreport in Crystal reports using visual basic 6.0

    Quote Originally Posted by freewilly View Post
    Hi s

    You tell the Crystel report which subreport you want to change and simply make the changes to that sub report as if it were the main report. In the code below I set the SubreportToChange property to the correct sub report. I then set its selection formula, and then set the focus back to the main report with the last line.
    VB Code:
    1. CrystalReport1.SubreportToChange = <<sub report name>>
    2.     CrystalReport1.SelectionFormula  = <<your selection formula>>
    3.     CrystalReport1.SubreportToChange = ""
    Good luck

    FW
    Thanks a lot .

  4. #4
    Member
    Join Date
    Feb 2014
    Location
    In my own world
    Posts
    50

    Re: set selection formula for subreport in Crystal reports using visual basic 6.0

    Please mark your thread resolved now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width