How to use the parameter field to get values from dataset in Crystal Reports?
How can I assign a SQL query to the parameter field?
Have a look at the article
Tip: How to pass Crystal Report Parameters Programmatically?
Related
I have a report where I have created a subreport that uses a parameter from the main report but that value in the main report returns multiple of the parameter. Is there a way to specify in the parameter to only pull a distinct value into the parameter?
You could write a Formula to filter out the parameters you don't want, then pass that entire Formula as a parameter to the subreport.
I need to supress a field in Crystal report based on a query result (true or false). Is there a way to specify the query in a variable and use that variable to create formula for supressing just a field value? Or do you suggest any other mechanism?
Please let me know.
#codematrix
I would suggest the following mechanism:
Create a 'shared' variable within a Formula field in the Report
Header area (or near the beginning of the report. Call it:
#QueryResult (or some other appropriate name) and define it as a
BooleanVar.
Create a sub-report and execute the query within the subreport and
set #QueryResult according based on the outcome.
Somewhere after the sub-report you can reference #QueryResult in a
Formula field and leverage it for subsequent logic.
Please let me know if this makes sense. I've used this technique in Crystal 7 up through XI.
Reference: http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.businessobjects.integration.eclipse.doc.crdesigner/reportdesigner/crconvariablescopecrystalsyntax.htm
Normally, I use Microsoft report and I can call parameter.
But for Crystal Report 2008 I want to call the report with a parameter to see the data from my bd on the report.
My report is bound to a data set.
Hope the following links will help you
How to pass parameter in crystal report using dataset in vb.net
Crystal Report Basics and Integration with DataSet
Display GridView in Crystal Report
Crystal Version - Crystal Reports 2008 Business Objects - XI
I have written a query to populate a subreport and want to pull in a parameter to that query based on input from a user. My question is, what is the correct syntax I need to put in the first line of the 'Where' clause to accept the parameter?
I created a parameter in Add Command it is called PickDate
Here is the query I am using in Crystal Reports:
select
table2.book_no,
table2.time_stamp,
table2.restdate,
a.timestamp,
a.event_type,
a.status,
a.people,
a.new_date,
a.comments,
a.operator_id
from table1 a, table2
where table1.book_no = table2.outage_no
I have tested the query, it is pulling all the data, now I just need help adding parameter to prompt user to enter datatime.
Did you try using the Select Expert in the subreport? You should be able to say field = {?PickDate}
Im using crystal report in asp.net....I have create parameter fields to get input....Consider if i create numeric parametere field then i have to validate that particular field if user enter other than numbers how?
You can validate parameter value before pass it to report and if its value was not valid show a message and don't preview report.