SSRS file error message: The number of defined parameters is not equal to the number of cell definitions in the parameter panel
So it turns out that even if the parameter is hidden, it still need to have have a tag in the RDL file. I figured this out by testing another report to see how the RDL file behaved with a hidden parameter.
To correct the problem RDL file...
- I opened it in a text editor
- updated the
<ReportParametersLayout><CellDefinitions>
node to include a<CellDefinition>
node for each parameter (code below) - saved the file
- reopened the file in Visual Studio SSDT project, and then it worked! The report preview completed just fine.
Hope this helps someone else.
<ReportParametersLayout>
<GridLayoutDefinition>
<NumberOfColumns>4</NumberOfColumns>
<NumberOfRows>2</NumberOfRows>
<CellDefinitions>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>PmPROD_WHSEPROD_CODE</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>1</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>g_invtot</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>2</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>g_grdtotinv</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>3</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>g_totweight</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>1</RowIndex>
<ParameterName>g_grand_tot_wgt</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>1</ColumnIndex>
<RowIndex>1</RowIndex>
<ParameterName>g_grdtotwgt</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>2</ColumnIndex>
<RowIndex>1</RowIndex>
<ParameterName>g_totinv</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>3</ColumnIndex>
<RowIndex>1</RowIndex>
<ParameterName>g_totqtyonorder</ParameterName>
</CellDefinition>
</CellDefinitions>
</GridLayoutDefinition>
</ReportParametersLayout>
You can also remove the "ReportParametersLayout" tag from report xml file