Results 1 to 3 of 3
  1. #1
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160

    How to display different subreports based on data in main report

    Hi Guys,

    I am trying to make a Invoicing database. I have created a rptbill in report format based on qryBill. It is going to have to 2 Sub Reports. First One is SaleDetails, which is all ok. Second one is rptSaleTax, now different types of Tax Reports (Two Types Only) need to be displayed based on the location Code of the buyer , which is displayed on main report , for which the value is take from tblBuyer. Is there a way to displayed one type on report based on buyer Location.

    OR

    I was also wondering, can I display data from qrySaleTax in rptBill directly (not as a sub report).

    Looking forward to your help and guidance.
    Thanks and Regards


    Deepak Gupta

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    make 3 sub rpts
    both subTax rpts are invisible,
    then in the ON PRINT event of the detail (or where ever the subReports sit), turn on the one you want

    Code:
    if txtTax = 1 then
        subTax1.visible =true
    else
        subTax2.visible =true
    endif

  3. #3
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160
    Thanks worked perfectly

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Main Report and Subreports repeating data
    By PinkLady50 in forum Reports
    Replies: 17
    Last Post: 09-15-2017, 09:37 AM
  2. Replies: 4
    Last Post: 12-29-2014, 11:27 AM
  3. Empty Main Report, won't run subReports
    By rankhornjp in forum Reports
    Replies: 8
    Last Post: 03-15-2013, 11:07 AM
  4. Replies: 1
    Last Post: 11-24-2012, 04:40 PM
  5. Replies: 2
    Last Post: 06-17-2010, 04:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums