Error in report call

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in report call

dhilip kumar
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.
Reply | Threaded
Open this post in threaded view
|

Re: Error in report call

subhradeep bhatacharya
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 <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Error in report call

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

subhradeep bhatacharya <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Error in report call

subhradeep bhatacharya
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 <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Error in report call

dhilip kumar
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 <[hidden email]> 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.