Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: CrystalReports
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 22:02pm
Comments
Prasad Khandekar at 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 at 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
good
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.,
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 245
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 Afzaal Ahmad Zeeshan 120
4 DamithSL 115
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 20 Oct 2013
Copyright © CodeProject, 1999-2014
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