Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Boolean and prompting

Status
Not open for further replies.

lous

Technical User
Mar 8, 2002
53
US
Hello,

In some of my reports, the items in the selection formula prompt you to enter any changes or just to use the default value.

I am having a problem doing this with boolean values. For example, I want to be able to change "false" to "true" in some cases, but when I run the report, it never prompts me for changes, just runs with whatever values it was set up with.

To clarify a bit more -- here's an example of my selection formula:

{Data.Item1}=false and
{Data.Item2}=false and
{Data.Item3}=false and
{Data.Item4}=false

When I run the compiled report, I'd like it to ask me whether I want to use "false" or change it to "true".

Can this be done? If so, how?

Thanks.
 
This requires the use of parameters, which your record selection formula doesn't have.

Try:

Insert->Field Object->Right click parameters and select New

Create 4 additional parameters this way, changing the type to Boolean, and also to make it friendlier to the users, select Set Default Values and add in True and False.

Now alter the record selection formula:

{Data.Item1}={?MyParmItem1} and
{Data.Item2}={?MyParmItem2} and
{Data.Item3}={?MyParmItem3} and
{Data.Item4}={?MyParmItem4}

Substituting your parameter names for {?MyParmItemX}

-k
 
To be prompted for a parameter, it has to be used in the report. Create a parameter named 'bool'as boolean (yes/no) datatype. Click on the 'Set default values' button and add 'true' and 'false' to the parameter list.

Your record selection formula should changed to this:
{Data.Item1}={?bool} and
{Data.Item2}={?bool}and
{Data.Item3}={?bool}and
{Data.Item4}={?bool}

Now, when the report is run, it will prompt the user for either true or false.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top