Results 1 to 7 of 7

Thread: [Resolved]Pass a parameter to subreport

  1. #1

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Talking [Resolved]Pass a parameter to subreport

    Hi all,

    My Report1 is composed by subreport1 and report2.
    I need to pass a parameter to subreport1 and subreport2,
    How can i pass a parameter to a subreport?


    Thanks for all help
    Last edited by naruponk; Feb 12th, 2005 at 02:06 AM. Reason: Resolved

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Pass a parameter to subreport

    You need to create a parameter at the main report level. Then link the parameter to the subreport
    by reimporting the sub report. This will allow you to pass a parameter to the report which
    will inturn go to the sub report.

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Pass a parameter to subreport

    Thanks RobDog888
    Right now i can solved this problem, do you know how to suppress
    a blank sub-report?

    I have checked "suppress blank report" but the report shows
    a blank page on 2nd page how to assign the report to show only 1 page?

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Pass a parameter to subreport

    You can add your subreport to its own detail section (create a second) and add code to the
    selection expert of the subreports detail section so its visibility will be false if there are no records for it,
    else leave it visible.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Re: Pass a parameter to subreport

    Thanks man!

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Pass a parameter to subreport

    No prob. I just wanted to mention that you could create a duplicate section where
    ever your subreport is currently located. Then do the eval to see if you want
    to suppress it or not. There is a "TotalPageCount" under Print State section.
    Last edited by RobDog888; Feb 11th, 2005 at 10:18 PM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    Talking Re: Pass a parameter to subreport

    Thanks for your help

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