Wednesday, March 21, 2012

Error on generating report

I am using VS2003 and SQL Server 2000 with Reporting Services.

I try to generate the report but get an error "must declare the variable '@.qcode'

I check the file quotation.rdl and i found it should have declared... it's like

</PageFooter>
<ReportParameters>
<ReportParameter Name="qcode">
<DataType>String</DataType>
<Nullable>true</Nullable>
<DefaultValue>
<DataSetReference>
<DataSetName>DS_quot_code</DataSetName>
<ValueField>quot_code</ValueField>
</DataSetReference>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>Quotation Code:</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>DS_quot_code</DataSetName>
<ValueField>quot_code</ValueField>
<LabelField>quot_code</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>

I would like to know what trigger the problem and what shall i do so as to solve it?

Thank you.

This sounds for me like a SQL Exception not a Reporting Services error. Can you run the command which is specified as the dataset command separately, or does it come up with the same error (I guess this is the case)

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Thank you for your answer.

Does you mean that the problem comes from the SQL query stated in the rdl file?

|||Exactly.

No comments:

Post a Comment