Re: sub report (jasper) problem?
Re: sub report (jasper) problem?
- Subject: Re: sub report (jasper) problem?
- From: Theodore Petrosky <email@hidden>
- Date: Mon, 06 May 2013 13:46:30 -0700 (PDT)
I spent the whole day banging my head on this wall. So I started over. Except that I had iReport files hanging around I had to create new files with new names. And I discovered that one must be careful in naming these files because if your filename (even though it has a .jasper extension) matches a Field variable, you can get kaka. No warnings, just a real bad time.
BTW, I created this in my EO:
public JRBeanCollectionDataSource theSteps() {
return new JRBeanCollectionDataSource( ERXArrayUtilities.sortedArraySortedWithKey(this.projectSteps(), "dueBy") );
}
this.projectSteps() is a to-many relationship. do you see any reason I could be burned here. I just want the array returned sorted and as a JRDataSource. I could not think of any other way to achieve that.
Ted
--- On Mon, 5/6/13, Chuck Hill <email@hidden> wrote:
> From: Chuck Hill <email@hidden>
> Subject: Re: sub report (jasper) problem?
> To: "Jesse Tayler" <email@hidden>
> Cc: "Theodore Petrosky" <email@hidden>, "WebObjects Development" <email@hidden>
> Date: Monday, May 6, 2013, 2:34 PM
>
> On 2013-05-06, at 7:54 AM, Jesse Tayler wrote:
>
> >
> > well, don't screw pooches, that's just gross.
> >
> > if your app hangs - that's good - you should get a
> backtrace from the hung instance.
> >
> > in my experience, this basically always ends up
> pointing to an EC that was unexpectedly locked - of course,
> that's just me…sigh.
> >
> > I'd throw down a slice of code back to you for how to
> get the backtrace, but of course, I can't recall exactly
> how.
> >
> > if a search on the wiki pages doesn't work, then you
> can always just politely ask Chuck directly, since he is the
> source of all such knowledge anyway.
>
> LOL
>
> sudo jstack -F <process id>
>
>
>
> >
> >
> >
> >
> > On May 6, 2013, at 10:21 AM, Theodore Petrosky <email@hidden>
> wrote:
> >
> >> I am lost. if I remove the subreport everything is
> happy.
> >>
> >> try number 1.
> >> since what I need is to sort this array by date, I
> thought I would get my EO to return what I wanted. So I
> created in my projectSteps.java
> >>
> >> public JRBeanCollectionDataSource theSteps() {
> >> return new
> JRBeanCollectionDataSource(
> ERXArrayUtilities.sortedArraySortedWithKey(this.projectSteps(),
> "dueBy") );
> >> }
> >>
> >> Then I used the Field 'theSteps' as a datasource
> and it worked fine. ONE TIME
> >>
> >> try number 2
> >> So i assume i was screwing the pooch and changed to
> passing the normal field to iReport and 'fixing' the
> datasource there. so I used projectSteps as the field and
> Connection type is datasourse DataSource expression
> was:
> >>
> >> new
> net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{projectSteps})
> >>
> >> Which worked fine again (without sorting on the
> date). ONE TIME.
> >>
> >> If I run the report again, my app hangs. No
> response, no errors, it just stops.
> >>
> >> I am using ERJasperReports as the basis and I see
> that it sets up a new EditingContext each time it is run. So
> I do not believe that I am hosing the EC. But what do I
> know?
> >>
> >>
> >> --- On Mon, 5/6/13, Jesse Tayler <email@hidden>
> wrote:
> >>
> >>> From: Jesse Tayler <email@hidden>
> >>> Subject: Re: sub report (jasper) problem?
> >>> To: "Theodore Petrosky" <email@hidden>
> >>> Cc: "WebObjects Development" <email@hidden>
> >>> Date: Monday, May 6, 2013, 9:54 AM
> >>>
> >>> are you certain this is not your app handling
> here?
> >>>
> >>> I mean, it sure sounds like you're either
> hanging an EC or
> >>> otherwise killing your instance?
> >>>
> >>>
> >>>
> >>>
> >>> On May 6, 2013, at 9:44 AM, Theodore Petrosky
> <email@hidden>
> >>> wrote:
> >>>
> >>>> someone must have seen this. this is D2W
> btw!!
> >>>> I have a to-many relationship
> >>>> Project ==> projectSteps
> >>>>
> >>>> I am trying to print a jasper report where
> each row is
> >>> a Project and there is a sub report on the same
> line with
> >>> the 'steps'. If I have the subReport in the
> printed report,
> >>> the report prints beautifully. But only one
> time. If I try
> >>> to rerun the report the app hangs. no errors in
> the console,
> >>> it just stops and the browser window updates to
> "No instance
> >>> available".
> >>>>
> >>>> Is there someone doing JasperReport with
> Subreports
> >>> that has an idea.
> >>>>
> >>>> I thought maybe there was a simple leak
> that was
> >>> hurting me so I tried running the report,
> logging out,
> >>> logging in (to create a new session). but it
> dies.
> >>>>
> >>>> I think I need real help in debugging this
> one.
> >>>>
> >>>> Ted
> >>>>
> _______________________________________________
> >>>> Do not post admin requests to the list.
> They will be
> >>> ignored.
> >>>> Webobjects-dev mailing list
> (email@hidden)
> >>>> Help/Unsubscribe/Update your Subscription:
> >>>>
> >>>> This email sent to email@hidden
> >>>
> >>>
> >>
> >
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be
> ignored.
> > Webobjects-dev mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>
> --
> Chuck Hill
>
> Executive Managing Partner, VP Development and Technical
> Services
>
> Practical WebObjects - for developers who want to increase
> their overall knowledge of WebObjects or who are trying to
> solve specific problems.
> http://www.global-village.net/gvc/practical_webobjects
>
> Global Village Consulting ranks 13th in 2012 in BIV's Top
> 100 Fastest Growing Companies in B.C!
> Global Village Consulting ranks 76th in 24th annual PROFIT
> 200 ranking of Canada’s Fastest-Growing Companies by
> PROFIT Magazine!
>
>
>
>
>
>
>
>
>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden