Normal Topic Command Button Programming - @Load Retrieve/Sort (Read 518 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Command Button Programming - @Load Retrieve/Sort
Apr 27th, 2005 at 4:30pm
Print Post Print Post  
I currently have a General Reports command button with programming that includes a pop up menu to list the many individual reports.

The problem I am having is that I can't get the programming to load the saved retrieve and sort specs associated with each individual report.

What currently happens is as follows:

If I don't manually input a spec and pick any report from my pop up menu, it loads all the records in the database and subsequently displays this result set.  No different then hitting F10 in the database.

If I manually input a spec into a field, F10 and pick a report from my pop up menu, it displays the result set for the report.  This is actually good because I will create two general reports command buttons (one for standard saved specs and the other for changing the spec on the fly).

I have been able to program other command buttons where there is only one report involved but am stumbling on this one.

The programming is as follows and any suggestions would be appreciated (ignore the total number of reports; if I can get two to work; then I can apply to the balance of them):


var vSpec as Int
var vTree as Int
var vReport as string
var vReports as string
var vReport1 as string
var vSort as string
var vRun

//offer user choice of reports to print

vReports = "407ETR Transponders (Preview);Absenteeism - YTD (Preview);Avis Preferred Wizard Numbers (Preview);Bonus Payments (Preview);"
vReports = vReports + "Car Drivers Licenses & Plates (Preview);Car Fleet (Preview);Car Insurance Deduction (Preview);Car Monthly Lease Costs & Tax Bfts (Preview);"
vReports = vReports + "Car Non Deductible Lease Costs (Preview);Car Year End GST Calcs (Preview);Consultants Home Locations (Preview);Employee Listing - Addresses (Preview);"
vReports = vReports + "Employee Listing - Alpha (Preview);Employee Listing - Dept (Preview);Employee Listing - Dept//Ext (Preview);Employee Listing - Golf Teams (Preview);"
vReports = vReports + "Employee Listing - Golf Teams Alpha (Preview);Employee Listing - Seniority (Preview);Employee Listing - Spouses (Preview);Employee Listing - Titles (Preview);"
vReports = vReports + "Feedback Ratings - YTD (Preview);Incent Comp - Vac//Holpay Projection (Preview);Life Insurance Taxable Benefit (Preview);Payroll Hol//Vacpay Owing - YTD (Preview);"
vReports = vReports + "Payroll Hol//Vacpay Paid - YTD (Preview);Payroll LOA//Brvmt//Sick - YTD (Preview);Payroll Salaries//Bonus//Quotas - YR (Preview);Qtrly Paystub Summary - MKT - QTR 1 (Preview);"
vReports = vReports + "Qtrly Paystub Summary - MKT - QTR 2 (Preview);Qtrly Paystub Summary - MKT - QTR 3 (Preview);Qtrly Paystub Summary - MKT - QTR 4 (Preview);"
vReports = vReports + "Qtrly Paystub Summary - TC//CC - QTR 1 (Preview);Qtrly Paystub Summary - TC//CC - QTR 2 (Preview);Qtrly Paystub Summary - TC//CC - QTR 3 (Preview);"
vReports = vReports + "Qtrly Paystub Summary - TC//CC - QTR 4 (Preview);Quota Performance - MKT - QTR 1 (Preview);Quota Performance - MKT - QTR 2 (Preview);"
vReports = vReports + "Quota Performance - MKT - QTR 3 (Preview);Quota Performance - MKT - QTR 4 (Preview);Quota Performance - MKT - YTD (Preview);"
vReports = vReports + "Quota Performance - TC//CC - QTR 1 (Preview);Quota Performance - TC//CC - QTR 2 (Preview);Quota Performance - TC//CC - QTR 3 (Preview);"
vReports = vReports + "Quota Performance - TC//CC - QTR 4 (Preview);Quota Performance - TC//CC - YTD (Preview);Security Keys - By Emp (Preview);Security Keys - By Key (Preview);"
vReports = vReports + "T4 Totals - 12 Mths Inc Comp Empl (Preview);T4 Totals - All Empl (Preview);Taxable Bfts & T4 Adjust (Preview);Telephone - Bell Call Cards (Preview);"
vReports = vReports + "Telephone - Cell & Bell Cards (Preview);Telephone - Home & Cell (Preview);Vacation Schedule - By Days Earn (Preview);Vacation Schedule - By Dept (Preview);"
vReports = vReports + "Vacation Schedule - LOA Days (Preview)"

vReport = @PopUpMenu(vReports, "SELECT A REPORT")

//Create the SelectTreeItem Statement

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


//Run the SelectTreeItem Command

vRun = @SelectTreeItem(vReport1)

//LOADS RETRIEVE & SORT SPEC


vSort = "407ETR Transponders (Preview);Absenteeism - YTD (Preview);Avis Preferred Wizard Numbers (Preview);Bonus Payments (Preview);"
vSort = vSort + "Car Drivers Licenses & Plates (Preview);Car Fleet (Preview);Car Insurance Deduction (Preview);Car Monthly Lease Costs & Tax Bfts (Preview);"
vSort = vSort + "Car Non Deductible Lease Costs (Preview);Car Year End GST Calcs (Preview);Consultants Home Locations (Preview);Employee Listing - Addresses (Preview);"
vSort = vSort + "Employee Listing - Alpha (Preview);Employee Listing - Dept (Preview);Employee Listing - Dept//Ext (Preview);Employee Listing - Golf Teams (Preview);"
vSort = vSort + "Employee Listing - Golf Teams Alpha (Preview);Employee Listing - Seniority (Preview);Employee Listing - Spouses (Preview);Employee Listing - Titles (Preview);"
vSort = vSort + "Feedback Ratings - YTD (Preview);Incent Comp - Vac//Holpay Projection (Preview);Life Insurance Taxable Benefit (Preview);Payroll Hol//Vacpay Owing - YTD (Preview);"
vSort = vSort + "Payroll Hol//Vacpay Paid - YTD (Preview);Payroll LOA//Brvmt//Sick - YTD (Preview);Payroll Salaries//Bonus//Quotas - YR (Preview);Qtrly Paystub Summary - MKT - QTR 1 (Preview);"
vSort = vSort + "Qtrly Paystub Summary - MKT - QTR 2 (Preview);Qtrly Paystub Summary - MKT - QTR 3 (Preview);Qtrly Paystub Summary - MKT - QTR 4 (Preview);"
vSort = vSort + "Qtrly Paystub Summary - TC//CC - QTR 1 (Preview);Qtrly Paystub Summary - TC//CC - QTR 2 (Preview);Qtrly Paystub Summary - TC//CC - QTR 3 (Preview);"
vSort = vSort + "Qtrly Paystub Summary - TC//CC - QTR 4 (Preview);Quota Performance - MKT - QTR 1 (Preview);Quota Performance - MKT - QTR 2 (Preview);"
vSort = vSort + "Quota Performance - MKT - QTR 3 (Preview);Quota Performance - MKT - QTR 4 (Preview);Quota Performance - MKT - YTD (Preview);"
vSort = vSort + "Quota Performance - TC//CC - QTR 1 (Preview);Quota Performance - TC//CC - QTR 2 (Preview);Quota Performance - TC//CC - QTR 3 (Preview);"
vSort = vSort + "Quota Performance - TC//CC - QTR 4 (Preview);Quota Performance - TC//CC - YTD (Preview);Security Keys - By Emp (Preview);Security Keys - By Key (Preview);"
vSort = vSort + "T4 Totals - 12 Mths Inc Comp Empl (Preview);T4 Totals - All Empl (Preview);Taxable Bfts & T4 Adjust (Preview);Telephone - Bell Call Cards (Preview);"
vSort = vSort + "Telephone - Cell & Bell Cards (Preview);Telephone - Home & Cell (Preview);Vacation Schedule - By Days Earn (Preview);Vacation Schedule - By Dept (Preview);"
vSort = vSort + "Vacation Schedule - LOA Days (Preview)"

If @LEN(vSort) = 0
{
     vSort = @Right(vSort, 10)
}

vSpec = @LoadRetrieveSpec("407ETR TRANSPONDERS;ABSENTEEISM"+vSort)
vSpec = @LoadSortSpec("407ETR TRANSPONDERS;ABSENTEEISM"+ vSort)
vTree = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")


vRun=""
vReport1=""
vReport=""



  

Louis Galvao
Back to top
 
IP Logged