DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Report not using bind variables

  1. #1
    Join Date
    Nov 2000
    Posts
    440

    Report not using bind variables

    Hi, i have a application running on forms/reports.
    The reports does not use bind variables.
    There is always at least 3 critérias sent from forms via user parameter. Example
    P_where_order

    so if the user print order from 1 to 10. The parameter will be equal to the following. "And no_order between 1 and 10".

    The query in the report is like this:
    select field1, field2, field3
    from order
    where blabla = blabla
    &p_where_order

    So the query will be replace at runtime by
    select field1, field2, field3
    from order
    where blabla = blabla
    And no_order between 1 and 10

    But that means that each time that report will be execute, the query will always be unique because of hardcoded values 1 and 10.

    How can i solve this?

    I just want to specify that the criterias are always different, the user is not obligated to put order number critéria, he can choose to run the report by client number, by order date, or even print everything.

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Have you looked at using dynamic SQL with bind variables?
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Nov 2000
    Posts
    440
    show me an example with report of course

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