I have created a Quick Report (Crystal Report) that has a parameter {?Proyecto}. But in the report filter it does not recognize the input values with '_'.
How can I fix it?
I have created a Quick Report (Crystal Report) that has a parameter {?Proyecto}. But in the report filter it does not recognize the input values with '_'.
How can I fix it?
Hi
This is record selection formula right? Also are you passing the parameter as a text field? Maybe you could try TOTEXT(value) option.
Or you will have to break input string to identify special characters.
Hi
That’s right, it’s the record selection formula. These are my attempts:
But I don’t know how I can break input string to identify special characters.
Hi
{JT_TASK_UIV_CFV\.PROJECT_ID} underscore in this field shouldn't be a problem. Because i have done many reports with such parameter names.
Try printing both values ({JT_TASK_UIV_CFV\.PROJECT_ID} and {?Proyecto} ) in the report before filtering out and check whether they have similar format.
Because if project id is a number then {JT_TASK_UIV_CFV\.PROJECT_ID} should print something like 10213.00. Due to decimals this might not work.
You can avoid it by using ToText( ToNumber({JT_TASK_UIV_CFV\.PROJECT_ID}), "#").
So your condition would look like this
ToText( ToNumber({JT_TASK_UIV_CFV\.PROJECT_ID}), "#") = ToText ({?Proyecto})
This is how I normally troubleshoot this problem.
Hi
Both are the same format, string. The point is, it works with string like 'R4512', but not with 'AUU_2020'.
Might the solution have to do with some configuration in IFS Applications ?, or with the configuration of Quick Reports?
Hi
To clear out the confusion,
you are saying {JT_TASK_UIV_CFV\.PROJECT_ID} = 'AUU_2020' is not working right?
That’s right. The input value for the parameter, when the quick report runs, is AUU_2020, but then, the parameter loses the input value in then record selection formula due to underscore.
{?Proyecto} = ‘AUU_2020’
{JT_TASK_UIV_CFV\.PROJECT_ID} = {?Proyecto}
Hi
Removing the special character from both sides should work. i am not sure why it is not working.
It would be the best option for your scenario.
Try replacing with a space and then trimming both sides.
or follow below format
stringvar output := {TABLE_NAME.FIELD_NAME};
output := Trim(output); //get rid of leading & trailing spaces
output := Replace(output,Chr(13),''); //get rid of line feed character
output := Replace(output,Chr(10),''); //get rid of carriage return character
//add any other special characters you want to strip out.
Hi
Finally I could see the input value was arriving in the crystal report by replacing the underline with a '?', so I replaced the character '_' with '?' of the TABLE_NAME. FIELD_NAME in the selection formula and it worked.
Thank you very much for your time.
Hi
Finally I could see the input value was arriving in the crystal report by replacing the underline with a '?', so I replaced the character '_' with '?' of the TABLE_NAME. FIELD_NAME in the selection formula and it worked.
Thank you very much for your time.
Its good to know this.
Thanks for the effort. :)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.