Skip to content

Using Crystal Reports

b h

Asked Nov 7, 2006, 7:48 AM EST2 answers
Share
LinkedInX

I am using VS 2003, C#.  I have been creating reports and using the report viewers in forms.  Very simple stuff so far.  I need to know how to dynamically change the selection criteria on the report based on other items in my form.  For instance, the user selects a date range, I want to modify the where clause in the report to reflect the date range entered.  Any help would greatly be appreciated.

Thanks

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Can you not change selection criteria on a Crystal Report?  That is my preferred route.  I want to use the Crystal Reports and Report Viewer if possible.
    0
  • Mahesh Chand
    0
    You can use Parameters to pass the values and filter your data based on the parameters passed to the report. See Crystal Reports section of this site on my Tip on How to pass parameters in a Crystal Report programmatically.

    If you are using a Stored Procedure (called from CR), then you may want to add parameters to SP and filter your data in SP.
    0