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
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.
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.
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 ??
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
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.
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.
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).
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.
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 . 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.
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?
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.
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.
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.
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.
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