Ask a questionAsk a question
 

Answerpass variable to subreport SQL

  • Tuesday, November 03, 2009 8:39 PMdvandeus Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    We are writing a report that sorts by state.

    After each state, we want a subreport to do summary information for each state. I need to pass the state from the main report to the subreport SQL. I created a "a_state" shared variable in the main report pointing the state variable on the main report.

    I have the shared variable defined in the subreport.

    I have the following as part of the subreport SQL to select summary data for the state:
    where a.state = :a_state

    But I am gettting a ORA-01008: not all variable bound

    What am I doing wrong?

Answers

  • Thursday, November 05, 2009 3:35 PMdvandeus Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    We figured out the syntax.

    In creating the subreport SQL, we created a parameter for state.

    Then in the main report, we right clicked and changed the subreport links.
    We pointed the main report field state to the new subpreort parameter state.

All Replies

  • Thursday, November 05, 2009 3:35 PMdvandeus Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    We figured out the syntax.

    In creating the subreport SQL, we created a parameter for state.

    Then in the main report, we right clicked and changed the subreport links.
    We pointed the main report field state to the new subpreort parameter state.