BusinessObjects Board

1 document to satisfy BCA and Interactive

Hi chaps…
i’m sure this subject has cropped up many times before , but before I do what B.O. are asking me to do and submit an enhancement request I thought i’d ask the brains trust.

I want to create a single document that has the ability to either
a) prompt the user for a date range if the document is run interactively
or
b) run automatically with a given date range if the document is run on the BCA

For example , it might be the 22nd of the month , and I want the BCA version to run between the 1st and the 22nd. However , the user might want to run specifically the 3rd to the 12th for example.

I don’t want to have duplicates of all my documents to deal with these situations
have there been previous topics that deal with this


richmona :australia: (BOB member since 2003-04-15)

One suggession, you can still publish the document to BCA with the date prompt, when u schedule it BO will ask u the prompt value, the value u enter here will be the value BCA use to run the report, until someone re-publish it.
Users can retrieve this report and run it interactively, and they will be prompted for dates again, now the user can enter whatever date they want, but will not affect the document scheduled in BCA.


LK32 :hong_kong: (BOB member since 2003-12-08)

thanks for that , but the BCA report is issued once , and then runs every day automatically running from the 1st of the month to the current day


richmona :australia: (BOB member since 2003-04-15)

Or be just a bit more clever with the use of and OR statement.

Without being too specific. Build a condition that does something like

Date between <start_of_month> and <today> and @variable('BOUSER') = 'BCAUSER' OR
Date between @prompt('Begin Date'......) and @prompt('End Date'.....) and @variable('BOUSER') <> 'BCAUSER'

It’s late where I am and I don’t have my syntax correct. But you get the idea.

If you use a single userid for submitting your jobs to the BCA, then the prompts will be ignored when that user refreshes the reports. When you submit the job, you will have to fill in the prompts, but they will NEVER get used.

Answer back if you don’t understand this.


Steve Krandel :us: (BOB member since 2002-06-25)

Thanks Steve… that all makes sense.
The assumptions being that I create a predefined condition for this , and that BCA is set to run documents using a single user and not the user of the sender ??


richmona :australia: (BOB member since 2003-04-15)

Close. The assumption is that the Sender is always BCAUser. Reports always run with the id of the sender on the BCA.


Steve Krandel :us: (BOB member since 2002-06-25)

Houston I hear you

So the only thing that cannot be done , is an example where the user wants to run the document for a specific date range , but they want to run it on the BCA

Thanks for your help Steve


richmona :australia: (BOB member since 2003-04-15)

Sure. That will work. The user will run the report via the BCA and the prompts will be used. I believe regular, scheduled corporpate docs shouldn’t be scheduled by regular users anyway.


Steve Krandel :us: (BOB member since 2002-06-25)

Can you hear that noise ?

Clink

That’s the penny dropping.

I didn’t read your first response well enough.
Set up a user called BCAUSER and use that to issue all your standard BCA reports.
Sweet !!

I’m surprised that Business Objects haven’t introduced a Boolean @VARIABLE called BCA that allows you to determine whether it is the BCA that is running the document or not. Sure beats introducing specific users to get around the problem.
Maybe I will send the enhancement request as well.

Thanks for your help Steve.


richmona :australia: (BOB member since 2003-04-15)

I hope I understand your problem correctly. We also have documents that are used randomly by users everyday and in our BCA. We created special predefined conditions to accommodate this:

your_date = 
    Decode(@Prompt('Specify your date (format ddmmyyyy) or 0 for sysdate','A',,mono,free), 
      '0', Trunc(SysDate),
      To_Date(@Prompt('Specify your date (format ddmmyyyy) or 0 for sysdate','A',,mono,free),
    'DDMMYYYY')
  )

For normal use you specify the date you want and for the BCA you specify 0 and the sysdate is used (or some other specific date).

Works great for us,
HenkK


HenkK :netherlands: (BOB member since 2004-03-02)

