TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vaquas khan
NA
45
0
crystal report and .aspx page
Jan 27 2010 7:05 AM
My aspx page ............................
<form id="form1" runat="server">
<div>
<asp:Panel ID="Panel1" runat="server">
<table class="style1">
<tr>
<td class="style2">
<asp:Label ID="Label1" runat="server" Text="Choose Employee ID :"></asp:Label>
</td>
<td class="style3">
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource1" DataTextField="EmployeeID"
DataValueField="EmployeeID">
</asp:DropDownList>
<asp:CheckBox ID="CheckBox1" runat="server" Text="All" />
</td>
<td class="style4">
</td>
<td class="style5">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:MyDatabaseConnectionString %>"
SelectCommand="SELECT [EmployeeID] FROM [Employee]"></asp:SqlDataSource>
</td>
<td>
</td>
</tr>
<tr>
<td class="style2">
<asp:Label ID="Label2" runat="server" Text="Select From Date :"></asp:Label>
</td>
<td class="style3">
<ew:CalendarPopup ID="CalendarPopup1" runat="server" />
</td>
<td class="style4">
<asp:Label ID="Label3" runat="server" Text="Select To Date :"></asp:Label>
</td>
<td class="style5">
<ew:CalendarPopup ID="CalendarPopup2" runat="server" />
</td>
<td>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Show Report" />
</td>
</tr>
</table>
</asp:Panel>
</div>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
AutoDataBind="True" EnableParameterPrompt="False" Height="1121px"
ReportSourceID="CrystalReportSource1" Width="878px" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="Crystal Report\CrystalReportParameter.rpt">
</Report>
</CR:CrystalReportSource>
</form>
code behind file...................................
Button1_Click code....
CrystalReportViewer1.Visible = true;
CrystalReportSource1.Report.FileName = Server.MapPath("Crystal Report/CrystalReportParameter.rpt");
ParameterDiscreteValue objDiscreteValue;
ParameterField objParameterField;
//Set value for first parameter
objDiscreteValue = new ParameterDiscreteValue();
objDiscreteValue.Value = CalendarPopup1.SelectedDate;
objParameterField = CrystalReportViewer1.ParameterFieldInfo["@FromDate"];
objParameterField.CurrentValues.Add(objDiscreteValue);
CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField);
objParameterField = CrystalReportViewer1.ParameterFieldInfo["@ToDate"];
//Set value for second parameter
objDiscreteValue = new ParameterDiscreteValue();
objDiscreteValue.Value = CalendarPopup2.SelectedDate;
objParameterField.CurrentValues.Add(objDiscreteValue);
CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField);
//Set value for Third parameter
objDiscreteValue = new ParameterDiscreteValue();
objDiscreteValue.Value = DropDownList1.SelectedValue;
objParameterField = CrystalReportViewer1.ParameterFieldInfo["@EmployeeID"];
objParameterField.CurrentValues.Add(objDiscreteValue);
CrystalReportViewer1.ParameterFieldInfo.Add(objParameterField);
CrystalReportViewer1.ReportSourceID = "CrystalReportSource1";
}
when i run the page ....set the parameter value and click the Show Report......then i see everything fine....
but when i try to change the parameter value and then click the Show report its give the previous value how i can solve this problem.....please help me..................
Reply
Answers (
3
)
how to add different images to an image control with in a repeater control
how to put Captcha in registration form