private void btnGenerate_Click(object sender, EventArgs e)
		{
			if (GeneratedReportID == 0)
			{
				lblError.Visible = true;
			}
			else
			{

				if (GeneratedReportType == QuickReport.GeneratedReportTypes.Browse)
				{
					BPQuickReports bp = new BPQuickReports();
					DSQuickReports = bp.SelectByID(QuickReportID);
					BEQuickReports.tbl_QuickReportsRow quickReport = DSQuickReports.tbl_QuickReports.FindByQuickReportID(QuickReportID);
					Response.Redirect(quickReport.BrowsePage + "?GeneratedReportID=" + GeneratedReportID);
				}
				else
				{
					Response.Redirect("ViewReport.aspx?GeneratedReportID=" + GeneratedReportID + "&CompanyID=" + CompanyID);
				}
			}
		}
		private void btnCancel_Click(object sender, System.EventArgs e)
		{
			if(GeneratedReportType == QuickReport.GeneratedReportTypes.Report)
			{
				Response.Redirect("BrowseQuickReports.aspx?QuickReportID=" + Convert.ToInt32(QuickReportID));
			}
			else
			{
				BPQuickReports bp = new BPQuickReports();
				DSQuickReports = bp.SelectByID(QuickReportID);
				BEQuickReports.tbl_QuickReportsRow quickReport = DSQuickReports.tbl_QuickReports.FindByQuickReportID(QuickReportID);
				Response.Redirect(quickReport.BrowsePage);
			}
		}
Example #3
0
		private void LoadTables()
		{
			ddlTables.Items.Clear();
			BPQuickReports bp = new BPQuickReports();
			if (ddlReports.SelectedValue == "0")
			{
				//ddlTables.DataSource = bp.SelectAll();
			}
			else
			{
				ddlTables.DataSource = bp.SelectByID(Convert.ToInt32(ddlReports.SelectedValue));
			}
			ddlTables.DataMember = "tbl_QuickReports";
			ddlTables.DataTextField = "TableName";
			ddlTables.DataValueField = "QuickReportID";
			ddlTables.DataBind();
			ddlTables.Items.Insert(0,new ListItem("Select Table","0"));
		}