Announcement Announcement Module
Collapse
No announcement yet.
misleading Jasper documentation? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • misleading Jasper documentation?

    Hi,

    In section 14.7.3 of the Spring manual there are various references to configuring a Jasper report with an instance of JRDataSource or a Collection type, for example:

    "When adding the datasource to the model you have two approaches to choose from. The first approach is to add an instance of JRDataSource or a Collection type to the model Map under any arbitrary key"

    Am I correct in assuming that all these references to Collection are mistakes and should actually read "Connection" (i.e. java.sql.Connection)?

    Cheers,
    DM

  • #2
    No mistake there... you can in fact provide a Collection object as the data source.

    Comment


    • #3
      OK, my mistake. In the case of a report which has the relevant SQL embedded in the report itself, the Jasper API only requires a java.sql.Connection instance to be passed (instead of a JRDatasource). How can I access this feature if using Jasper with Spring?

      Also, how do you pass a JRDatasource or Connection within a Collection?

      Cheers,
      DM

      Comment


      • #4
        Hi DM,
        Did you find a solution to your problem?
        I too have a report with embedded SQL and want to pass it a java.sql.Connection instance.
        In my case i use JPA with Hibernate provider for data access in spring and i define all the connection setting in persistence.xml as properties to hibernate, but if you have found a solution i can probably change it to my needs.

        Thanks,
        Antreas.

        Comment

        Working...
        X