10 Replies Latest reply on Jul 16, 2010 8:50 AM by ehsmurali

    Seam and CrystalReports JSF tags?

    al whiting Newbie
      Hey everyone :O

      I'm a relatively new SEAM user (2.1.0.GA I believe) however I have already created a few small apps with it and I'm really liking it so far :D

      Now onto the important stuff...

      I'm trying to implement the viewing of processed Crystal Reports in a seam app. So far what works is getting reports from the server, building inputs for the reports params, taking those values back and passing them to the server.

      Now I can see the server process the report, my app polls it until it's ready to be viewed ... that all works fine. The problem I'm having now is the XHTML page where I've included the crystal 'reportPageViewer' tag which should supposedly render the report to HTML... however it produces only a blank page.

      Below is the page code. Note that when I view the page source after it is rendered to the browser the crystal tag (<bocrv:reportPageViewer ... />) still says simply that, it hasn't resolved/compiled/rendered into normal markup.

      Am I doing something obviously wrong here? Do I need to follow some wierd process in order to be able to use these Crystal-JSF tags? If anyone can help I'd really appreciate it!

      `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      <f:view contentType="text/html"
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
          <title>Report Viewer</title>

      <body style="margin: 0;
                   padding: 0;
                   border: 0;">

          &lt;bocrv:reportPageViewer reportSource="#{viewableReportSource.viewer}" viewerName="reportViewer" /&gt;


        • 1. Re: Seam and CrystalReports JSF tags?
          al whiting Newbie
          Sorry for bad formatting of original post... please transpose html character codes with their proper < > in your mind... I tried to change them for forum validation but obviously it didn't work properly (validator didn't like the bocrv tag for some reason).
          • 2. Re: Seam and CrystalReports JSF tags?
            al whiting Newbie

            Shameless bump for new work day :(

            • 3. Re: Seam and CrystalReports JSF tags?
              al whiting Newbie

              Ok I got it working if anyone is interested.

              Really the problem was just that I didn't full understand how to setup a taglib in facelets.

              You need to create the xyz.taglib.xml descriptor file and then reference it from the web.xml and all is well :D

              • 4. Re: Seam and CrystalReports JSF tags?
                Daniel Dausch Newbie

                Hi Al, Thanks for the post. I am just starting an effort to use Crystal Reports with facelets and any help you can provide to help get me jump started would be much appreciated.

                • 5. Re: Seam and CrystalReports JSF tags?
                  bf Newbie
                  Hi Al. I created a crystal-report.taglib.xml:




                  But I got an exception:

                  SEVERE: Error Rendering View[/abc.xhtml]
                  javax.faces.FacesException: Expression Error: Named Object: com.crystaldecisions.report.web.jsf.JSFViewerTag not found.
                          at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:564)

                  I have put webreporting-jsf.jar and webreporting.jar in WEB-INF/lib folder so JSFViewerTag class is there.

                  Do you know what I have done wrong? Thanks.
                  • 6. Re: Seam and CrystalReports JSF tags?
                    Matthew Demerath Newbie

                    I'm having the same problem. Did you find the answer?

                    • 7. Re: Seam and CrystalReports JSF tags?
                      manasvi manasvi Newbie

                      could any one pelase share the code. i am getting blank report.

                      • 8. Re: Seam and CrystalReports JSF tags?
                        Shannon  Pettit Newbie
                        Here is the setup for configuring reportPageViewer  (JSF Reporting Component) to work with JSF and Facelets

                        1. crystalreports-jsf.jar does not come with a facelets taglib - You will need to create one such as:


                        <?xml version="1.0" encoding="UTF-8"?>
                        <!DOCTYPE facelet-taglib PUBLIC
                        "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"

                        Place this inside WEB-INF

                        2. Modify your web.xml to read the new taglib.


                        3. Modify the faces-config.xml file to support the new components:


                        You may also need to add the localization to the application tag in faces-config, such as:


                        3. Add the required jars to your classpath (This will vary based upon project setup and features required, but at minimum, it will need: CrystalCommons2, Crystal Runtime, WebReporting-jsf, Webreporting )

                        This should allow JSF to recognize the Crystal Report tag and you can then pass in a IReportSource via an EL expression.

                        Hope this helps as I found getting information on this topic to be a little sparse.
                        • 9. Re: Seam and CrystalReports JSF tags?
                          hubert paluch Newbie

                          Hello. I know this topic is a little old but maybe someone can help my.
                          I'm using Cristal in my web app JSF(IceFaces) and JBoss Cristal working fine (thanks for this topic) but I have a little problem I want to display my report (all report page) on one page. I don’t see any way how to do this using this tag.
                          I'm asking here because you resolve all problems with configuration (which wasn't simple) and maybe already someone resolve my problem.

                          • 10. Re: Seam and CrystalReports JSF tags?
                            ehsmurali Newbie

                            Hi Shannon,
                                       I followed all the steps, yet my facelet redered as blank, no error.
                                       Am I missing any configuration.