473,785 Members | 2,641 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 1341

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

Similar topics

1
7759
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
9645
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...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10091
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
9950
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...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.