0

I have some problems to configure iReports, I´m using iReport4.8.0 (I tried iReport4.7.1 before and the same problem happened) and grails ggts 3.0.0.

I have a domain class called Consulta in a package called consultas, I want to list them and create a report using ireports, I´ve followed the steps I found in a book: Beginning Groovy and Grails From Novice to Professional CHAPTER 9 it says that create a report from groovy clases is very easy (in theory it is) you just have to create a jar with the classes compiled and place it in the reports lib directory, then select "javabeans set data source option from data connections where the only field to fill is the name, it says to set the others blank, when I test it an error pop-up appears saying ClassNotFoundError, I'm sure there are some missing steps but i don't know which.

in my consulta controller I have this code:

def report ={
    def consultas = Consulta.list()
    chain(controller: "jasper", action: "index", model: [data: consultas], params:params)       
}

and I think jassper plugins are OK.

MKB
  • 7,587
  • 9
  • 45
  • 71
gcm
  • 1
  • What is the stacktrace of ClassNotFound? You put your jar in the lib folder? –  Nov 13 '12 at 16:20
  • yes, I did, I put a jar with my domain classes in the ireports lib folder an added it to the classpath. – gcm Nov 21 '12 at 07:40
  • I couldn't find the stacktrace, the error apears when I test the conection so I can't continue – gcm Nov 21 '12 at 08:48
  • Then is something related with your datasource and not jasper. Can you post your config, and the complete error message? –  Nov 21 '12 at 11:19
  • finally I got it, it was much easier than what I was trying. I set empty datasource and put fields $F{name} and... it works! I was trying to configure the data source connection as javabeans and it wasn't needed – gcm Nov 27 '12 at 11:29

0 Answers0