My situation is a little different. Our end users donot have direct access to BO reports. We have an application that presents the GUI to the users, the users make their choices and hit the ‘submit’ button. Our application captures all the selections (prompts in BO language) and feeds them to the report through SDK, refreshes the report and presents the html view of the report.

Now, the user might want to save the prompts and have the report run every month after the data is loaded into the datawarehouse and have the report emailed to him. Each user can have different prompts chosen for the same report. If this report is scheduled to be run using the BCA, can the prompts be read from the database and fed to the report ?

We cannot have a predefined prompt in the universe in this case.

Please help !

thanks
PC


pc (BOB member since 2005-03-02)

Why built it yourself with SDK :?: That’s quite a challenge :!: You need to save the prompt values for each user for each report in one or more tables in your database.
And BCA does this sort of thing right out of the box :lol: . You might not have the flexibility of SDK, but then use SDK for the very special scheduling requirements that cannot be met with by BCA. I think you need to look at the capabilities of BCA before starting with SDK.

HenkK


HenkK :netherlands: (BOB member since 2004-03-02)

Hi,

I have a similar problem with BCA scheduling. But My problem is, i have multiple prompts and it is not date specific. It has prompts like customer id, unit id, affiliate id and country id.

How do I go about scheduling the report through BCA and how will BCA know which data it needs to change to? How can I make the value selection dynamic?

Thanks for the help in advance.

regards

Jayashree


jayashree.r (BOB member since 2007-06-29)

You have to think about what to automate, if there is nothing then the BCA is not the best option for you.
You might think of running a report every week with customers that are paying too late, or orders that are overdue.

HenkK


HenkK :netherlands: (BOB member since 2004-03-02)

You can make the report dynamic with a macro.

The following macro is called by the bca and save the reports in a particalar directory in PDF.

The prompt in this report are filled by a macro. But this macro is using the XML file as input for prompt and will loop for each row in the XML file (the attachement first part is the macro second part is the XML file)

Also a second sub is defined in this macro to make the date dynamic for the report.

When you add an extra row or change a row in the xml-file the bca will follow the new prompts. So rescheduling of the BCA is not necessary.

Regards, Gerrie
VB macro and XML.txt (3.0 KB)


gvdberg :netherlands: (BOB member since 2008-01-03)

Hi Gerrie,

Thanks for the code.

So to clarify if what I think is correct,

If I have a report where i need to check for customer 1, with (major accident code=1 and minor accident code=0)
with a affiliate id=2 this time and

next time,

i want to check for customer 10 with with (major accident code=1 and minor accident code=0)
with a affiliate id=4

will that work? though i have all the values in the xml file? how will it know to select that? is it ever possible? according to your code, I did not understand by…

will loop for each row in the XML file

does that mean, once it takes 1st row of all fileds in 1 refresh and next time it takes 2nd row of all fields and so on?

once again thanks for the code and giving me that idea.

regards

Jayashree


jayashree.r (BOB member since 2007-06-29)

Hi jayashree,

Correct.
The first time it will collect the first row. Field1 is the name of the report, Field 2 is a prompt value. The report will be refreshed and save. Then the report will be refreshed and saved with the parameters of the second row etc.

The bca stops when all rows in the XML are runned.

If you have more prompts you have to copy some code of the macro and the parameters in the xml.

Regards Gerrie


gvdberg :netherlands: (BOB member since 2008-01-03)

hey thanks a lot. though this does not help me if there are 100s and 1000s to be run for. but it will defnitely work out for me if we have say 5 6 different values in the list. I will try working on this with different other options. a real working feature to get more data through bca schedule for prompted reports :slight_smile:

regards

Jayashree


jayashree.r (BOB member since 2007-06-29)

Must the bca run the report more then 100 Times or are the 1000 of options that the users could be run.

In the last case : only the bca uses this macro, users can filled it themselves.

If the first case is actual then you need a database with all these version of the report. This XML files could be this database.

regards, Gerrie


gvdberg :netherlands: (BOB member since 2008-01-03)