About prompting user for variable

Сonversation on different topics
Post Reply
phuahmj
Posts: 3
Joined: Fri Dec 03, 2021 2:58 am

About prompting user for variable

Post 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
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: About prompting user for variable

Post 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.
phuahmj
Posts: 3
Joined: Fri Dec 03, 2021 2:58 am

Re: About prompting user for variable

Post 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.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: About prompting user for variable

Post 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.
phuahmj
Posts: 3
Joined: Fri Dec 03, 2021 2:58 am

Re: About prompting user for variable

Post 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.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: About prompting user for variable

Post 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.
Post Reply