/***********************************************************************************
 * @@ Program Name : StaticMReportViewer.java Description : 보고한 보고자료와 문서 양식을 조합하여 보고자료 보기 처리 해줌 Author : 강원중 Create Date
 *    : 2004-10-21 History :
 * @@
 ***********************************************************************************/

package kr.co.kihyun.beans.totsys.report;

import kr.co.kihyun.beans.entity.TotDoc;
import kr.co.kihyun.moumi.report.MReport;

public class ReportViewFormElement extends ReportFormElement {
	private int rowCount = 0;
	private String datas = "";
	private String totDatas = "";

	public ReportViewFormElement(TotDoc totDoc, int outType) {
		super(totDoc, MReport.REPORT_OUT, outType);
	}

    public ReportViewFormElement(TotDoc totDoc, TotDoc slaveDoc,int outType) {
		super(totDoc, slaveDoc,MReport.REPORT_OUT, outType);
	}

	public void setReportData(String deptID, String userID) {
		setReportData(deptID, userID, "");
	}

	public void setReportData(String deptID, String userID, String outType) {
		itemAnalysis(getTotDoc());

		/*********** ReportList values ***********/
		ReportView repoView = new ReportView();
                //v2. 6.SQL 삽입 : repoView.executeQuery에서 prepare SQL 문으로 되어 있다.
		repoView.executeQuery(getTotDoc().getId(),deptID, userID);
                //================
		setRowCount(repoView.getRowCount());
		setDatas(repoView.getData());
		setTotDatas(repoView.getTotData());
	}

	/**
	 * @return the rowCount
	 */ public int getRowCount() {
		return rowCount;
	}

	/**
	 * @param rowCount the rowCount to set
	 */ public void setRowCount(int rowCount) {
		this.rowCount = rowCount;
	}

	/**
	 * @return the datas
	 */ public String getDatas() {
		return datas;
	}

	/**
	 * @param datas the datas to set
	 */ public void setDatas(String datas) {

		this.datas = datas;
	}

	/**
	 * @return the totDatas
	 */ public String getTotDatas() {
		return totDatas;
	}

	/**
	 * @param totDatas the totDatas to set
	 */ public void setTotDatas(String totDatas) {
		this.totDatas = totDatas;
	}
}
