Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2004, 03:56 AM
Authorized User
 
Join Date: Jun 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default drystal reports with asp.net

I am using Visual Studio Pro and have built in a Crystal Report
that is viewed under my asp.net webpage.

Question : I need to be able to pass the report a parameter
from the webpage. How can I programatically add a variable to my report that can be set by the webpage that creates the report?

I want to format my report based on the value of this variable.

Chhers.


 
Old October 14th, 2004, 04:02 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

you can create a parameter in your report and set the value of this parameter through code using the SetParameterValue method of the ReportDocument Class

   ReportDocument cr = new ReportDocument();
   cr.Load(strReportPath);
   cr.SetDataSource(DS.Tables["Customers"]);
   cr.SetParameterValue("StartDate", strMyParmValue);
   CrystalReportViewer.ReportSource = cr;


Regards
Ganesh





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 1.1,VB.NET,crystal reports, SQl server gvi Crystal Reports 1 September 11th, 2008 02:55 AM
reports in asp.net pradeep29 ASP.NET 1.0 and 1.1 Professional 3 May 31st, 2007 05:33 AM
ASP.Net with Crystal Reports jazzcatone ASP.NET 1.0 and 1.1 Basics 1 March 1st, 2006 01:11 AM
ASP.Net reports msrnivas .NET Web Services 0 April 12th, 2004 09:05 PM
Using Crystal Reports in ASP.NET jbenson001 ASP.NET 1.x and 2.0 Application Design 2 November 18th, 2003 10:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.