
65 Cal.Rptr.3d 513 (2007)
154 Cal.App.4th 1302
Candace CATES, Plaintiff and Appellant,
v.
CALIFORNIA GAMBLING CONTROL COMMISSION et al., Defendants and Respondents.
No. D048574.
Court of Appeal of California, Fourth District, Division One.
September 6, 2007.
*515 Ronquillo & Corrales and Manuel Corrales Jr., San Diego, for Plaintiff and Appellant.
Edmund G. Brown Jr., Attorney General, Robert L. Mukai, Chief Assistant Attorney General, Sara J. Drake, Assistant Attorney General, Christine M. Murphy, Deputy Attorney General, for Defendant and Respondent.
*514 McINTYRE, J.
Candace Cates appeals a judgment entered in favor of defendants California State Controller Steven Westley (the Controller), California Gambling Control Commissioner J.K. Sasaki and the California Gambling Control Commission (together with Sasaki, the Commission) and former California State Attorney General Bill Lockyer, now Edmund G. Brown, Jr. (the Attorney General, collectively with the Controller and the Commission, Defendants) *516 on her taxpayer action seeking to compel Defendants to discharge their statutory duty to collect money derived from gambling belonging to the State from various Indian tribes. She also appeals orders (1) denying her motion to compel further responses to special interrogatories seeking financial information about various Indian tribes and (2) requiring her to return confidential documents that she allegedly misappropriated from her former employer.
In this case, we conclude that the trial court improperly granted summary judgment because Defendants have not shown, as a matter of law, that they have complied with their mandatory duties to collect money derived from gambling owed to the State. Specifically, they failed to negate Cates's claim that the tribes are calculating their payments based on an incorrect definition of "net win." Even assuming Defendants had met their initial burden of proof, the evidence Cates submitted in opposition to the motion created a triable issue of material fact. We also conclude that Cates has not shown that the trial court abused its discretion in denying her motion to compel further responses to special interrogatories or in ordering her to return confidential documents that she allegedly misappropriated from her former employer.

