473,769 Members | 6,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

get parameter from one page to next into ObjectDataSourc e

6 New Member
and another problem which just wont work as I planned..

I created an aspx site (report) as follows:

Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Report.aspx.cs" Inherits="Report_Report" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml" >
  6. <head runat="server">
  7.     <title>Report</title>
  8. </head>
  9. <body>
  10.     <div style="text-align:center;">
  11.         <form id="dateInput" name="dateInput" action="showReport.aspx" method="post">
  12.         Please enter start date of report&nbsp; &nbsp;
  13.         <input id="startDate" name="start" type="text" style="width: 165px" /><br />
  14.         Please enter end date of report&nbsp;&nbsp; &nbsp;
  15.         <input id="endDate" name="end" type="text" style="width: 165px" /><br />
  16.         <br />
  17.         <br />
  18.         <input id="Submit1" type="submit" value="submit" /></form>
  19.         &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
  20.         <input id="Reset1" type="reset" value="reset" />
  21.         </div>
  22. </body>
  23. </html>
the form is posted to showReport that looks like this:


Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#"%>
  2. <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
  3.     Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
  4.  
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6.  
  7.  
  8.  
  9.  
  10. <html xmlns="http://www.w3.org/1999/xhtml" >
  11. <head runat="server">
  12.     <title>Report</title>
  13.  
  14. </head>
  15. <body>
  16.     <form id="form1" runat="server">
  17.     <table align="center" style="width:950px; height:650px;" id="Table_top">
  18.         <tr>
  19.             <td align="center" class="Banner" id="headlogo" style="width: 941px; height: 119px;">
  20.                 <div id="banner-top">
  21.                     <div class="block block-block" id="block-block-2">
  22.                         <div class="blockinner">
  23.                             <div class="content">
  24.                                 <p>
  25.                                     <a href="http://?????">
  26.                                         <img alt="???" src="../images/xxx.jpg"
  27.                                             width="902" id="IMG1" onclick="return IMG1_onclick()" /></><br />
  28.                                     </a></p>
  29.                             </div>
  30.                         </div>
  31.                     </div>
  32.                 </div>
  33.             </td>
  34.         </tr>
  35.         <tr>
  36.         <td>
  37.             <div style="text-align:center;">
  38.         &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
  39.         </div>
  40.         </td>
  41.         </tr>
  42.         <tr>
  43.         <td style="background-color:#FFFFFF; text-align:center;">
  44.         <div>
  45.             &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<br />
  46.                                     <rsweb:ReportViewer ID="ReportViewer1" ShowPrintButton="true" SizeToReportContent="true" runat="server" Font-Names="Verdana" Font-Size="8pt"
  47.                                         Height="900px" Width="800px">
  48.                                         <LocalReport ReportPath="Report\Report.rdlc">
  49.                                             <DataSources>
  50.                                                 <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1_guest" />
  51.                                             </DataSources>
  52.                                         </LocalReport>
  53.                                     </rsweb:ReportViewer>
  54.                                     <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" TypeName="DataSet1TableAdapters.guestTableAdapter" SelectMethod="GetDataByArrival">
  55.                                        <SelectParameters>
  56.                                         <asp:Parameter Name="startDay" />
  57.                                         <asp:Parameter Name="endDay" />
  58.                                         </SelectParameters>
  59.                                         </asp:ObjectDataSource>
  60.                                     &nbsp;
  61.             &nbsp;<br />
  62.     </div>
  63.     </td>
  64.     </tr>
  65.     </table>
  66.     </form>
  67.     &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
  68. </body>
  69. </html>
the Method 'GetDataByArriv al' has two parameters: startDay and endDay I tried to use selectparameter but I just cannot get the form values into the selectparameter my report just does not fill with the required information. If I use the 'GetData' method my report is shown no problem and if I specify some default values for the 'SelectParamete rs' the report is shown as well ...

Thanks in advance for any help.

Kat
Nov 14 '07 #1
0 1340

Sign in to post your reply or Sign up for a free account.

Similar topics

1
7758
by: | last post by:
Hi, I've defined an ObjectDataSource and a parameterized DataSet. I would like it if I could pass the parameter value that describes the query that creates the DataSet as part of a user control declaration. Here's how the parameter is described in the context of my ObjectDataSource: <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetArticlesByWhomever" TypeName="WhateverTableAdapters.WhateverTableAdapter">
2
3826
by: Damon | last post by:
Help! Need this fixed ASAP. I have a GridView/DetailsView master/details form set up, with both bound to separate ObjectDataSource objects. Both the GridView and the DetailsView have a DataKeyNames parameter of "UserCompany, BillableCompany". The DetailsView has control parameters for its select method pointing to these two keys on the GridView. But the select method function receives two copies of the UserCompany field! The...
1
1601
by: misiek | last post by:
Hi all. I have a problem with setting value of some parameter in select command in ObjectDataSource. This is what I did: 1. I created DataSet in designer using some stored procedure, which expects exactly one parameter. Also there was a "Return a data table" method created. 2. I dragged ObjectDataSource to my web page and configured it to use method I created in pont 1.
3
3041
by: Jeff | last post by:
Hey ASP.NET 2.0 This the ObjectDataSource in my UserControl, <asp:ObjectDataSource ID="odsMessage" runat="server" SelectMethod="ExecuteMessage" TypeName="AH.MyNetwork.BLL.Network.Message"> <SelectParameters> <asp:ProfileParameter Name="user" PropertyName="UserName"
0
9590
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10000
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.