Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to set store procedure parameters

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);
}

Former Member
Not what you were looking for? View more on this topic or Ask a question