ssrs error variable name '@pCNum' has already been declared. variable names must be unique within a query batch or stored procedure. "

  • In an existing SSRS 2008 report, I am getting the following error message when I run the ssrs report:

    "query execution failed for dataset 'getMilestones'. The variable name '@pCNum' has already been declared. variable names must be unique within a query batch or stored procedure. "

    The parameter called 'pCNum' is the only paramter by that name that I can see. This is a cascading paramter. There are at least 2 parameters that reference 'pCustomerNumber'. Thus I am not certain what could be wrong. Could the order of how the parameters str declared make a difference?

    Would you let me know what you think is wrong so that I could try to resolve this issue?

  • Not enough info to really help. Unfortunately we can't see what you see. May help if you post the procedure that is being run for this report.

  • Are you declaring @pCNum in the dataset code?

    In SSRS you don't declare the parameter in code. That's how BIDS determines it's a report parameter.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply