Solved

error passing parameter in BIRT

Posted on 2012-03-26
2
783 Views
Last Modified: 2012-04-04
Hello I am having an error on this ScalarParameter portion of my code.

Can you have a look and make a recommendation?

The error I am geetting is attributeBean cannot be resolved

or



<%-----------------------------------------------------------------------------
      Checkbox parameter control
-----------------------------------------------------------------------------%>
<%
      ScalarParameterBean parameterBean = ( ScalarParameterBean ) attributeBean.getParameterBean( );
      String encodedParameterName = ParameterAccessor.htmlEncode( parameterBean.getName( ) );
%>

<%-----------------------------------------------------------------------------
      Combo box parameter control
-----------------------------------------------------------------------------%>
<%
      ScalarParameterBean parameterBean = ( ScalarParameterBean ) attributeBean.getParameterBean( );
      String encodedParameterName = ParameterAccessor.htmlEncode( parameterBean.getName( ) );
      String paramValue = parameterBean.getValue( );
      String displayText = parameterBean.getDisplayText( );
      String defaultValue = parameterBean.getDefaultValue( );
      String defaultDisplayText = parameterBean.getDefaultDisplayText( );
      boolean isDisplayTextInList = parameterBean.isDisplayTextInList( );
      boolean allowMultiValue = !parameterBean.allowNewValues( ) && parameterBean.getParameter( ).isMultiValue( );
      List values = parameterBean.getValueList( );      
%>


error on these (3) are:

multiple annotations found at this line:
-attributeBean cannot be resolved
-ScalarParameterBean cannot be resolved to a type
<%-----------------------------------------------------------------------------
      Hidden parameter control
-----------------------------------------------------------------------------%>
<%
      ScalarParameterBean parameterBean = ( ScalarParameterBean ) attributeBean.getParameterBean( );
      String encodedParameterName = ParameterAccessor.htmlEncode( parameterBean.getName( ) );
      String value = parameterBean.getValue( );
      if( value != null )
      {
%>
<%-----------------------------------------------------------------------------
      Content fragment
-----------------------------------------------------------------------------%>
<%
      ParameterGroupBean parameterGroupBean = ( ParameterGroupBean ) attributeBean.getParameterBean( );
%>

<%-----------------------------------------------------------------------------
      Radio button parameter control
-----------------------------------------------------------------------------%>
<%
      ScalarParameterBean parameterBean = ( ScalarParameterBean ) attributeBean.getParameterBean( );
      String encodedParameterName = ParameterAccessor.htmlEncode( parameterBean.getName( ) );
      boolean isDisplayTextInList = parameterBean.isDisplayTextInList( );
%>
0
Comment
Question by:Midani22
2 Comments
 
LVL 5

Accepted Solution

by:
Becky earned 500 total points
ID: 37769292
I don't see anywhere in that code where you declared attributeBean...so you're using an object you never created - of course it's not going to be resolvable.  

My guess is you're missing this:

<jsp:useBean id="attributeBean" type="org.eclipse.birt.report.context.BaseAttributeBean" scope="request" />
0
 

Author Closing Comment

by:Midani22
ID: 37808284
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
netstat -ano | find "8000" and taskkill /f /pid 2984 3 84
How to convert String matching to regex in java 4 52
Java: anonymous class 4 29
java example issue 5 26
Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question