Click here to Skip to main content
15,888,610 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to find in useful/unnecessary files from website folder ??? Pin
Abhishek kumar1213-Oct-14 6:07
Abhishek kumar1213-Oct-14 6:07 
AnswerRe: How to find in useful/unnecessary files from website folder ??? Pin
ZurdoDev3-Oct-14 6:53
professionalZurdoDev3-Oct-14 6:53 
AnswerRe: How to find in useful/unnecessary files from website folder ??? Pin
jkirkerx3-Oct-14 11:21
professionaljkirkerx3-Oct-14 11:21 
Questionwhy onblur Event Dosent Work For Div Element ??????????? Pin
mhd.sbt3-Oct-14 6:03
mhd.sbt3-Oct-14 6:03 
AnswerRe: why onblur Event Dosent Work For Div Element ??????????? Pin
Richard Deeming3-Oct-14 6:31
mveRichard Deeming3-Oct-14 6:31 
GeneralRe: why onblur Event Dosent Work For Div Element ??????????? Pin
mhd.sbt5-Oct-14 10:59
mhd.sbt5-Oct-14 10:59 
GeneralRe: why onblur Event Dosent Work For Div Element ??????????? Pin
Praneet Nadkar5-Oct-14 19:52
Praneet Nadkar5-Oct-14 19:52 
QuestionI am stuck on this error now for two days - value cannot be null: Parameter name: reportParameters Pin
samflex3-Oct-14 2:58
samflex3-Oct-14 2:58 
Hopefully, I am posting on correct forum.

I have a report with a parameter called loc.

The intended purpose of the report is to allow users to select a location from the dropdownlist and then records associated with that location are displayed to the users.

The dropdownlist is getting populated with values just fine.

However, when I select a location from the dropdownlist, I get an error that says:

Value cannot be null. Parameter name: reportParameters

Everything works fine when I pass a value as textbox but not as dropdown.

Any ideas what I am doing wrong?

Below are relevant code.

PHP
'---Dropdownlist control
<asp:Panel runat="server" ID="pnlLoc" Font-Names="Calibri" BorderStyle="Solid" BorderWidth="1" Style="margin: 0 auto; width:300px;">
            <table>
                <tr>
                    <td>
                        <asp:Label runat="server" ID="lblLoc" Text="Location: " />
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="ddLoc" DataSourceID="dslocator6" AutoPostBack="True">

                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
         </asp:Panel


PHP
--Report viewer control
  <rsweb:ReportViewer ID="ReportViewer1" runat="server" AsyncRendering="true" SizeToReportContent="true" Font-Names="Arial"
       Height="675px" Width="750px">
       <LocalReport EnableExternalImages="true" ReportPath="">
       </LocalReport>
   </rsweb:ReportViewer></center>
    <asp:ObjectDataSource ID="LOC" runat="server" SelectMethod="GetData" TypeName="ManageReportsTableAdapters.searchBylocationsTableAdapter">
     <SelectParameters>
       <asp:ControlParameter ControlID="ddLoc" Name="Location" DefaultValue=" " />
     </SelectParameters>
    </asp:ObjectDataSource>


PHP
--This code populates the ddLoc dropdownlist
    Protected Sub btnLoc_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnLoc.Click
    ReportViewer1.LocalReport.ReportPath = ""
    pnlLoc.Visible = True
    which.Value = "P"
    dslocator6.SelectCommand = "SELECT location FROM Locations ORDER BY [location]"
    ddLoc.DataTextField = "location"
    ddLoc.DataValueField = "location"
   End Sub


PHP
Sub Run_Report(ByVal sel As String)
  ReportViewer1.Reset()
  ReportViewer1.LocalReport.DataSources.Clear()
  Dim params(0) As ReportParameter

  ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("locs", LOC.ID))
  ReportViewer1.LocalReport.ReportPath = "locations.rdlc"
  ReportViewer1.LocalReport.Refresh()
  params(0) = New ReportParameter("loc", sel, False)
  ReportViewer1.LocalReport.SetParameters(params) '<-- error points to this line

 End Sub


I have been stuck on this for two days. Your assistance is greatly appreciated.
AnswerRe: I am stuck on this error now for two days - value cannot be null: Parameter name: reportParameters Pin
ZurdoDev3-Oct-14 7:05
professionalZurdoDev3-Oct-14 7:05 
AnswerRe: I am stuck on this error now for two days - value cannot be null: Parameter name: reportParameters Pin
suppubale4-Oct-14 1:57
suppubale4-Oct-14 1:57 
Questiondelaying data load for a repeater on web form Pin
pmcm3-Oct-14 2:24
pmcm3-Oct-14 2:24 
QuestionBeginner Pin
tarun 922-Oct-14 9:40
professionaltarun 922-Oct-14 9:40 
AnswerRe: Beginner Pin
Richard MacCutchan2-Oct-14 21:47
mveRichard MacCutchan2-Oct-14 21:47 
AnswerRe: Beginner Pin
Suraj Sahoo | Coding Passion3-Oct-14 8:32
professionalSuraj Sahoo | Coding Passion3-Oct-14 8:32 
AnswerRe: Beginner Pin
suppubale4-Oct-14 1:49
suppubale4-Oct-14 1:49 
AnswerRe: Beginner Pin
Swinkaran5-Oct-14 12:22
professionalSwinkaran5-Oct-14 12:22 
AnswerRe: Beginner Pin
Dominic Burford8-Oct-14 3:56
professionalDominic Burford8-Oct-14 3:56 
QuestionHow do I POST back a specific header Pin
Wombaticus30-Sep-14 2:41
Wombaticus30-Sep-14 2:41 
AnswerRe: How do I POST back a specific header Pin
jkirkerx30-Sep-14 9:24
professionaljkirkerx30-Sep-14 9:24 
GeneralRe: How do I POST back a specific header Pin
Wombaticus30-Sep-14 22:42
Wombaticus30-Sep-14 22:42 
GeneralRe: How do I POST back a specific header Pin
jkirkerx1-Oct-14 5:53
professionaljkirkerx1-Oct-14 5:53 
QuestionRegarding PDF Converted file Pin
Member 1105767029-Sep-14 21:14
Member 1105767029-Sep-14 21:14 
AnswerRe: Regarding PDF Converted file Pin
ZurdoDev2-Oct-14 5:42
professionalZurdoDev2-Oct-14 5:42 
QuestionJavascript logic causes the page to be stuck Pin
ThetaClear29-Sep-14 8:32
ThetaClear29-Sep-14 8:32 
AnswerRe: Javascript logic causes the page to be stuck Pin
Richard Deeming29-Sep-14 9:14
mveRichard Deeming29-Sep-14 9:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.