StackUseR
StackUseR

Reputation: 958

Error while preveiwing the SSRS Report

I have just started to learn SSRS. I'm using Visual Studio 2008 and SQL Server 2008. I have done all the basic things to create a table. But I'm getting this error while previewing.

Error Message

This is my query:

SELECT        
    RegisterNumber, StudentName, CollegeName, CollegeCode, 
    DegreeName, YearSem, GroupName, SubGroupName, 
    SubjectName, SubjectCode, TheoryMarks, 
    TheoryMin, TheoryMax, TheoryTotal, 
    TheoryIAMarks, TheoryIAMin, TheoryIAMax, TheoryIATotal, 
    TheoryNetTotal, PracticalMarks, PracticalMin, PracticalMax, 
    PracticalTotal, PracticalIAMarks, PracticalIAMin, 
    PracticalIAMax, PracticalIATotal, PracticalNetTotal, 
    VivaVoice, VivaVoiceMin, VivaVoiceMax, SubjectTotal, 
    SubGroupTotal, GroupTotal, TotalMarks, SubjectMin, 
    SubjectMax, SubjectCredits, SubjectGPA, SubjectGPW, 
    MarksPercent, AlphaSign, SemesterTotal, 
    IsSemesterPass, Remarks
FROM
    UGFinalResultTable_Nov2015
WHERE        
   (RegisterNumber = @RegisterNumber)

While I run the query in the query designer pane, it works fine and shows up the correct report. But while preview it shows that error. Can anyone guide me with that? Thanks in advance. This are my Report Parameters:

Report Parameters

And here is the filter that I provided:

Filters

When I set the Parameter properties like this:

Available Values: None

and

Default values: No default value

than there is no error message. But neither the report is shown. Here is how the output looks like with this setting:

Preview without parameter setting

Upvotes: 0

Views: 98

Answers (1)

SuperSimmer 44
SuperSimmer 44

Reputation: 999

The report parameter needs to have its own separate dataset and NOT the same as the main report. You may use the same SQL code but label this as dataset_param for example and use this as a dataset source for your parameter.

Upvotes: 1

Related Questions