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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro-opening power play reports-path name problem

Status
Not open for further replies.

aminaalavi

Programmer
May 22, 2003
15
0
0
FR
Iam creating a number of dialog boxes. The buttons in the dialog box open up the powerplay reports (ppr). I will be distributing this macro to various offices. Users will be placing the ppr and the mdc files in various locations. Since powerplay does not have an ini file i cannot define a specific directory paths ( for mdc and ppr) in their preferences through the installation program. ( this is the way i did it for impromptu reports) . How do i open the ppr or how do i prompt the user to browse and enter the file path?

Thanks

Amina
My Code:

sub main

Begin Dialog UserDialog3 25, 7, 595, 322, "SUPPORT BUDGET CUBE"
ButtonGroup .ButtonGroup1
PushButton 163, 51, 271, 24, "1. SUPPORT BUDGET BY CATEGORY (category.ppr) "
PushButton 163, 94, 271, 24, "2. SUPPORT BUDGET BY GL ACCOUNT (ooe.ppr)"

Text 277, 25, 65, 9, "SUPPORT BUDGET CUBE"
CancelButton 300, 238, 73, 17
End Dialog

Dim mydialogbox3 As UserDialog3
answer3= Dialog(mydialogbox3)

Select Case answer3

Case 1
Dim variable1 as string
Dim objPPRep1 as Object
Dim objPPlayApp1 as Object
Set objPPlayApp1 = CreateObject("CognosPowerPlay.Application")
objPPlayApp1.Visible = True
Set objPPRep1 = CreateObject("CognosPowerPlay.Report")
objPPRep1.Open "category.ppr"
objPPRep1.Visible = True
Set objPPRep1 = Nothing


Case 2
Dim variable2 as string
Dim objPPRep2 as Object
Dim objPPlayApp2 as Object
Set objPPlayApp2 = CreateObject("CognosPowerPlay.Application")
objPPlayApp2.Visible = True
Set objPPRep2 = CreateObject("CognosPowerPlay.Report")
objPPRep2.Open "ooe.ppr"
objPPRep2.Visible = True
Set objPPRep2 = Nothing

end select

end sub



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top