Cascading parameters not populating AT ALL in ReportViewer control

Traitée Cascading parameters not populating AT ALL in ReportViewer control

  • 17 Agustus 2012 21:05
     
     
    I have built a report in MS Sql Server report builder.  The report has one cascading parameter which populates itself based on a previously entered parameter.  It is similar to this: 

    Param1: select distinct studentid from students

    Param2: Select distinct city from StudentAddress where studentid in (@param1)

    When I run the report in Report Designer everything works GREAT!  Unfortunately when I try to run it on my webpage via the ReportViewer control, Param2 is not populating.  

    Upon loading the page, the Param1 drop down box is populated and the Param2 drop down box is greyed out, which is exactly what happens in Report Builder.  Then after I select value(s) for Param1 the "Loading" box briefly comes up on the screen, but after it disappears the Param2 drop down box stays greyed out. 

    If I remove the where clause from Param2 everything runs great, the problem is that the cascading parameter never once populates. Thanks in advance for any help!

    SQL Server 2008 R2

    Windows Server 2008 R2 (IIS 7.5.7600)

    .NET Framework: 4.0

Semua Balasan

  • 17 Agustus 2012 21:25
    Penjawab Pertanyaan
     
     Saran Jawaban

    Hi Osr !

    You need to make sure following things;

    1) Set the Default value of your Parameter @Param1. If you are using dataset to populate this select StudentID from dataset query.

    2) Set the Default value of your Parameter @Param2. Since you are populating this from dataset select the city in your Default Value.

    Now, delete the Report using Report Manager URL and then re-deploy the report. Parameter definitions don't get refreshed by just re-deploying the report. So you need to first delete the report from your report server and then re-deploy.

    Please let me know if this helps. Hopefully i have answered you correctly.

    Thanks, Hasham Niaz

  • 20 Agustus 2012 19:30
     
     

    Thanks for your reply Hasham, but here is what is happening now: when I initially load the report it automatically runs the report with all of the default parameters.  After I let the report run, if I try to change any of the parameters all of the boxes grey out and then nothing happens...


    osro

  • 20 Agustus 2012 20:04
    Penjawab Pertanyaan
     
     Jawab Memiliki Kode

    HO Osr !

    Please try below;

    According to the below mentioned supprt KB from Microsoft;

    http://support.microsoft.com/kb/2661403

    ASP.NET requests that have lots of form keys, files, or JSON payload receive an error response from the server.

    Resolution : Add the following section in your Report Manager Web.Config file;

    <configuration>
      <appSettings>
        <add key="aspnet:MaxHttpCollectionKeys" value="1000"/>
      </appSettings>
    </configuration>

    Set the value to "2000" or bigger according to your requirement.

    Also, have a look at below MSDN thread;

    http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/80f399ca-1309-4bfc-8bde-8bbe1d57fa5e

    Please let me know if this helps. Hopefully i have answered you correctly.

    Thanks, Hasham