Dynamic Dependent Parameters in Crystal Report - crystal-reports

I am looking to create a report based on two parameters, VENDOR and PONUMBERS.
I would like to create the report in such a way that on loading report when we choose a vendor
as First parameter it should show just the PONUMBERS for that vendor on second parameter. Is it possible in Crystal Reports ?

yes its possible...
While creating a parameters use dynamic parameters not static from the dropdown
select first parameter as Vendor and second parmeter as PONumber.
Now when you refresh the report second parameter will be filtered as per the selection of first parameter.

Related

Multiple Parameters in crystal report

I have created a crystal report layout with 3 parameter.
The 3 parameters are
1.) Date range
2.) Supplier
3.) Location code
User will always give input to the date range but will select either of these remaining two parameters based on the usage.
Is it possible to configure in one single report with optional option in Crystal layout
Assuming you are not using a very old version of Crystal, when you create or edit a parameter, look at the list of parameter properties: one of them is 'Optional Prompt' -- simply change it from the default of False to True.
Then, in your record select logic you can use the HasValue() function to check whether the user provided a value for that parameter.

Filter Section in Crystal Report

I am creating report in SAP crystal report 2013. In SSRS their is a separate section for filter parameters. Can I have that sort of Search Criteria section in crystal report. Basically I want to provide the date and other inputs and clicking "Refresh" button it should fetch data from the database according to the inputs provided. Can someone please suggest some link/documentation on how to add a filter area in a report.
As correctly said by #Arvo you need to use parameter fields but most important you need to use those parameters in Record Selection Formula to retrive the required data. This will make sure that selected data is only retrived by that performance increases
For E.g create a parameter ID and now to to record selection formula by Report -> selection formulas -> record and write the condition as
databasetable. id ={?ID}
Then only the required data selected through parameter will be retrived else full data will be retrived from database

Ssrs run only one of the subreports based on parameter

I have a report, and the report has 5 subreports. There is a parameter named "SubreportNumber". I want to run one of the subreports, based on that parameter. Just one of them should run. Effectivity is important in my case. Is this possible?
I'm using an IIF statement to hide (using visibility) my reports based on a parameter value, as described above.
Then I take the same approach when specifying the sub-report parameters.
This can basically be done on any one of the parameters, if the report should be showing then pass the parameter, else pass nothing. (If you pass NOTHING as a parameter to the report, it won't run the report, ie. performance increase...)
Example for Year parameter below:
=IIF(Parameters!SubreportNumber.Value = "1","YEAR(NOW)", Nothing)
You can hide the reports you dont want based on your parameter.
To do this: Go the Report's property, under visibility section. Set Show or hide report based on expression. You can write an expression to hide report depending upon your parameter.
This will just hide the reports. Make sure there are no stored procedure or they will be execute irrespective or whether the report is visible or not.

Crystal Reports - One report that lets user select from multiple reports

I need to "merge" 3 big reports.
Is it possible to just create a drop down menu that lets the user select which report to view?
Then just put all 3 reports into one as sub-reports?
Thanks
You could:
create a dummy main report
embed each of the 3 reports as a sub-report
create a pick-list parameter that allows a person to select one of the reports to be shown
suppress sub-reports that aren't in the parameter's chosen value
** edit **
In addition, create the necessary parameter fields in the main report, then link them to the corresponding parameter fields in each sub-report. This will eliminate the report from prompting repeated for each parameter.

Iterate through data table in Crystal Report

How can i create function to iterate through datatable to read value from table
e.g
Function GetVal(integer id)
//iterate here and match value from table using id
return value;
and call this function on report field
i am using crystal report 11
any clues??
Option 1: Make your function (or equivalent SQL query) outside of Crystal and link to it like any other source. The practicality of this option depends on the details of your report.
Option 2: Crystal doesn't have a built-in Get() function that I can find. So, you'll have to get creative with subreports. For example, let say's say you want to get {TargetFld} from {LookupTable} based on {CriteriaFld}:
Make a subreport. Use {LookupTable} for your data source.
When entering subreport links, choose {CriteriaFld}.
In your subreport, make a formula. Use it to create a Shared variable and set the value to whatever value you want to pass back to the main report.
Position the subreport 1 section above the section where you need to use this value. (Otherwise it won't evaluate when you expect it to).
Create the Shared variable in the main report.
Use it as normal.
If you're not familiar with subreports or shared variables, I suggest first looking them up in the Crystal help files (F11). This will make alot more sense that way.