dstorereport.cpp

来自「用VC+SQL实现的物流管理系统 “RxMediaPlayer” 文件夹中存放」· C++ 代码 · 共 45 行

CPP
45
字号
// DStoreReport.cpp: implementation of the CDStoreReport class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "MyProject.h"
#include "DStoreReport.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CDStoreReport::CDStoreReport()
{

}

CDStoreReport::~CDStoreReport()
{

}

void CDStoreReport::Init()
{
	this->SetWindowText("商品库存报表");
	this->m_StaClew.SetWindowText("查询日期");
	CString sSQL;
	sSQL.Format("SELECT 名称 AS 名称,SUM(库存数量) AS 合计数量 ,计量单位 FROM(SELECT b.条形码,b.名称,b.规格,b.产地 ,b.计量单位,c.仓库名称,str(货位_排)+'-'+Ltrim(str(货位_号)) AS 货位,库存数量,库存上限,库存下限 FROM 库存信息表 a INNER JOIN 商品信息表 b ON a.商品条形码=b.条形码 inner join 仓库信息表 c ON a.仓库编号=c.编号)DERIVEDTBL GROUP BY 名称,计量单位");
	rst.Open(sSQL,adCmdText);
	this->m_ButQuery.EnableWindow(false);
	this->m_DtDate1.EnableWindow(false);
	this->m_DtDate2.EnableWindow(false);
	this->Invalidate();
	this->DlgReport.SetRecordset(rst);
	this->DlgChart.SetRecordset(rst);

}

⌨️ 快捷键说明

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