Skip to Content
0
Former Member
Mar 06, 2009 at 04:07 PM

How can I set prameters on a report source

19 Views

HI,

I'm writing a JSF application that uses Crystal Reports. I am able to show the report with this tag.

<bocrv:reportPageViewer viewerName="CrystalViewer" reportSource="#{crystalReportManager.getReportSource('CrystalReport1.rpt')}" allowParameterPrompting="on"/>

The code for the crystalReportManager.getReportSource looks like this

public Object getReportSource(String reportPath)
    {
        try
        {
            IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();

            Object rptSrc = rptSrcFactory.createReportSource(reportPath, Locale.instance());

            return rptSrc;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        return null;
    }

I would like to set the properties so they will promt but I can't find any documentation on how to add a ParameterFieldDiscreteValue on a ReportSource object.

Thank you.

Matthew