Crystal report parametr field validation - crystal-reports

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.

Related

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

Crystal Report - unable to use TEXT type as a parameter?

I am currently developing a website, asp.net 4.0 using crystal reports, I can view the report perfectly etc, however when trying to create parameters in the report I am unable to select or even view TEXT type fields in my database table when selecting a field to create the parameter from. Selecting string or integers etc work fine, but all TEXT type fields arent even visible.
Any ideas as to why this may be? I need to add a parameter from a TEXT field as we want to limit the results to all messages which contain a certain phraze, and that message is stored in a sql database as a TEXT type.
You have to convert Text type into varchar(max) and then it will be show.
Otherwise you have to add Custom Parameter field and read this value into the parameter and this parameter will drag on your report design page.
You will need to create a parameter that is a 'String' type.
Next, cast your TEXT value to different type using a SQL Expression:
//{%converted_text}
(
cast( TEXT AS varchar2(255) )
)
You may need to adjust the syntax (I'm using Oracle's).
Finally, reference each in the record-selection formula:
{%converted_text} = {?text_prompt}

How to validate parameter values against a data source in Crystal Reports 2008

I have a report designed in Crystal 2008. The report has a parameter field called "Member ID" that I want to use to get a string input from the user running the report. However, I want to do some sort of validation to ensure that the ID they entered is valid (it exists in a database table that I already have set up). Is there any way to do this?
I know you can set up dynamic parameters that would give the user a dropdown list of Member ID values to choose from based on the data stored in my database table. But I don't want to make the user sort through thousands of IDs in a dropdown. I just want them to manually enter an ID and then have the report check the entered value against a database table.
Is this possible?
You could just create a record selection criteria on your report and pre-limit it to just the valid IDs.
If you are using some stored proc where you pass this parameter and then get the result, then definately you can have a section where you print "no data found" or similar message if recordcount is zero, otherwise you can just display the information for that id.
My experience with crystal reports is that we should have more and more recrod fetching logic on the server then on the client. It will speed up the processing.
Regards
Parminder

Parameter field in Crystal Reports

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?

Crystal Reports: How do I allow "set to null" when prompting for values to pass to subreports?

I have created a report which links into subreports. I created parameter fields to feed into the parameters of the subreports using subreport links.
If I do not add a subreport link and therefore the subreport is prompting for the value directly it will allow the set to null option. However, if the enter value prompt is being generated from the parameter field I inserted then the set to null option is not displayed.
I have 12 subreports so I can't prompt for the same values 12 times.
I am using Crystal Reports XI designer and not .net
set up formulas with nothing in them (null values) to pass to the subreports
In XI, I've only seen the 'Set to Null' option when the report uses a stored procedure as its data source. Is this the case for your subreport?
Usually, subreports are linked to fields in the main report so that the user isn't prompted repeatedly (once for each time the section that contains the subreport is rendered). If they are linked, the only prompting that will be encountered it that of main report.
Crystal Reports XI parameter fields (created in the UI, not the result of a SP) do not have a 'Set to Null' option. As a result, each parameter will need to have some value.
You may want to have a look at my Crystal Reports: Optional-Multi-Select Parameters posting on how you can add some optional values to your parameters.