Skip to Content
author's profile photo Former Member
Former Member

CurrentValues.AddValue() does not successfully pass value to report parameter

I am trying to migrate my crystal application from CR11 to CR13. For that replacing CRAXDRT.DLL calls.

In one of the report there are 9 parameters.

One of which is UserID. For user ID AddCurrentValue() function was used from CRAXDRT.DLL

For all other parameters SetCurrentValue() function from CRAXDRT.DLL was used. I have implemented a replacement .Net component for CRAXDRT.DLL (UFL Class Lilb).

All rest of parameters are getting properly set but UserID parameter is not setting, thus at the time of execution report prompt for it and if provided things works fine.

This means that this parameter is not getting set properly.

Please advice.

For adding parameter, UFL Class Lib implementation I have tried various combinations as,

1)

rptDoc.DataDefinition.ParameterFields[lParam - 1].CurrentValues.AddValue(strAppUser);

//////////////////////// AND //////////////////////////////

2)

rptDoc.SetParameterValue(lParam - 1, strAppUser);

//////////////////////// AND //////////////////////////////

3)

ParameterField paramField = new ParameterField();

ParameterDiscreteValue paraValue = new ParameterDiscreteValue();

paramField.CurrentValues = rptDoc.DataDefinition.ParameterFields[lParam - 1].CurrentValues;

paraValue.Value = strAppUser;

paramField.CurrentValues.Add(paraValue);

//////////////////////// AND //////////////////////////////

4)

rptDoc.DataDefinition.ParameterFields[lParam - 1].ApplyCurrentValues(paramField.CurrentValues);

//////////////////////// AND //////////////////////////////

5)

rptDoc.DataDefinition.ParameterFields[lParam - 1].CurrentValues.Add(strAppUser);

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Feb 28, 2013 at 09:29 PM

    Hello Nilesh

    Fist, make sure you are on Service Pack 5:

    http://scn.sap.com/docs/DOC-7824

    If that does not help, double check the parameter. Only reasons I know of why it would prompt are that it was not set, was set to wrong type or was set to wrong name.

    E.g.; what is the difference between that parameters that work and the one that does not.

    - Ludek

    Follow us on Twitter

    Got Enhancement ideas? Try the SAP Idea Place

    Share Your Knowledge in SCN Topic Spaces

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.