code: public static JRDesignExpression getDataSourceExpression(DJDataSource ds) {
          JRDesignExpression exp = new JRDesignExpression();
          exp.setValueClass(JRDataSource.class);
  
          String dsType = getDataSourceTypeStr(ds.getDataSourceType());
          String expText = null;
          if (ds.getDataSourceOrigin() == DJConstants.DATA_SOURCE_ORIGIN_FIELD) {
              expText = dsType + "$F{" + ds.getDataSourceExpression() + "})";
          } else if (ds.getDataSourceOrigin() == DJConstants.DATA_SOURCE_ORIGIN_PARAMETER) {
              expText = dsType + REPORT_PARAMETERS_MAP + ".get( \"" + ds.getDataSourceExpression() + "\" ) )";
          } else if (ds.getDataSourceOrigin() == DJConstants.DATA_SOURCE_TYPE_SQL_CONNECTION) {
              expText = dsType + REPORT_PARAMETERS_MAP + ".get( \"" + ds.getDataSourceExpression() + "\" ) )";
          } else if (ds.getDataSourceOrigin() == DJConstants.DATA_SOURCE_ORIGIN_REPORT_DATASOURCE) {
              expText = "((" + JRDataSource.class.getName() + ") $P{REPORT_DATA_SOURCE})";
          }
  
          exp.setText(expText);
  
          return exp;
      }
docs: Returns the expression string required
  
  @param ds
  @return