cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter Field values will not print

Former Member
0 Kudos

I have built several reports that get data from SQL Server stored procedures with parameters such as @Date_Begin and @Date_End.  The record selection works correctly so I know the parameter values are good.  I need to print the parameter values in the page header and have not succeeded.

I've tried two ways. 

First, I drag the parameter field onto the page header.  The report is all good but the parameter does not appear. 

Second, I put the parameter in a formula field.  This gives an error:

This field name is not known. Details: errorKind Error in File rptAccessList {B8ED5286-CEDF-46AC-AF3B-D2AAE78B9883}.rpt: Error in formula  begindate:  '"Begin " + {?@Date_Begin}' This field name is not known. Details: errorKind

The parameter values appear correctly in the VS designer preview but fail when I run the application.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hello Larry

As I understand it, this would be the work flow:

1) User is prompted parameters.

2) User will then select the dates. Say Jan 2, 2013 and May 1, 2013.

3) The report will then retrieve those values.

4) In addition to the report showing up with the correct data, you also want the the selected date values in (2) above to show up in the report page header.

This unfortunately is not possible as there is no way for the report to retrieve or remember the values the user entered. What you will have to do, is create your own parameter prompt screen, capture the values selected by the user and then pass those to either a formula or text box in the page header.

- Ludek

Senior Support Engineer AGS Primary Support, Global Support Center Canada

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

DellSC
Active Contributor
0 Kudos

Ludek,

Is this something new in Crystal 2011?  I know that in the past I've been able to display the values entered for any parameter, whether the paramter was created by adding a stored procedure to the report, or in a command, or just in the Parameters list in the main report.  I would expect the behavior you describe if the stored procedure is run in an application and the app then connects a report to the returned data, but not if the data is actually retrieved within the report.

I have seen issues when users can select multiple values for a parameter, but that's overcome by creating a formula that walks the array of selected values and concatenates  them into a single string that can be displayed on the report.

-Dell

Former Member
0 Kudos

Ludek,

The users are already entering the dates into text boxes.  The date controls in the application are tied to the @date parms in the stored procedure through the SqlDataSource on the .aspx page (where the CrystalReportViewer is). 

As a result, I see the ?@Begin_Date in the "Parameter Fields" on the "Field Explorer" on the CR design page in Visual Studio.  Why are parameters from stored procedures listed in the field explorer if CR can't remember the values?

Since I only get report data through stored procedures I don’t know how to pass values any other way.  I’ve looked in the SDK guide but so far have not found how to do it. 

Message was edited by: Larry Trammell

Answers (0)