INTRODUCTION
In 1999, the State of California entered into gaming Compacts with 28 California Indian tribes, permitting the tribes to operate public gambling casinos on their respective reservations. (The gaming Compacts between the various tribes and the State are substantially the same and will be collectively referred to herein as the Compact.) The Compact provides that a tribe cannot deny the State Gaming Agency, i.e., the entities authorized to regulate gaming under the Gambling Control Act (Bus. & Prof.Code, § 19800, et seq.), access to papers, books or records to ensure compliance therewith (Compact, §§ 2.18 & 7.4.4.)
Section 5.1(a) of the Compact requires that tribes pay a percentage of their winnings to a Special Distribution Fund (the Fund) created by the Legislature. The contribution amount is determined by the "average device net win," which is calculated by dividing the total net win terminals during the quarter by the total number of gaming devices operated during a given quarter (the quarterly device base). (Compact, § 5.3(a).) The Compact defines a "gaming device" as slot machines (Compact, § 2.6), but it does hot define "terminals" and it appears that a terminal is another name for a gaming device.
Once the "average device net win" is known, tribes contribute into the Fund a percentage of this number based on the number of terminals operated. (Compact, § 5.1(a).) For example, if a tribe operates 201 to 500 terminals the Compact requires it to pay seven percent of the "average device net win" into the Fund. (Ibid.) The Compact states that "net win" means net win as defined by the American Institute of Certified Public Accountants, which is the difference between gaming wins and losses before deducting costs and expenses. (Compact, § 2.15.) Since October 30, 2002, the tribes have been required to make payments into the Fund on a quarterly basis and to submit with each contribution a report setting forth the quarterly device base, the net win from all terminals in the quarterly device base and the average device net win. (Compact, § 5.3(a) & (c).)
In 2003, former Governor Gray Davis issued Executive Order D-66-03 acknowledging that the tribes are required to make quarterly contributions to the Fund *517 pursuant to the formula set forth in section 5.0 of the Compact and submit certified quarterly reports to the State for such contributions and making the Commission responsible for reviewing the quarterly reports and collecting and accounting for contributions to the Fund. Specifically, the order stated that the Commission is "authorized to and shall" (1) collect and account for all contributions to the Fund and (2) collect and analyze the certified quarterly reports submitted by the tribes.
Cates, a former agent of the California Division of Gambling Control (the Division), claims that since 2002 the Commission has known that the tribes have been paying into the fund according to their own definition of "net win." (The Division is part of the Department of Justice (Bus. & Prof.Code, § 19805, subd. (h) and is responsible for investigating and enforcing controlled gambling in California. (Gov. Code, § 1500.1; Bus. & Prof.Code, § 19826.).) In November 2003, she filed this taxpayer's action for injunctive and declaratory relief, alleging that the tribes were not paying the agreed-upon share into the Fund and that the Commission, the Controller and the Attorney General were not fulfilling their statutory duties to collect or require the tribes to account for the money. The gist of the complaint is that the tribes are not following the definition of "net win" contained in the Compact resulting in an underpayment to the State.

PROCEDURAL BACKGROUND
In 2004, the Controller and the Attorney General moved for summary judgment on the grounds Cates lacked standing to maintain the action, they had no responsibility to collect or account for contributions to the Fund and the tribes were indispensable parties to the action. The trial court rejected these arguments and denied the motion.
The following year, the trial court denied Cates's discovery motion seeking production of all quarterly reports showing the amount each tribe contributed to the Fund and information about how much each tribe paid under the Compact and how much each tribe owes under the Compact. The trial court also issued an order compelling Cates to return confidential documents that she allegedly misappropriated while working for the Division.
In 2006, the Commission and the Controller moved for summary judgment or in the alternative, summary adjudication, arguing that Cates was not entitled to injunctive or declaratory relief because: (1) none of the tribes were delinquent in their payments to the Fund; (2) the Commission fulfilled its statutory duties; and (3) the Controller had no collection obligation because the tribes were not delinquent in their payments to the Fund.
After ruling on various evidentiary objections, the trial court noted that Defendants had a mandatory duty to collect and account for contributions deposited into the Fund and collect and analyze the certified quarterly reports. The court found that Defendants' evidence revealed they had a procedure for accounting for the contributions into the Fund, that they actually accounted for the contributions and that they had collected and analyzed the certified quarterly reports; accordingly, there was no controversy because Defendants had fulfilled their statutory duties. Because Defendants have never formally determined that any tribe has been delinquent in its payments to the Fund, there has been no reason for the Controller to initiate a collection action and there was no conduct to enjoin. The trial court also found that Defendants have not abused their discretion in conducting their affairs. Thereafter, the parties stipulated to a consent judgment in favor of the Attorney *518 General to expedite the appeal of the summary judgment ruling. Cates appeals from the resulting judgment and orders entered for Defendants.

DISCUSSION

I. Summary Judgment


A. Standard of Review
Summary judgment is granted when the moving party satisfies "the burden of persuasion that there is no triable issue of material fact and that he is entitled to judgment as a matter of law.... There is a triable issue of material fact if, and only if, the evidence would allow a reasonable trier of fact to find the underlying fact in favor of the party opposing the motion in accordance with the applicable standard of proof." (Aguilar v. Atlantic Richfield Co. (2001) 25 Cal.4th 826, 850, 107 Cal.Rptr.2d 841, 24 P.3d 493 (Aguilar), fns. omitted.) In reviewing an order granting summary judgment, we first identify the issues framed by the pleadings and then determine whether the moving party has established facts negating the opponent's claims and justifying a judgment in movant's favor. (Dawson v. Toledano (2003) 109 Cal. App.4th 387, 392, 134 Cal.Rptr.2d 689.)
A defendant moving for summary judgment meets its burden of showing that there is no merit to a cause of action if that party has shown that one or more elements of the cause of action cannot be established or that there is a complete defense to that cause of action. (Code Civ. Proc., § 437c, subds. (o)(2), (p)(2), all statutory references are to this code unless otherwise specified.) When seeking summary judgment on a claim for declaratory relief, the defendant must show that the plaintiff is not entitled to a declaration in its favor by establishing "(1) the sought-after declaration is legally incorrect; (2)[the] undisputed facts do not support the premise for the sought-after declaration; or (3) the issue is otherwise not one that is appropriate for declaratory relief." (Gafcon, Inc. v. Ponsor & Associates (2002) 98 Cal.App.4th 1388, 1402, 120 Cal. Rptr.2d 392 (Gafcon).) If this is accomplished, the burden shifts to the plaintiff to prove, by producing evidence of specific facts creating a triable issue of material fact as to the cause of action or the defense. (Aguilar, supra, 25 Cal.4th at p. 849, 107 Cal.Rptr.2d 841, 24 P.3d 493.)
We review the record and the trial court's determination de novo (Kahn v. East Side Union High School Dist. (2003) 31 Cal.4th 990, 1003, 4 Cal.Rptr.3d 103, 75 P.3d 30), construing the moving party's affidavits strictly and the opponent's affidavits liberally and resolving any doubts as to the propriety of granting the motion in favor of the opponent. (Gafcon, supra, 98 Cal.App.4th at p. 1402, 120 Cal.Rptr.2d 392.) We may not weigh the evidence or conflicting inferences and must deny the motion if there is a single issue of material fact in dispute. (Aguilar, supra, 25 Cal.4th at p. 856, 107 Cal.Rptr.2d 841, 24 P.3d 493; § 437c, subd. (c).) Issues of statutory interpretation present a question of law subject to de novo review on appeal. (Bialo v. Western Mut. Ins. Co. (2002) 95 Cal.App.4th 68, 76-77, 115 Cal.Rptr.2d 3.)

B. Analysis
A taxpayer may sue to enjoin wasteful expenditures by state agencies as well as local governmental bodies (§ 526a; California Assn. for Safety Education v. Brown, supra, 30 Cal.App.4th at p. 1281, 36 Cal.Rptr.2d 404) and also to enforce the government's duty to collect funds due the State. (Vasquez v. State of California (2003) 105 Cal.App.4th 849, 855, 129 Cal. Rptr.2d 701.) While the statute speaks of injunctive relief, taxpayer standing has also been extended to actions for declaratory *519 relief. (Van Atta v. Scott (1980) 27 Cal.3d 424, 449-450, 166 Cal.Rptr. 149, 613 P.2d 210.) The purpose of section 526a is to permit a large body of persons to challenge wasteful government action that otherwise would go unchallenged because of the standing requirement; accordingly, the statute has been construed liberally. (Blair v. Pitchess (1971) 5 Cal.3d 258, 267-268, 96 Cal.Rptr. 42, 486 P.2d 1242.) "A taxpayer suit is authorized only if the governing body has a duty to act and has refused to do so. If the governing body has discretion and decided not to act, then the court is prohibited from substituting its discretion for the discretion of the governing body." (California Assn. for Safety Education v. Brown (1994) 30 Cal. App.4th 1264, 1281, 36 Cal.Rptr.2d 404.)
Here, Defendants admit that the Commission has a mandatory duty to (1) collect and account for all contributions to the Fund and (2) collect and analyze the certified quarterly reports submitted by the tribes. In this action, Cates seeks a mandatory injunction requiring Defendants to discharge these mandatory duties and a judicial declaration that Defendants are obligated to collect monies from the tribes under the Compact as money due the State. In moving for summary judgment, Defendants relied exclusively on the language of the Compact, the executive order and the declaration of Gary Qualset, the Deputy Director of the Compliance Division of the Commission, to establish they were entitled to judgment as a matter of law.
Qualset's declaration stated that the auditing of payments made to the Fund is discretionary under the Compact and from April 2003 to the present, the Commission commenced audits of nine of the 28 tribes and completed one audit. The completed audit revealed an underpayment, which was corrected, and the Commission has made no "formal determination of delinquency" as to Fund payments generally. The Commission also has a procedure for accounting for all Fund contributions and as part of that procedure, the Commission's audit staff performs "desk reviews" of all quarterly Fund contribution reports submitted by the tribes to insure the mathematical accuracy of the reports and the proper application of contribution rates in the Compact to the numbers reported by the tribes. Since Fund payments first came due in October 2002, the Commission's audit staff has accounted for all money contributed to the Fund.
The trial court granted summary judgment on the ground the undisputed facts did not support the sought-after declaration, i.e., that Defendants proved as a matter of law that they fulfilled all their statutory duties regarding collecting and accounting for all contributions to the Fund and collecting and analyzing the certified quarterly reports submitted by the tribes. We disagree that the Defendants made such a showing.
Via executive order, the State delegated to the Commission its rights to enforce sections 5.1 and 5.3 of the Compact. These sections of the Compact require that the tribes: (1) pay a percentage of their winnings to the Fund and set forth a schedule to calculate the contribution based on the net win and the quarterly device base; and (2) submit with each contribution a report reflecting the quarterly device base, the net win from all terminals in the quarterly device base and the average device net win. (Compact, §§ 5.1(a) & 5.3(a) & (c).) As a threshold matter, we note that the executive order does not define the terms "collect," "account" or "analyze." At this stage, however, we need not definitively resolve this issue as the evidence presented by the parties reveals that the Commission has *520 not even been acting under a common sense meaning of these terms.
It is well settled that the value of opinion evidence rests in the factors considered and the reasoning employed (People v. Lawley (2002) 27 Cal.4th 102, 132, 115 Cal.Rptr.2d 614, 38 P.3d 461) and an "opinion unsupported by reasons or explanations" establishes nothing. (Kelley v. Trunk (1998) 66 Cal.App.4th 519, 524, 78 Cal.Rptr.2d 122.) Here, Qualset states in his declaration that the Commission has never made a formal determination of delinquency as to Fund payments. Qualset's proclamation, however, fails to establish that a delinquency does not in fact exist. Rather, when this assertion is viewed in connection with Qualset's statement that between April 2003 to the present the Commission has only audited one tribe, it appears that the Commission does not know whether the tribes have paid the appropriate sums into the Fund.
This evidence is wholly insufficient to establish, as a matter of law, that the Commission has discharged its mandatory duties regarding collecting and accounting for all contributions to the Fund. While the Commission may have discretion as to how it actually fulfills its mandatory duties, at a minimum, it must show that it acted based on generally accepted financial accounting principles and practices. The Commission's evidence does not constitute such a showing.
As to Cates's request for a mandatory injunction, the trial court reasoned that since the evidence showed no delinquencies, Cates could not establish that the Commission was not fulfilling its mandatory duties and thus there was nothing for the court to compel. As discussed above, the trial court's reasoning rested on a faulty premise. Accordingly, the trial court erred in concluding that, as a matter of law, Cates was not entitled to a mandatory injunction requiring the Commission to comply with its mandatory duties.
Finally, Defendants assert that summary judgment for the Controller and the Attorney General was proper because the duties of these entities are contingent on the existence of a delinquency and no delinquency exists. We do not agree that the Controller and the Attorney General have no duties unless a delinquency exists. Be that as it may, Defendants have not proven that there is not a delinquency; accordingly, judgment in favor of these entities was inappropriate. Because Defendants have failed to establish every fact necessary to show the causes of action against them are without merit, they have failed to meet their initial burden and the motion must be denied. (Consumer Cause, Inc. v. SmileCare (2001) 91 Cal. App.4th 454, 468, 110 Cal.Rptr.2d 627.)
Even assuming Defendants had met their initial burden of proof, the evidence Cates submitted in opposition to the motion clearly creates a triable issue as to whether Defendants are complying with their mandatory duties. Cates presented the deposition testimony of Dean Shelton, the Commission's Chairman, and Michael C. Palmer, a former Commission member.
Shelton testified that the definition of net win in the Compact is ambiguous, that he understood many tribes use different definitions of net win and that if the Commission determined that the tribes were underpaying into the Fund based on their use of the wrong definition of net win, this underpayment would be a debt owed to the State. Shelton admitted that the Commission has an obligation to determine how much the tribes are underpaying by using their own definition of net win and that the Commission could find out how much is owed by clarifying the definition of net win and performing audits. He also admitted *521 that his staff has a method of determining what definition of net win each tribe is using and that his staff could also ask the tribes; however, the lack of personnel prevents the Commission from getting information from the tribes regarding how they calculate net win. Despite this uncertainty, Shelton believed that the tribes were paying their fair share into the Fund because no tribe was behind in its payments into the Fund or its payment of any penalty. Shelton stated that the Commission had no position on the definition of net win and that it was preparing to conduct workshops on the issue with the tribes and Commission staff.
Palmer similarly testified that the term net win was "ill-defined;" however, he admitted that the Compact defined the term in a certain way and that the tribes were calculating net win differently. Palmer believed that the tribes paid into the Fund based on their own individual definitions of the term net win and that the Commission could determine what definition the tribes were using by asking them or doing an audit. Despite section 2.15 of the Compact, Palmer stated that the Compact placed the primary responsibility of defining the term with the Tribal Gaming Commission and that a definition was necessary so that it could be applied and enforced. Palmer stated that some tribes might be overpaying to the Fund and others might be underpaying, but the Commission did not currently know.
This testimony is startling because the Compact unambiguously defines the term "net win." (Compact, § 2.15.) The testimony is even more troubling given Qualset's assertion that the Commission accounts for all Fund contributions by performing "desk reviews" of all quarterly Fund contribution reports submitted by the tribes to insure the mathematical accuracy of the reports and the proper application of contribution rates in the Compact to the numbers reported by the tribes. We are at a loss to understand exactly how the Commission can possibly "insure the mathematical accuracy of the reports" when "net win" is a critical element in calculating the contribution amount, but the Commission purportedly does not know how "net win" is defined. It appears from the evidence presented that the Commission is simply verifying the accuracy of mathematical calculations set forth in the reports submitted by the tribes without confirming that the numbers used to perform the calculations are those called for by the Compact. Needless to say, the Commission cannot collect and account for Fund contributions and collect and analyze the reports submitted by the tribes without knowing the definition of "net win."

II. Discovery Motions


A. Motion to Compel Discovery
The trial court denied Cates's discovery motion seeking information about how much each tribe paid under the Compact and how much each tribe owes under the Compact and seeking production of all quarterly reports showing the amount each tribe contributed to the Fund on the ground Cates's need for this information did not outweigh the tribes' privacy rights. The trial court concluded that the Compact did not prohibit the discovery of confidential information, but reasoned that there was little compelling State interest in the information based on its earlier ruling that "this action does not seek to have the Court determine herein what the specific amounts are that are owed by each of the separate Indian tribes with whom this State has a Gaming Compact."
It is well settled that an appellate court reviews the ruling of the trial *522 court, not its rationale, and may affirm a trial court ruling on any proper basis presented by the record, whether or not relied upon by the trial court. (ASP Properties Group v. Fard, Inc. (2005) 133 Cal.App.4th 1257, 1268, 35 Cal.Rptr.3d 343, citing Davey v. Southern Pacific Co. (1897) 116 Cal. 325, 329, 48 P. 117.) We review a discovery order for an abuse of discretion and will affirm the ruling unless it falls outside the bounds of reason. (Cadiz Land Co., Inc. v. Rail Cycle, L.P. (2000) 83 Cal. App.4th 74, 117, 99 Cal.Rptr.2d 378.) This deferential standard of review requires us to uphold the trial court's determination, even if we disagree with it, so long as it is within reason. (Avant! Corp. v. Superior Court (2000) 79 Cal.App.4th 876, 881-882, 94 Cal.Rptr.2d 505.) Furthermore, the order is presumed correct and the appellant must affirmatively show error. (Cal. Const., art. VI, § 13; § 475; Bianco v. California Highway Patrol (1994) 24 Cal. App.4th 1113, 1125, 29 Cal.Rptr.2d 711.)
The Compact is an agreement between the State and the individual tribes and is interpreted as a contract. (Texas v. New Mexico (1987) 482 U.S. 124, 128, 107 S.Ct. 2279, 96 L.Ed.2d 105 [defining a Compact as a contract which when approved by Congress has the force of federal law]; Confederated Tribes of Siletz Indians v. Oregon (9th Cir.1998) 143 F.3d 481, 485-486, [the question whether public release of a state investigative report of an Indian casino should be enjoined could be resolved "through simple contract interpretation"].) Accordingly, we apply standard rules of contract interpretation to the Compact, noting that the goal of contract interpretation is to ascertain the intentions of the contracting parties. (Morey v. Vannucci (1998) 64 Cal.App.4th 904, 912, 75 Cal.Rptr.2d 573.)
The Compact requires that the State Gaming Agency apply the highest standards of confidentiality expected under state law to preserve the confidentiality of all information and documents received from a tribe and that prior to disclosing any document, the State Gaming Agency must endeavor to give a tribe notice of any order compelling disclosure and an opportunity to object. (Compact, § 7.4.3(b)(i).) It also provides that records received from a tribe and information compiled from those records are exempt from disclosure under the California Public Records Act (Gov.Code, § 6250 et seq.). (Compact, § 7.4.3(c).)
Significantly, the Legislative Counsel issued an opinion concluding that the amount of any payment into the Fund and the quarterly contribution reports submitted by the tribes were not subject to public disclosure by the State Treasurer or the Commission. (Ops. Cal. Legis. Counsel, No. 7136 (May 9, 2003) Indian Gaming Fee Information, pp. 1, 8.) The Legislative Counsel's opinion recognized that the Compact language and the Gaming Control Act (Bus. & Prof.Code, § 19821, subds. (c) & (d)) provide that records and information received from the tribes are confidential and not subject to disclosure under the California Public Records Act. (Ops. Cal. Legis. Counsel, No. 7136 (May 9, 2003) Indian Gaming Fee Information, pp. 8-9.) The clear import of the Compact language and surrounding legislation suggest that the State has an obligation to keep all information and documents received under the Compact confidential.
Federal law also provides that the National Indian Gaming Commission may inspect and audit tribal financial records (25 U.S.C. § 2706(b)(4)) and specifies that this information is exempt from the Freedom of Information Act (5 U.S.C. § 552) as trade secrets, commercial or financial privileged or confidential information and as records compiled for law enforcement purposes. *523 (25 U.S.C. § 2716(b), citing 5 U.S.C. § 552(b)(4) & (7).) A number of tribes submitted amicus curiae briefs to the trial court arguing, among other things, that the information Cates seeks is privileged trade secret information under Evidence Code section 1060. Notably, any matter protected against disclosure at trial under an evidentiary privilege is generally protected against discovery. (§ 2017.010 [discovery is permitted of "any matter, not privileged, that is relevant to the subject matter," etc.].)
Cates contends the trial court erred in denying the requested discovery on privacy grounds because the Compact does not prohibit the discovery of confidential information and her interest in determining the truth prevails over the privacy rights of the individual tribes. Conspicuously absent is any discussion by Cates regarding why the requested information should not be protected from discovery as trade secret information. Accordingly, Cates has not demonstrated that the trial court's ruling fell outside the bounds of reason.
We note that this ruling pertains only to the motion before us and nothing we have said precludes Cates from seeking this information under appropriate confidentiality agreements or protective orders.

B. Motion to Compel Return of Documents
In July 2005, the Commission sought an order compelling return of confidential documents that Cates allegedly misappropriated from her former employer under the court's inherent power to control the proceedings before it. (§ 128, subd. (a).) Cates opposed the motion, arguing it amounted to an improper attempt to obtain injunctive relief and that the court lacked the authority and jurisdiction to order return of the documents because the documents were not obtained by any improper discovery method or in violation of a discovery statute. The trial court used its inherent power to order return of the documents, noting that Cates could subpoena the documents and it would later address whether they could be used at trial.
As a threshold matter, we reject Cates's argument that she was denied due process because the court did not give her an opportunity to prove she did not steal the documents. Cates received notice of the hearing on the motion, she filed written opposition and her counsel orally argued the matter. Cates never requested an opportunity to testify and she cannot raise this issue for the first time on appeal. (Jones v. Wagner (2001) 90 Cal.App.4th 466, 481, 108 Cal.Rptr.2d 669.)
We also reject Cates's argument that the trial court lacked the authority to order return of the documents because Cates's former employer is not a party to this action. A trial court has the power "[t]o control in furtherance of justice, the conduct of its ministerial officers, and of all other persons in any manner connected with a judicial proceeding before it, in every matter pertaining thereto." (§ 128, subd. (a)(5).) Cates is a person connected to the proceeding and the order was within the court's authority. Finally, Cates has not shown that the trial court abused its discretion when it ordered return of the documents. Defendants' counsel filed a sworn declaration stating that the documents were confidential, Cates did not obtain the documents as the result of a proper discovery request and some of the tribes requested that the documents be returned. Based on the record before us, we cannot conclude that the trial court abused its discretion when it ordered that the documents be returned.


*524 DISPOSITION
The judgment is reversed and remanded and the discovery orders are affirmed. Plaintiff is awarded costs on appeal.
WE CONCUR: HALLER, Acting P.J., and O'ROURKE, J.
