
730 A.2d 1065 (1999)
COUNTY OF ALLEGHENY DEPUTY SHERIFF'S ASSOCIATION, Deputy Sheriff Louis J. Leon, Deputy Sheriff Edward L. Warner, and Deputy Sheriff James R. Heasley, Appellants,
v.
COUNTY OF ALLEGHENY, Commissioner Larry Dunn, Commissioner Bob Cramner, and Commissioner Mike Dawida, County of Allegheny Office of Budget and Finance, Carmen Torockio, Director of Office of Budget and Finance, and Sheriff Peter R. DeFazio.
Commonwealth Court of Pennsylvania.
Argued February 10, 1999.
Decided June 4, 1999.
*1066 Joseph J. Chester, Pittsburgh, for appellants.
George M. Janocsko, Pittsburgh, for appellees.
John A. Bacharach, Pittsburgh, for appellee, Sheriff Peter DeFazio.
Before COLINS, President Judge, FRIEDMAN, J., KELLEY, J., FLAHERTY, J. and LEADBETTER, J.
*1067 FLAHERTY, Judge.
The County of Allegheny Deputy Sheriff's Association, Louis Leon, Edward Wagner and James Heasley (collectively Appellants) appeal from an order of the Court of Common Pleas of Allegheny County (trial court) which sustained the preliminary objections filed by Appellees Allegheny County (County) and its Commissioners (Commissioners), Allegheny County Office of Budget and Finance and its director (Office of Budget and Finance) and Sheriff DeFazio (Sheriff) in response to a complaint in mandamus filed by Appellants. We affirm.
On January 29, 1998, the Commissioners adopted a Voluntary Retirement Incentive Option Program (Program) to reduce the size of the County budget by reducing its workforce. Under the Program, County employees between the ages of 55-59, who met the years of service requirement were offered a one-time cash payment and extended health care benefits as incentive to retire from service. The Program was only offered to certain employees working in certain departments. Also, independently elected row officers including the Coroner, Sheriff, and Clerk of Courts were given the option to determine whether to allow their employees to participate. If they opted into the Program, each row officer would have to agree to (1) fill only one of every three positions vacated by personnel who accepted the Program; and (2) return any funds saved as a result of the retirements to the County's general fund to help offset a budget deficit.
Sheriff DeFazio decided not to participate in the Program and as a result, Appellants filed a lawsuit. Count 1 of the lawsuit is a complaint in mandamus seeking to compel Commissioners and Sheriff to allow them to participate in the Program. In Count 2, Appellants seek a declaratory judgment action pursuant to 42 Pa.C.S. § 7531 of the Declaratory Judgments Act, declaring that the Commissioners and Sheriff were required to accord them participation in the Program. In Count 3, Appellants seek injunctive relief directing the Commissioners and Sheriff to afford them participation. Finally, in Count 4 Appellants allege that Sheriff DeFazio breached a duty by refusing to participate in the Program and demand damages as a result thereof.
In response, Commissioners, Office of Budget and Finance, and Sheriff filed preliminary objections which were granted by the trial court and Appellants' case was dismissed. The trial court determined that Appellants' action in mandamus failed as the Commissioners had no legal duty to offer the Program to any county employee. The trial court also denied Appellants' request for declaratory judgment because they failed to assert any legal right upon which they were entitled to participate in the Program.
The issues raised by Appellants in this case are whether the trial court erred in dismissing Appellants' complaint in mandamus and their complaint for declaratory judgment and whether the trial court erred in failing to grant Appellants' request to develop a factual record before adjudicating the matter.
Our review of an order of the trial court sustaining preliminary objections in the nature of a demurer is limited to determining whether the trial court abused its discretion or committed an error of law. Lutz v. Springettsbury Township, 667 A.2d 251, 253 n. 3 (Pa.Cmwlth. 1995). A demurrer should be granted only when, under the facts alleged, the law states with certainty that no recovery is possible. The court must accept as true all well-pled allegations and averments of material fact in the compliant as well as any inferences reasonably deducible therefrom. Id. at 253.
A writ of mandamus is an extraordinary remedy which compels the performance of a ministerial act or mandatory duty. Pennsylvania Dental Association v. Insurance Department, 512 Pa. 217, 516 A.2d 647 (1986). A ministerial act *1068 is "one which a public officer is required to perform upon a given state of facts and in a prescribed manner in obedience to the mandate of legal authority." Rose Tree Media School District v. Department of Public Instruction, 431 Pa. 233, 236, 244 A.2d 754, 755 (1968). A writ of mandamus may be issued only where there is a clear legal right in the plaintiff, a corresponding duty in the defendant, and a want of any other appropriate and adequate remedy. Pennsylvania State Association of County Commissioners v. Commonwealth, 545 Pa. 324, 681 A.2d 699 (1996.)
As to Appellants' declaratory judgment action, we note that "[d]eclaratory relief is not available unless an actual controversy exists, is imminent or inevitable." Pennsylvania Turnpike Commission v. Hafer, 142 Pa.Cmwlth. 502, 597 A.2d 754, 756 (1991).
Appellants argue that the Commissioners illegally delegated bargaining authority to the Sheriff who exercised that authority. Appellants maintain that the Commissioners and Sheriff are joint employers of Appellants. The Sheriff supervises day to day affairs while the Commissioners determine salaries, holidays, retirement benefits and other benefits articulated in the bargaining agreement. See Ellenbogen v. County of Allegheny, 479 Pa. 429, 388 A.2d 730 (1978). Appellants maintain that the Commissioners could not lawfully delegate their authority to determine matters relating to retirement benefits to the Sheriff.
Appellants rely on Ellenbogen where it was determined that the Commissioners and Judges were joint employers of court employees. It was determined therein that the Commissioners and not the Judges had the authority to bargain for salaries and benefits. Similarly, Appellants maintain that the Commissioners here and not the Sheriff are the proper bargaining authority for benefits. Thus, the Commissioners illegally delegated bargaining authority to the Sheriff.
However, we agree with the Commissioners and Sheriff that Appellants' argument fails to establish entitlement to a writ of mandamus. Here, the decision to implement the Program by the Commissioners was discretionary and not a ministerial act. Moreover, the Sheriff's decision not to participate in the Program was a policy decision and not a ministerial act. The Sheriff has decided not to participate in the program, which participation would reduce the number of his employees, and the Commissioners have no authority to direct the Sheriff to make hiring, supervisory or discharge decisions. Pennsylvania Labor Relations Board v. Della Vecchia, 517 Pa. 349, 537 A.2d 805 (1988). In addition, the Appellants cannot point to any authority which establishes their right to participate in the Program. There is also no legal duty mandating Commissioners to offer such a program or requiring Sheriff to participate in such a program.
As to Appellants request for declaratory judgment, the trial court correctly held that Appellants "have failed to assert any legal right upon which they are entitled to participate in the early retirement Program. Thus, no actual case or controversy exists." (Trial court opinion at 4.)
Finally, Appellants also claim that the trial court erred in not allowing a factual record to be created in this case. According to Appellants, the trial court erred in accepting factual representations made by the Commissioners as to responsibilities of the Commissioners and Sheriff, cost savings realized by implementation of the Program, best interests of the tax payers and other factual matters. Appellants acknowledge however, that none of these "facts" appeared in the trial court opinion. Thus, they did not form a part of the rationale of the trial court. Moreover, as the trial court stated, Appellants have no right to participate in the early retirement program and "[g]iven these circumstances, it would have been fruitless to hold such a hearing." (Trial court opinion at p. 4.)
*1069 As the trial court acted correctly in granting the preliminary objections filed by the Commissioners and Sheriff and dismissing Appellants complaint, the order of the trial court is affirmed.[1]

O R D E R
NOW, June 4, 1999, the order of the Court of Common Pleas of Allegheny County at No. GD98-2820, dated June 12, 1998, is affirmed.
Judge PELLEGRINI did not participate in the decision in this case.
Judge FRIEDMAN concurs in the result only.
NOTES
[1]  Because the trial court properly sustained Commissioner's and Sheriff's demurrers and dismissed Appellants complaint we need not address Sheriff's additional argument that Appellants failed to exhaust their administrative remedies.
