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

Using the Clipboard as the Prompt Value

Status
Not open for further replies.

POGMarine

Technical User
Apr 14, 2008
1
US
Good Morning Gentlemen/Ladies,
I am day old in the world of Script and I am having a problem using the "GetText" method. I am trying to use the contents of my clipboard as my prompt values for my report. In other words, instead of a prompt box popping up when I run the report, I am trying to have the report use values on my clipboard. What I have thus far:
Code:
Sub Main()
   Dim ImpApp as Object
   Dim ImpRep as Object
   Dim ImpExcelRep as Object
   Dim strExcelFileName As String
   Clipboard.GetText
   Set ImpApp = CreateObject("CognosImpromptu.Application")
   ImpApp.Visible True
   Set ImpRep = ImpApp.OpenReport("\\2mardivudmips\UDS EPAR'S\Roster Monster\IMR's\DEPLOYED ENTITLEMENTS ROSTER SSN 1.imr" & [B]GetText[/B])
   ImpRep.Visible True
   Set ImpExcelRep = ImpRep.PublishExcel
   ImpExcelRep.ExportOptions 15
   ImpExcelRep.Publish "\\2mardivudmips\UDS EPAR'S\Roster Monster\Source Rosters\DEPLOY ENT1.XLS"

'Pulls Dep E Roster 2 using a different approach
   
   Set ImpRep = ImpApp.OpenReport("\\2mardivudmips\UDS EPAR'S\Roster Monster\IMR's\DEPLOYED ENTITLMENTS ROSTER SSN 2.imr", [B]Clipboard.GetText[/B])
   ImpRep.Visible True
   Set ImpExcelRep = ImpRep.PublishExcel
   ImpExcelRep.ExportOptions 15
   ImpExcelRep.Publish "\\2mardivudmips\UDS EPAR'S\Roster Monster\Source Rosters\DEPLOY ENT2.XLS"
   
   Set ImpExcelRep = Nothing
   Set ImpRep = Nothing
   Set ImpApp = Nothing
     
End Sub

Again, I am brand new to this and would appreciate any help you may be able to offer. I am using Impromptu - Administrator Version 7.4.1069.0.
 
I'm not sure what's achievable, not having worked with IWR in years, but perhaps an invisible prompt that auto-submits? Or even a visible one if your goal is automation and you don't mind something flashing on the screen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top