Results 1 to 3 of 3

Thread: Dynamic Report Fields

  1. #1

    Thread Starter
    Addicted Member Rohan_Powle's Avatar
    Join Date
    Mar 2000
    Location
    Mumbai,maharashtra.India
    Posts
    173

    Dynamic Report Fields

    Hi There,

    I want to create Dynamic Report using CR9, Query for report display can have 1/2/3/4/5/6/7/8/9/10 any no. of fields as per user selection from the vb interface.

    Here is a example which matches my req
    Eg:- based upon user selection of fields report will be display

    VB Interface :- check boxes with each field name

    - User Selects All (Select * From Product)
    > All Fields From Product Table should be displayed

    - User Selects (Select ID, Name From Product)
    > Report should display on 2 fields

    - User Selects (Select Name,Specification,RatePerUnit From Product)
    > Report should display on 3 fields


    - User Selects (Select Name,Specification,RatePerUnit,ManufacturedAt,Desc From Product)
    > Report should display on 5 fields


    This just an example, fields in my report will vary from 1 to 30.
    Please help me out, making this customize report is very urgent I am really blank abt displaying fields dynamically.


    All Gurus please help
    Help will be appriciated
    "Trouble Gives Experience & Experience Gives Wisdom."
    (accept troubles as they come to become more wise in life)
    - Regards Rohan

  2. #2
    New Member
    Join Date
    Mar 2006
    Posts
    3

    Re: Dynamic Report Fields

    why no answers ?

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

    Re: Dynamic Report Fields

    You could use an ADO recordset and set the .DataSource property of your report to it. This will bind your selected fields to the report.

    To get only certain fields to display in the report nicely, you can either do it from the report design time by making multiple Details sections each with your different setups and show/hide depending on your needs at runtime by passing a parameter and using the selection formula to evaluate it. Or you can use the CR object library to obtain access to the textfield controls and show/hide each depending on the users selections but you will also have to position them too then blindly or noe their positions in the designer.
    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

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