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

📄 inputreport.cpp

📁 物流综合管理系统
💻 CPP
字号:
// InputReport.cpp: implementation of the CInputReport class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "MyProject.h"
#include "InputReport.h"
#include "ExternDllHeader.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

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

CInputReport::CInputReport()
{

}

CInputReport::~CInputReport()
{

}

void CInputReport::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);

}

void CInputReport::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);
}

⌨️ 快捷键说明

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