BusinessObjects Board

Multiple prompts in a BO report

HI ,

I have four prompts in a report. I would like to get results with just any one one of the four prompts being answered; the rest three prompts being null. I tried like 

     enter category?
     or
     enter year?
     or 
     enter article name?
     or
     enter city?

when i run the report just giving input to any one of the prompts, the OK button is not enabled. whereas when i put a blank space in rest three prompts then the OK button was enabled.
But i want the report to run without giving blank spaces. Please help me.

Thanks,
Sasi.


sasi_jan1981 :india: (BOB member since 2007-08-09)

In short, not possible … In DeskI it is not possible to leave prompts blank. Do a search here on BOB for “optional prompt*” or similar and you will find plenty of workarounds, including this FAQ entry from Designer. Feel free to continue the discussion in any of the other threads.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

I might have misunderstood earlier, null prompts are not allowed as indicated. But the work around i have applied is to pass in a ‘%’ as the default using macros. (My report has about 10 parameters apart from the date - i need to enter only the date along with just one parameter…so to take care of the rest i passin a ‘%’)Create a macro and in the visual basic editor type in the code. For example, here is how i used…hope this helps…

For i = 1 To ActiveDocument.Variables.Count
  If ActiveDocument.Variables.Item(i).IsUserPrompt = True Then
     If ActiveDocument.Variables.Item(i).Name = "City" Then
        ActiveDocument.Variables.Item(i).Value = "%"
     End If
     If ActiveDocument.Variables.Item(i).Name = "Category" Then
        ActiveDocument.Variables.Item(i).Value = "%"
     End If
End If
Next i

socl99 (BOB member since 2008-03-01)

Hi socl,

Thanks for your code. This workaround really helps me. The question i have is, The user should enter the value for any of the prompt and % in rest others is it?. why because the ok button is not enabled unless we give a value to all the prompts?. I don't know how to incorporate the code in the report.

Thanks,
Sasi.


sasi_jan1981 :india: (BOB member since 2007-08-09)

Hello !

First of all, Yes the button “OK” only enable itself if all prompts have a value on them, so yes each prompt should have been filled with a value.
Then now I am going to explain you how to add a macro in Desktop Intelligence.

  1. Open your report
  2. Click on “Tool” in the toolbar.
  3. Select Macro
  4. Then Macros again.

You can directly access to this interface by click on “Alt+F8”

  1. The Macros interface is displayed

On this interface you can manage all your macros.

  1. Write a name for your macro

As you can see when you did it the button “Create” enabled itself.

  1. Click on “Create”.

A Visual Basic interface is displayed. On this interface you can write / copy your code.

  1. Once you have written your code, close this interface.
  2. Go back on your report

As you can see, if you made “alt+f8” or repeat the actions : 2 to 5. Your macro is now listed.

Now if you want to execute them easily, follow those instructions:

Still on your report

  1. Click on “View” in the toolbar
  2. Select “Toolbars…”

A list of existing toolbars appears, check the box which is to the left of Visual Basic.

  1. Click on “Tool” in the toolbar.
  2. Select “Options”

The options interface is displayed.

  1. Click on the “macro” tab
  2. Check the checkbox close to “1” and click on the button labeled “…”

A list of existing macro will be displayed.

  1. Select the one you have just created before.
  2. Click on the “Select” Button.
  3. Then you are redirect to the options interface, your macro is now present in the “Macro name” field.
  4. Click “Ok”

Now that you are back on your report, you can execute your macro by click on the “1” button in the “Visual Basic” toolbar.

I hope it will help you

Cédric Paumard

DeskI & WebI Developer
BI Toolkit - Offices in UK and Holland
http://www.bitoolkit.com


[bitk]Cedric (BOB member since 2008-03-10)