Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Comments
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.
Sumon562 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

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.,
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900