jorjao Posted April 30, 2008 Share Posted April 30, 2008 I would like to make you a question on iREPORTS. It is possible to define a variable as one of a select field? SELECT clientes."numero" AS quala_crm_clientes_numero, entidades_cli."nome" AS entidades_nome, entidades_cli."tlf" AS entidades_tlf, entidades_inst."tlf" AS telefone_estab, fichas."processo" AS processo, entidades_cli."tiponif" AS $V{teste} FROM entidades as entidades_inst, entidades as entidades_cli, quala_crm_clientes as clientes, quala_crm_fichas_inscricao as fichas, inst_estabelecimentos as inst_estabelecimentos WHERE clientes.entidade= entidades_cli.identidade and fichas.cliente = clientes.id_cliente and fichas.estabelecimento = inst_estabelecimentos.id_estabelecimento and inst_estabelecimentos.dados = entidades_inst.identidade and clientes."id_cliente" = $P{cliente}::int If I do well it gives me this error.__________________________________________________________________________________________________________ Error filling print... Error executing SQL statement for : teste1 net.sf.jasperreports.engine.JRException: Error executing SQL statement for : teste1 at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.create Datasource(JRJdbcQueryExecuter.java:141) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource (JRFillDataset.java:656) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource (JRFillDataset.java:588) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters (JRBaseFiller.java:1212) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:849) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill (JRBaseFiller.java:798) at net.sf.jasperreports.engine.fill.JRFiller.fillReport (JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport (JasperFillManager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport (JasperFillManager.java:234) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:947) at java.lang.Thread.run(Unknown Source) Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "AS $" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse (QueryExecutorImpl.java:1559) at org.postgresql.core.v3.QueryExecutorImpl.processResults (QueryExecutorImpl.java:1327) at org.postgresql.core.v3.QueryExecutorImpl.execute (QueryExecutorImpl.java:192) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute (AbstractJdbc2Statement.java:451) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags (AbstractJdbc2Statement.java:350) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery (AbstractJdbc2Statement.java:254) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource (JRJdbcQueryExecuter.java:135) ... 10 more Print was not filled. Try using an EmptyDataSource... ____________________________________________________________________________________________________________Needed to subject it to the type of customer, presenting a text on the report. Does anyone know if this is possible or how is it done? Link to comment Share on other sites More sharing options...
lshannon Posted April 30, 2008 Share Posted April 30, 2008 As far as I know this is not supported by the API. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now