Normal Topic [Solved] Select and Run a Report from a List Box (Read 401 times)
cmptrguy
Member
*
Offline



Posts: 3
Location: Florida
Joined: Feb 28th, 2008
[Solved] Select and Run a Report from a List Box
Feb 28th, 2008 at 6:29pm
Print Post Print Post  
I am new to Sesame so this is a learning curve for me
so forgive me if this is a simple task.
But
I am trying to Popup a list box from a Button that displays a list of available Reports that the user can then select from.
I can get the popup list box to display all reports available but can;t seem to get the selected Report to execute. I have been attempting to debug with writln and other items but I think I am missing something.

This is what I have attached to the Button to run on Element Entry


var vReport as String
var vReport1 as String
var vReportList as string
var vNav as Int

     // Offer User List of Report to Print
     // Position the choices over the clicked button
     PopupSelectPosition(4, @XPos(ThisElement) + 80, @YPos(ThisElement))
               vReportList = @ListApplicationReports()
     vreport = @PopupMenu(vReportList,"Select Report To Run")

     vReport1 = "Search Update Menu!Results Commands!Reports!" + @Database +"!" + vReport

     vNav = @SelectTreeItem(vReport1)


Any help would be greatly appreciated.

Thanks
« Last Edit: Mar 6th, 2008 at 2:06pm by Hammer »  
Back to top
AIM AIM  
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Select and Run a Report from a List Box
Reply #1 - Feb 29th, 2008 at 3:14am
Print Post Print Post  
Depending on the location of the command button, and whether or not you have Retrieve Specs attached to the reports, you may consider using @ListReportsByDatabase, rather than @ListApplicationReports.

In any case, try this. This should work.

Code
Select All
var vReport as String
var vReportList as string
var vReportFilename as string

// Offer User List of Report to Print
// Position the choices over the clicked button
PopupSelectPosition(4, @XPos(ThisElement) + 80, @YPos(ThisElement))

//vReportList = @ListReportsByDatabase(@Database)
vReportList = @ListApplicationReports()

vReport = @PopupMenu(vReportList, "Select Report To Run")

vReportFilename = @PrintAReport(vReport, 1, 1, 0, -1, -1, -1, -1, -1, -1)
 

  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
cmptrguy
Member
*
Offline



Posts: 3
Location: Florida
Joined: Feb 28th, 2008
Re: Select and Run a Report from a List Box
Reply #2 - Feb 29th, 2008 at 5:57am
Print Post Print Post  
Smiley Grin

Thanks I got it Everything works
I can tqake it from their
  
Back to top
AIM AIM  
IP Logged