cancel
Showing results for 
Search instead for 
Did you mean: 

how to set store procedure parameters

Former Member
0 Kudos

Hello,

To summarize our problem, we are not able to set store procedure parameters using JRC and without using a Viewer.

Inside an rpt document we use a call to a store procedure that requires some input parameters.

We attempted to pass the required parameters to the report (please see below) but it seems that those parameters are somehow ignored.

In fact null values are always received by the store procedure.

For your information, if the document doesnu2019t contain a call to a store proc but SQL clause parameters instead, then that works.

Does that mean that sp parameters have to be set in a specific way?

Please can you advise?

Tanks a lot,

Joseph

This is how we set parameter values:


private void handleParameters(ReportClientDocument pm_document, List pm_parameters) throws Exception
{
	...

	ParameterFieldController pfc = pm_document.getDataDefController().getParameterFieldController();

	...
		
	pfc.setCurrentValue(reportName, parameterFieldName, parameterValue);
}

Then we export in a pdf file:

 
private InputStream createInputStream(ReportClientDocument pm_document, String pm_reportName) throws Exception
{
	return (ByteArrayInputStream)pm_document.getPrintOutputController().export(ReportExportFormat.PDF);
}

Accepted Solutions (0)

Answers (1)

Answers (1)

ted_ueda
Employee
Employee
0 Kudos

First question:

Do you set the parameters before the database logon?

Sincerely,

Ted Ueda