Page 1 of 1

About prompting user for variable

Posted: Mon Dec 06, 2021 9:29 am
by phuahmj
The report menu show File - Help:
StimulSoft Reports
Version 2020.2.3

I have a report query:
select user_name, phone_number from user_table where user_name is like '%&UserName%' and phone_number is like '%PhoneNumber%'
Have designed a string variable UserName and string variable PhoneNumber

Questions:
1. How to make UserName as mandatory field, i.e. the user must key in some value before clicking on the submit button?
2. How to put a format mask for PhoneNumber such that the user must key in at least 5 digits, but can be more than 5 digits?

Thanks for helping in advance

Re: About prompting user for variable

Posted: Mon Dec 06, 2021 9:35 pm
by Lech Kulikowski
Hello,

> 1. How to make UserName as mandatory field, i.e. the user must key in some value before clicking on the submit button?

You can use the RequestParameters=true property for the report.

> 2. How to put a format mask for PhoneNumber such that the user must key in at least 5 digits, but can be more than 5 digits?

You can use the Format="######" property for the variable.

Thank you.

Re: About prompting user for variable

Posted: Tue Dec 07, 2021 2:11 am
by phuahmj
1. Have set Requested Parameters as true.
But I can submit with blank in the variables.

2. Have put ##### in the Phone NumberNumber.
But it does not seem to stop me from keying non 5-digit input and click submit button.

3. Additional question.
When query using UserName and PhoneNumber with records, the page shows the result.
Subsequently with keying in UserName and PhoneNumber that has no records, the result does not get clear.
Is there any setting that I miss?

Thanks.

Re: About prompting user for variable

Posted: Wed Dec 08, 2021 8:39 am
by Lech Kulikowski
Hello,

> 1. Have set Requested Parameters as true.
But I can submit with blank in the variables.

It is not possible with parameters form.
As a way, you can add a new page with the message that parameters should be set, and show when values are empty.

> 2. Have put ##### in the Phone NumberNumber.
But it does not seem to stop me from keying non 5-digit input and click submit button.

Unfortunately, there is no other way with standard parameters panle. You can implement your own form with all your requirements and show it before viewer.

> 3. Additional question.
When query using UserName and PhoneNumber with records, the page shows the result.
Subsequently with keying in UserName and PhoneNumber that has no records, the result does not get clear.
Is there any setting that I miss?

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail?
Coudl you send us a sample report with test data that reproduces the issue for analysis?

Thank you.

Re: About prompting user for variable

Posted: Tue Dec 14, 2021 5:19 am
by phuahmj
Sorry, was pull to another project for the past few days.
I have documented the test data, requirement and screen shot in this Google Doc:
https://docs.google.com/document/d/1-9E ... sp=sharing

Hopefully it clears out the result that i am getting.
Thanks for the help in advance.

Re: About prompting user for variable

Posted: Wed Dec 15, 2021 11:31 pm
by Lech Kulikowski
Hello,

Please send us your request with detailed description on support@stimulsoft.com. We will check it and will reply to you by email fast as possible.

Thank you.