override variables

User4677 (9 posts)
May 16, 2017 09:42 AM
Accepted Answer

Hello,

 

I'm using report commander 2.2 project editor, and I'm trying to execute in command line and override one variable but I always get missing parameters, looks like the override option does not work.

 

Any idea what can be the problem? 

 

 

Bill Staff (601 posts)
May 16, 2017 11:14 AM
Accepted Answer

We haven't had any reported problems with this. Please post the command line you're executing and the exact error you're getting. Also try running with the "-debug" option added to your command line (ahead of the variables) and review the output to see if that gives you any clues.

User4677 (9 posts)
May 16, 2017 11:17 AM
Accepted Answer

this is the line i'm trying to execute:

adrcexec -project="C:\SAP_TEMP\Crystal Report\PO\Auto-send\Send.rcproject" DocKey="4707"

 

Than I receive: 

Error Export failed: Missing parameter values.: Missing parameter values. Exception detail: CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Missing parameter values. ---> System.Runtime.InteropServices.COMException: Missing parameter values.   at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)   --- End of inner exception stack trace ---

Bill Staff (601 posts)
May 16, 2017 12:03 PM
Accepted Answer
Are there other parameters for the report? When you run it with the "-debug" option do you see it setting the value for the parameter that uses the DocKey variable?
User4677 (9 posts)
May 16, 2017 12:57 PM
Accepted Answer

This is the debug :

 

2017-05-16 11:31:32 Debug User ID: sa2017-05-16 11:31:32 Debug Applying connection information2017-05-16 11:31:32 Info Processing Output Group Output Group 32017-05-16 11:31:32 Verbose Setting parameters2017-05-16 11:31:32 Verbose Setting parameter DocKey@2017-05-16 11:31:32 Debug No value specified2017-05-16 11:31:32 Verbose Setting parameter ObjectId@2017-05-16 11:31:32 Debug Setting value to "22"2017-05-16 11:31:32 Info Processing Output Export

User4677 (9 posts)
May 16, 2017 12:58 PM
Accepted Answer
because in the line command it does not like special character I have to remove the @ on the command line, could it be that? 
Bill Staff (601 posts)
May 16, 2017 01:52 PM
Accepted Answer

It looks like you are trying to set a report parameter value from the command line, not a variable. You can only set variables on the command line. If your report has a parameter named "DocKey" and you want to be able to set the value from the command line, you must set the value of the parameter to a variable in the project, and then set the variable value on the command line.

For example, in your project, edit the DocKey parameter and set it to

${DocKey}

This sets the parameter DocKey to use the variable DocKey as its value. Now you can set a value for (the variable) DocKey on the command line, and that value will be used as the value for the DocKey parameter. (You can use any name for the variable--it doesn't have to be the same as the parameter name.)

If you want to be able to set parameters directly from the command line, you might want to use the Command Line Builder and Command Runner instead of the Project Editor.

User4677 (9 posts)
May 16, 2017 06:44 PM
Accepted Answer

I set a project variable, add ${DocKey} to the report parameters, I have 3 report to run in this project with same variable. 

When I run the project the first report get processed successfully but the other two I get missing parameters. I verify twice to make sure I added the variables and all is fine.

what I'm doing wrong?

User4677 (9 posts)
May 16, 2017 06:48 PM
Accepted Answer

never mind I found my mistake.

 

Thanks for you help! ;)

Replies are disabled for this topic.