Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 22 MAY 2020 10:23:33AM rdhull50 wrote:

I'm building reports using BRW (latest version that comes with OI 10.0.7).

I need to prompt the user for selection criteria.

This is the equivalent syntax for an R/List report

WITH ROLE = "STAFF" AND WITH CITY = ?"Enter City"?

for a simple select of one value.

or

WITH ROLE = "STAFF" AND WITH CITY = ?"Enter Cities"?…

for a more complex select of multiple Cities - the Ellipse (…) keeps prompting until the user hits enter at the "Enter City" prompt.

or

WITH ROLE = "STAFF" AND WITH STATE = ?"Enter State Code"? AND WITH CITY = ?"Enter Cities"?…

for an even more complex select with multiple prompts for different fields and multiple entries on one prompt.

How would I enter the equivalent syntax for these three scenarios in the VBScript editor?

(Note there is a reference to "Prompting Users for Parameters" in the OI BRW 10.0 Reference Guide, unfortunately, the actual explanation was omitted! Although I don't know if it would have explained for these scenarios.)


At 22 MAY 2020 12:10PM bshumsky wrote:

Actually, if I recall correctly, the BRW supports the exact same syntax. If you enter the question-mark delimited prompts for your selection criteria, you will be prompted with a message asking you to fill in the specified value.

Please give that a try and see if it works for you?

Hope that helps,

- Bryan Shumsky

Revelation Software, Inc.


At 23 MAY 2020 12:32AM rdhull50 wrote:

Bryan,

The VB Script is on the "Report.DataSource.Filter", which is where I presume it needs to be.

If I use the following prompt:

With Role = ?"Enter Role"?

I get the following error:

Error rendering report Length cannot be less than zero Parameter name: length

If I use the Script:

with Role = "STAFF"

Where "STAFF" is a valid role

Then it executes correctly.

………………………………………………..

Well, I did some playing around and got it to work. The syntax is a bit different.

Syntax for AREV64 - With Role = ?"Enter Role"?

Syntax for BRW - With Role = "?Enter Role?"

The ? and " are reversed.

The Ellipsis, however, do not work. e..g. With Role = "?Enter Role?"…


At 26 MAY 2020 08:54AM bshumsky wrote:

Bryan,

The VB Script is on the "Report.DataSource.Filter", which is where I presume it needs to be.

If I use the following prompt:

With Role = ?"Enter Role"?

I get the following error:

Error rendering report Length cannot be less than zero Parameter name: length

If I use the Script:

with Role = "STAFF"

Where "STAFF" is a valid role

Then it executes correctly.

………………………………………………..

Well, I did some playing around and got it to work. The syntax is a bit different.

Syntax for AREV64 - With Role = ?"Enter Role"?

Syntax for BRW - With Role = "?Enter Role?"

The ? and " are reversed.

The Ellipsis, however, do not work. e..g. With Role = "?Enter Role?"…

No, the ellipsis is not supported. Another difference, perhaps, from the old syntax is that you can specify the default value you want for the answer by using a "|" symbol - so the prompt might look like this:

WITH ROLE = "?Enter Role|STAFF?"

Hope that helps,

- Bryan Shumsky

Revelation Software, Inc.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/0ddefc129ec37846a07b9fc1e0324f52.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1