script question

I have a script which executes several reports and sends them to a printer.
A section of the script is supposed to open a BO document and convert that
document to a CSV file but it is no longer working (it worked fine in BO 4.0.5.6a but is not working with V4.1).

This is the section of code that is not working:

Const sLIST_DOCNAME_ORG as String = “allorgs”

Call OpenDocument (m_sUserDocsPath, sLIST_DOCNAME_ORG, TRUE)
set dp = ActiveDocument.DataProviders.Item(1) dp.ConvertTo ExpAsciiCSV,1, sLIST_DOCNAME_ORG
GetAllOrganizationIDs
ActiveDocument.Close

When the script is executed, the following error is returned:

VEHTEST!GetAllOrganizationIDs(317) - R53 “File ‘C:\Program Files\BusinessObjects\UserDoc’ not found”

Does anyone have any ideas/suggestions?
Thanks very much.


Listserv Archives (BOB member since 2002-06-25)

I have the following script but the query has 5 report tabs and I only want it to print the 3rd tab when it prints instead of all 5 tabs. Can you tell me the command? I can’t seem to find the answer in the books or in help and it should be fairly simple.

sub main
rem
rem Procedure PM002E03
rem
Application.Documents.Open(“RBOPM002”)
Application.Documents.Item(“RBOPM002”).Activate Application.Documents.Item(“RBOPM002”).Refresh Application.Documents.Item(“RBOPM002”).Print Application.Documents.Item(“RBOPM002”).Close rem
Application.Exit
end sub

Thanks much,

Julie


Listserv Archives (BOB member since 2002-06-25)

Hi Julie,

Reference the report in question, then use the print command to just print that report. For example:

ActiveDocument.Reports.Item(3).Print

Best regards,

Andrew J. Erthal

Chicago Office (847) 391-9898
St. Louis Office (314) 209-1994
St. Louis Fax (314) 209-7926


Listserv Archives (BOB member since 2002-06-25)

Assume you have 5 Tabs, named “Report 1”, “Report 2”, “Report 3”, “Report 4”, “Report 5”.

Now use foll script to print “Report 3”

sub main
rem
rem Procedure PM002E03
rem
Application.Documents.Open(“RBOPM002”)
Application.Documents.Item(“RBOPM002”).Activate Application.Documents.Item(“RBOPM002”).Refresh Application.Documents.Item(“RBOPM002”).Reports(“Report 3”).Print Application.Documents.Item(“RBOPM002”).Close rem
Application.Exit
end sub

Hope it helps
Vasan

I have the following script but the query has 5 report tabs and I only want it to print the 3rd tab when it prints instead of all 5 tabs. Can you tell me the command? I can’t seem to find the answer in the books or in help and it should be fairly simple.

sub main
rem
rem Procedure PM002E03
rem
Application.Documents.Open(“RBOPM002”)
Application.Documents.Item(“RBOPM002”).Activate Application.Documents.Item(“RBOPM002”).Refresh Application.Documents.Item(“RBOPM002”).Print Application.Documents.Item(“RBOPM002”).Close rem
Application.Exit
end sub

Thanks much,

Julie


Listserv Archives (BOB member since 2002-06-25)