You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by dhilip kumar <dh...@yahoo.co.in> on 2006/07/05 08:45:19 UTC

Error in report call

I am creating reports with iReport. I created a XML type of report.
  I used the following line in controller.xml to call the report :
      <view-map name="guestbook" type="jasperreportspdf" page="/reports/report3.xml" content-type="application/pdf" encoding="none"/>
   
   
  But I am getting the following error in the browser :
   
  net.sf.jasperreports.engine.JRException: Element type "import" must be declared.
   
  Did anyone come across this?
   
   
  Thanks and regards
  Dhilip

 		
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.

Re: Error in report call

Posted by dhilip kumar <dh...@yahoo.co.in>.
Hi thanks.
  But this is the error in dtd file of Jasper Reports.
  <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
  This file has not declared the elements like import, box and hyperlinkTarget atribute of the field element.
  Removing this in my xml coding I am able to view the report.
  But what is the solution to add all these elements in the xml file that is generated by the Japser Report itself.
   
  Thanks
  Dhilip
subhradeep bhatacharya <su...@yahoo.com> wrote:
  Hi Dilip,

Just give these a try:

In the controller you have written
page="/reports/report3.xml" content-type="application/pdf" encoding="none"/>

Is report3.xml is the screenwidget? If so then I think you should have a screen inside that and then modify the above line as
page="component://applicationName/reports/report3.xml#screenName" content-type="application/pdf" encoding="none"/>

If the above doen't work then try this:
Add the following handler

and then add the following 
page="component://applicationName/reports/report3.xml#screenName" content-type="application/pdf" encoding="none"/>

Hope this will work.

Regards,
Subhra


dhilip kumar wrote:
Yes Subhradeep. I tried including those lines.
But still getting the same error.

Thanks
Dhilip

subhradeep bhatacharya wrote:
Hi Dilip,

Try by adding the following two handlers in your controller.xml:




Regards,
Subhra


dhilip kumar wrote:
I am creating reports with iReport. I created a XML type of report.
I used the following line in controller.xml to call the report :



But I am getting the following error in the browser :

net.sf.jasperreports.engine.JRException: Element type "import" must be declared.

Did anyone come across this?


Thanks and regards
Dhilip


---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.


---------------------------------
Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better. 


---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.


---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs.Try it free. 

 		
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.

Re: Error in report call

Posted by subhradeep bhatacharya <su...@yahoo.com>.
Hi Dilip,
   
  Just give these a try:
   
  In the controller you have written
  <view-map name="guestbook" type="jasperreportspdf" 
page="/reports/report3.xml" content-type="application/pdf" encoding="none"/>
   
  Is report3.xml is the screenwidget? If so then I think you should have a screen inside that and then modify the above line as
    <view-map name="guestbook" type="jasperreportspdf" 
page="component://applicationName/reports/report3.xml#screenName" content-type="application/pdf" encoding="none"/>
   
  If the above doen't work then try this:
  Add the following handler
  <handler name="screenfop" type="view" class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>
  and then add the following 
  <view-map name="guestbook" type="screenfop" 
page="component://applicationName/reports/report3.xml#screenName" content-type="application/pdf" encoding="none"/>
   
  Hope this will work.
   
  Regards,
  Subhra


dhilip kumar <dh...@yahoo.co.in> wrote:
  Yes Subhradeep. I tried including those lines.
But still getting the same error.

Thanks
Dhilip

subhradeep bhatacharya wrote:
Hi Dilip,

Try by adding the following two handlers in your controller.xml:




Regards,
Subhra


dhilip kumar wrote:
I am creating reports with iReport. I created a XML type of report.
I used the following line in controller.xml to call the report :



But I am getting the following error in the browser :

net.sf.jasperreports.engine.JRException: Element type "import" must be declared.

Did anyone come across this?


Thanks and regards
Dhilip


---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.


---------------------------------
Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better. 


---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.

 		
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs.Try it free. 

Re: Error in report call

Posted by dhilip kumar <dh...@yahoo.co.in>.
Yes Subhradeep. I tried including those lines.
  But still getting the same error.
   
  Thanks
  Dhilip

subhradeep bhatacharya <su...@yahoo.com> wrote:
  Hi Dilip,

Try by adding the following two handlers in your controller.xml:




Regards,
Subhra


dhilip kumar wrote:
I am creating reports with iReport. I created a XML type of report.
I used the following line in controller.xml to call the report :



But I am getting the following error in the browser :

net.sf.jasperreports.engine.JRException: Element type "import" must be declared.

Did anyone come across this?


Thanks and regards
Dhilip


---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.


---------------------------------
Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better. 

 		
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1¢/min.

Re: Error in report call

Posted by subhradeep bhatacharya <su...@yahoo.com>.
Hi Dilip,
   
  Try by adding the following two handlers in your controller.xml:
   
  <handler name="jasperreportspdf" type="view" class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
 <handler name="jasperreportsxml" type="view" class="org.ofbiz.webapp.view.JasperReportsXmlViewHandler"/>
   
  Regards,
  Subhra
    

dhilip kumar <dh...@yahoo.co.in> wrote:
  I am creating reports with iReport. I created a XML type of report.
I used the following line in controller.xml to call the report :



But I am getting the following error in the browser :

net.sf.jasperreports.engine.JRException: Element type "import" must be declared.

Did anyone come across this?


Thanks and regards
Dhilip


---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.

 			
---------------------------------
Sneak preview the  all-new Yahoo.com. It's not radically different. Just radically better.