aminaalavi
Programmer
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
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