⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 doutputreport.cpp

📁 用VC+SQL实现的物流管理系统 “RxMediaPlayer” 文件夹中存放《物流综合管理系统》中《媒体播放平台》源程序 “数据库设置”文件夹中存放《物流综合管理系统》辅助工具《数据库设置》源程
💻 CPP
字号:
// DOutPutReport.cpp: implementation of the CDOutPutReport class.
#include "stdafx.h"
#include "MyProject.h"
#include "DOutPutReport.h"
#include "ExternDllHeader.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

CDOutPutReport::CDOutPutReport()
{

}

CDOutPutReport::~CDOutPutReport()
{

}

void CDOutPutReport::OnButquery()
{
	CString sSQL,sDate1,sDate2,sClew;
	CTime date1,date2;
	m_DtDate1.GetTime(date1);
	m_DtDate2.GetTime(date2);
	sDate1=CTimeToCString(date1);
	sDate2=CTimeToCString(date2);
	sSQL.Format("SELECT * FROM (SELECT c.名称, c.规格, c.产地, c.计量单位, sum(b.出库数量) AS 合计数量  FROM 出库记录表 a INNER JOIN 出库明细表 b  ON  a.出库票号 = b.出库票号  INNER JOIN 商品信息表 c  ON b.商品条型码 = c.条形码  WHERE a.出库日期 BETWEEN  '%s' AND '%s' GROUP BY  c.名称, c.规格, c.产地, c.计量单位) DERIVEDTBL  ORDER BY 合计数量 DESC",sDate1,sDate2);
	rst.Open(sSQL,adCmdText);
	this->DlgReport.m_Grid.DeleteAllItems();
	this->DlgReport.m_Grid.AddCellValue(rst);
	this->DlgChart.SetRecordset(rst);
	
}

void CDOutPutReport::Init()
{
	this->SetWindowText("出库汇总报表");
	this->m_StaClew.SetWindowText("出库日期");
	CString sSQL;
	sSQL.Format("SELECT * FROM (SELECT c.名称, c.规格, c.产地, c.计量单位, sum(b.出库数量) AS 合计数量  FROM 出库记录表 a INNER JOIN 出库明细表 b  ON  a.出库票号 = b.出库票号  INNER JOIN 商品信息表 c  ON b.商品条型码 = c.条形码 GROUP BY  c.名称, c.规格, c.产地, c.计量单位) DERIVEDTBL  ORDER BY 合计数量 DESC");
	rst.Open(sSQL,adCmdText);
	this->DlgReport.SetRecordset(rst);
	this->DlgChart.SetRecordset(rst);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -