Link to home
Create AccountLog in
Avatar of aflman007
aflman007

asked on

Paramter Field in Crystal Reports

I want to create a Paramter field in my crystal report where the user will be prompted to enter a value that begins with the value rather than have to enter a full range of values.

for example the field Contains values such as 00000026.001, 00000026.002,00000026.003,00000026.004  I want to prompt the user to have to only enter the value 00000026 which will then get all the records needed to print.
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

You are asking for a CR report in SSRS?
Whats up?
Do you want to do this in SSRS or CR?
Avatar of James0628
James0628

There is a CR zone here:

https://www.experts-exchange.com/Database/Reporting_/Crystal_Reports/

 If this is really a CR report and not SSRS, you can use the "Request Attention" link and ask to have a moderator change the zone (assuming that you can't do it yourself).

 Whichever type of report it is, is the field numeric or character/string?

 Assuming that it's a CR report:

 If the field is string, you could use something like:

{your field} like {?parameter} + "*"


 If the field is numeric, will they only be entering the digits before the decimal, or could they enter something like 26.01 to get 26.010, 26.011, 26.012, etc.?

 Assuming that they'll only be entering the digits before the decimal, you could use something like:

{your field} >= {?parameter} and
{your field} < {?parameter} + 1


 James
Avatar of aflman007

ASKER

This is a CR report.

The field is string.  I tried using this in the formula editor and I get the following error:

A String is required here and it highlights the whole parts after like:

{to2PN.PNID} Like {?BN_ID} + "*"

What am I doing wrong
Did you make the parameter a string?

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of aflman007
aflman007

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
I know you say that you got it to work, but I'm curious what was causing the error.  Did the parameter allow a range?  That would probably cause that error.  Apart from that, it seems like it should have worked (assuming that you were entering that formula by itself for the record selection formula).

 And it seems like my first post gave you the solution (once you figured out whatever was causing that error).  Your last post definitely was not the solution.

 James
Finally got it to work as a string