Click here to Skip to main content
13,045,790 members (45,573 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I can pass parameter from SQL QUERY to create crystal report. But in crystal report we can create parameters. When should we create parameter from crystal report instead of sql query. Which is the best. Please discuss details with example as I am new in crystal report.
Posted 23-Apr-13 21:02pm
Prasad Khandekar 24-Apr-13 3:23am
I think you are getting confused between these two parammeters. The query parameters are generally used to filter out data. The crystal report parameters are used to supply the filter values to be used in the query written inside the Crystal Report Definition.

If we do not have such a mechanism then all queries inside Crystal Reports will become kind of static/fixed queries, Which may render them useless.
Mohi Uddin Sumon 24-Apr-13 5:34am
Thank you Mr.Prasad Khandekar for your kind response. If you explain details it will be better for me.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The difference is using SQL query you could only filter data but Parameter fields not only filter data, you could do some dynamic things like show/hide fields, etc.,
Agree with Prasad. Using Parameter fields you could filter the data easily & dynamically. Let me show you few examples.
C# Crystal Reports String parameter[^]
C# Crystal Reports Integer parameter[^]
C# Crystal Reports Date parameter[^]
C# Crystal Reports - Date to Date[^]
And you can't use SQL query way in PUSH method(C# Crystal Reports without database[^]), there you need parameter fields.
Also you could use parameter fields with other fields like formulas, etc.,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 20 Oct 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100