ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Reports using iBatis
Date Wed, 15 Jun 2005 15:15:11 GMT
Sure it is Daniel - there are two ways to do it.

One is with the result map - you can map a result column to another
mapped statement - that is covered in the user guide.

The other (my preference) is to use the groupBy attribute - look on
the wiki for "n+1 selects" for an example of how to do that.

Larry


On 6/15/05, Daniel Henrique Ferreira e Silva <dhsilva@gmail.com> wrote:
> Hi Nilesh,
> 
> I'm not sure i understood your question, but i'll try to help.
> 
> As far as i got your question, i guess that is not possible right away
> from iBATIS.
> But you can make all sort of things in your DAO layer. Have you wondered that?
> 
> Cheers,
> Daniel Silva.
> 
> On 6/14/05, Nilesh Bhattad <nilesh@outlinesys.com> wrote:
> >
> >
> >
> > Hi,
> >
> >
> >
> > I need to generate some reports using iBatis, JSP/XSLT. For example, one
> > report should list out all the companies and each company will have the list
> > of employees associated with that company.
> >
> >
> >
> > CompanyNo.        CompanyName
> >
> > 1
> >          ABC Pvt Ltd
> >
> > EmpNo       EmpName
> >
> > 1                                            Emp1
> >
> > 2                                            Emp2
> >
> >
> >
> > 2
> >          XYZ Pvt Ltd
> >
> > EmpNo       EmpName
> >
> > 3                                            Emp3
> >
> > 4                                            Emp4
> >
> >
> >
> >
> >
> > Is there a way to write sql statements in iBatis which will produce the
> > output as List of HashMaps where each hashmap will carry a child list
> > alongwith current record data..? Once I get the output in this fashion, I
> > can write JSP/XSLT code accordingly which can print the report in above
> > format..
> >
> >
> >
> > Would someone please suggest a way of generating this kind of report? I
> > apologize if a similar question was already asked in this forum…
> >
> >
> >
> > ~ Nilesh
>
Mime
View raw message