Forum Stats

  • 3,851,567 Users
  • 2,264,000 Discussions
  • 7,904,781 Comments

Discussions

How to dynamically add an interactive report region?

Xuehan Xu
Xuehan Xu Member Posts: 52
edited Jul 10, 2014 3:13AM in APEX Discussions

Hi, everyone

I'm trying to display multiple records from multiple tables in one page . However, which tables need to be queried is decided at the runtime. So, is there any way to dynamically add an interactive report region?

Thanks:-)

Huzaifa_Apex

Best Answer

«1

Answers

  • Sunil Bhatia
    Sunil Bhatia Member Posts: 1,280 Bronze Trophy

    Hi,

    Yes it is possible by using APEX_COLLECTIONS. You can create an APEX Collection at runtime, and display content from those collection in your IR Query report.

    -- Sunil Bhatia

  • Xuehan Xu
    Xuehan Xu Member Posts: 52
    edited Jul 10, 2014 1:22AM

    Hi, Sunil Bhatia

    Thanks for the quick reply.

    I need to display multiple regions each of which corresponds to a table queried, what should I do?

  • Sunil Bhatia
    Sunil Bhatia Member Posts: 1,280 Bronze Trophy
    Xuehan Xu wrote:
    
    Hi, Sunil Bhatia
    
    Thanks for the quick reply.
    
    I need to display multiple regions each of which corresponds to a table queried, what should I do?
    

    I did not understand your question at all. Earlier you wish to "So, is there any way to dynamically add an interactive report region" which can be done using "apex_collection". Now you have changed your question to multiple regions on a page. Please explain your question in more simpler language.

    -- Sunil Bhatia

  • Xuehan Xu
    Xuehan Xu Member Posts: 52

    HI, sorry, I didn't make myself clear.

    I need to display multiple records from multiple tables in multiple regions. Each region display records from the same table. Since the tables that needs to be queried is not known at the time of building the application, the regions needs to be added dynamically during run time. Is there any way to do this?

  • Sunil Bhatia
    Sunil Bhatia Member Posts: 1,280 Bronze Trophy
    I need to display multiple records from multiple tables in multiple regions. 
    

    Are all of these regions interactive? If yes, it is not possible to show multiple interactive reports on single page. Obv workarounds are there such as Roels Blog: Two Interactive Reports on one Page but if you have high amount of regions, i will prefer going with SQL report instead of interactive report.

    Since the tables that needs to be queried is not known at the time of building the application, the regions needs to be added dynamically during run time. Is there any way to do this?
    

    As i said, for taking dynamic names, you can make effective use of APEX_COLLECTION.

    -- Sunil Bhatia

    Huzaifa_Apex
  • Huzaifa_Apex
    Huzaifa_Apex Member Posts: 383 Bronze Badge

    Your query is bit confusing.

    You want multiple region which will be generated during run time or you want a region to be dependent on dynamic query ?

    Br,

    Zaif

  • Xuehan Xu
    Xuehan Xu Member Posts: 52

    Hi, Zapex

    I want multiple region which will be generated during run time.

    Sorry for my poor English

  • Xuehan Xu
    Xuehan Xu Member Posts: 52

    Hi, Sunil

    They are not necessary to be interactive , How to generated classic report dynamically?

  • Huzaifa_Apex
    Huzaifa_Apex Member Posts: 383 Bronze Badge

    I don't know if there is any direct way for creating Region dynamically. But, a region can depend on dynamic query.

    But yes you can always create multiple region before hand(create maximum region which might be possible) and use condition for its display. It will seem to be getting generated depending on particular condition.

    Br,

    Zaif

  • Huzaifa_Apex
    Huzaifa_Apex Member Posts: 383 Bronze Badge
    Answer ✓
    Xuehan Xu wrote:
    
    Hi, Sunil
    
    They are not necessary to be interactive , How to generated classic report dynamically?
    

    There are multiple method for achieving this

    1. By creating your report depending on Collections which can be created/updated whenever your condition changes
    2. You can create a PLSQL block returning your dynamic query.

    Application Express: How to create a report based on a dynamic query.

    Br,

    Zaif

This discussion has been closed.