|
Re: report doesn't show up [message #715628 is a reply to message #715578] |
Sun, 14 August 2011 23:35   |
yasser_z Messages: 13 Registered: August 2011 |
Junior Member |
|
|
please I'm really stuck on this one and I need to solve it to move on with the project cause I have a deadline to respect and I really did all I could to solve it.
I instaled the plugin, I added jars, the jsf4birt demo works just fine, but the report in the project doesn't work.I have a list in my bean that I wanna export as a report,
here is the code in my page:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:b="http://jboss.com/products/seam/birt"
xmlns:jsf4birt="http://jsf4birt.components">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
</head>
<body>
<rich:panel>
<f:facet name="header">
Raport Transactions
</f:facet>
<jsf4birt:birtWrapper reportName="/Reports/new_report.rptdesign">
<f:param name="Text" value="#{ValeursMBean.selection}" />
</jsf4birt:birtWrapper>
</rich:panel>
</body>
</html>
selection is the List to be be exported.
the Open method in the report is :
count=0;
myDataSource = new Packages.cdvm.surv.web.ValeursMBean();
values = myDataSource.getSelection();
the fetch method is :
if(count>values.size()){
return(false);
}
row["test"] = values.get(count);
count+=1;
return(true);
this is a simple test instead of the real things I wanna get, i'm working with this one first to make things easier to control.
i'll be really thankful for any kind of help .
[Updated on: Sun, 14 August 2011 23:36] Report message to a moderator
|
|
|
Re: report doesn't show up [message #715802 is a reply to message #715628] |
Mon, 15 August 2011 15:22   |
|
Can you add something like the following to your open method:
importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/temp/myrowcount.txt", true ) );
out.println( "values size is "+ values.size());
out.close();
and check that you are getting data.
Jason
On 8/14/2011 7:35 PM, yasser_z wrote:
> please I'm really stuck on this one and I need to solve it to move on
> with the project cause I have a deadline to respect and I really did all
> I could to solve it.
> I instaled the plugin, I added jars, the jsf4birt demo works just fine,
> but in project doesn't work.I have a list in my bean that I wanna export
> as a report, here is the code in my page:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich"
> xmlns:b="http://jboss.com/products/seam/birt"
> xmlns:jsf4birt="http://jsf4birt.components">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> <title>Insert title here</title>
> </head>
> <body>
> <rich:panel>
> <f:facet name="header">
> Raport Transactions
> </f:facet>
> <jsf4birt:birtWrapper reportName="/Reports/new_report.rptdesign">
> <f:param name="Text" value="#{ValeursMBean.selection}" />
> </jsf4birt:birtWrapper>
> </rich:panel>
> </body>
> </html>
>
> selection is the List to be be exported.
>
> the Open method in the report is : count=0;
>
> myDataSource = new Packages.cdvm.surv.web.ValeursMBean();
> values = myDataSource.getSelection();
> the fetch method is :
>
> if(count>values.size()){
> return(false);
> }
> row["test"] = values.get(count);
> count+=1;
> return(true);
>
> this is a simple test instead of the real things I wanna get, i'm
> working with this one first to make things easier to control.
> i'll be really thankful for any kind of help .
>
|
|
|
|
Re: report doesn't show up [message #715894 is a reply to message #715884] |
Mon, 15 August 2011 21:31   |
|
What version of BIRT are you using and where is this package located:
cdvm.surv.web
Jason
On 8/15/2011 5:06 PM, yasser_z wrote:
> Hi jason I did that but still nth changes,
> importPackage( Packages.java.io );
> importPackage( Packages.cdvm.surv.web);
> count=0;
>
> myDataSource = new ValeursMBean();
> values = myDataSource.getSelection();
>
> out = new PrintWriter( new FileWriter(
> "/home/zairi/Bureau/myrowcount.txt", true ) );
> out.println( "values size is "+ values.size());
> out.close();
>
>
> but I don't see the txt file in " Bureau"
> by the way I read about coding some classes of Birt Engine and Design,
> should I code them even if I'm working with jsf4birt and the graphic
> tool of Birt ? because all I did is that I made the report ,but dataset
> cannot get any data from my bean which is the problem, and I call it
> within the jsp file.
> is there something I should add to that?
> PS: I still have the same error.
>
> thank you
|
|
|
|
Re: report doesn't show up [message #715907 is a reply to message #715902] |
Mon, 15 August 2011 22:40   |
|
Can you set the log level to FINE and see if you are getting anything in
the logs. My guess is that class in your open script is not being
found. Put something like this in the before factory to see if anything
is getting written out.
out = new PrintWriter( new FileWriter(
"/home/zairi/Bureau/myrowcount.txt", true ) );
out.println( "Some message");
out.close();
When deployed where is the source for the cdvm.surv.web package/
You may want to try the 3.7 runtime which does not have the
web-inf/platform directory and all the jars are in the web-inf/lib.
Jason
On 8/15/2011 6:02 PM, yasser_z wrote:
> i'm using Birt 2.5 and Birt runtime 2.5.0
> i added an image of the hierarchy of my JSFproject:
> the package cdvm.surv.web is in the src of my JSF project.
|
|
|
|
Re: report doesn't show up [message #715913 is a reply to message #715909] |
Mon, 15 August 2011 23:31   |
|
In your list I did not see the jsf4birt lib. Is it in there?
Does this page work for any report or is it just failing on on scripted
datasource?
Jason
On 8/15/2011 7:04 PM, yasser_z wrote:
> thank you Jason so much I really appreciate your help,
> i wrote the code in the before factory but still no txt file.
> may you tell me how to set the log level to FINE ?!
> i guess i'll use the 3. version of birt as my last chance and see what
> that will come up with.
> i'll keep you in touch.
> thank you some much anyway Jason i really appreciate your help Best Regards
|
|
|
|
|
|
Re: report doesn't show up [message #716179 is a reply to message #716066] |
Tue, 16 August 2011 15:36   |
|
Sure I will give a try. email it to jasonweathersby at windstream dot net.
Jason
On 8/16/2011 7:43 AM, yasser_z wrote:
> hi jason
> can i send you my project and see what the issue with it please ?
|
|
|
|
Powered by
FUDForum. Page generated in 0.01907 seconds