当前位置:网站首页>Devaxpress xtrareport report development related knowledge points
Devaxpress xtrareport report development related knowledge points
2022-07-21 15:16:00 【I Can -Jiang】
1、 Background binding DataSource, grouping
/// <summary>
/// Constructor with parameters
/// </summary>
/// <param name="ds"> Data set to bind </param>
public Pick_Report(DataSet ds) : this()
{
//if (!FormAssistant.IsDsNull(ds))
//{
DataSource = ds;
DataMember = "Table1";
FillControlValue(ds);
dt = ds.Tables[0];
//}
}
private void FillControlValue(DataSet ds)
{
// by XRLable Bind data set and corresponding fields
Company.DataBindings.Add("Text", ds.Tables[0], " factory ");
//XQDate.DataBindings.Add("Text", ds, " Demand date ");
MainMemo.DataBindings.Add("Text", ds, " Main table remarks ");
//PrintCount.DataBindings.Add("Text", ds, " Number of prints ");
BillNo.DataBindings.Add("Text", ds, " Document number ");
Dept.DataBindings.Add("Text", ds, " department ");
CQ.DataBindings.Add("Text", ds, " Plant area ");
RowCode.DataBindings.Add("Text", ds.Tables[0], " Serial number ");
MaterialId.DataBindings.Add("Text", ds.Tables[0], " Material code ");
MaterialName.DataBindings.Add("Text", ds.Tables[0], " Material name ");
//MaterialGroup.DataBindings.Add("Text", ds, " Item group ");
Warehouse.DataBindings.Add("Text", ds, " Issuing warehouse ");
//JSWarehouse.DataBindings.Add("Text", ds, " Receiving warehouse ");
Quantity.DataBindings.Add("Text", ds.Tables[0], " Number ", "{0:f0}");
UnitId.DataBindings.Add("Text", ds.Tables[0], " Company ");
BatchNo.DataBindings.Add("Text", ds.Tables[0], " Batch number ");
//PPNo.DataBindings.Add("Text", ds, " Work order No ");
MaterialSpec.DataBindings.Add("Text", ds.Tables[0], " Specifications and models ");
SumQty.DataBindings.Add("Text", ds.Tables[0], " Number ", "{0:f0}");
SumQty.Summary = new XRSummary(SummaryRunning.Group, SummaryFunc.Sum, string.Empty);
PerName.DataBindings.Add("Text", ds, " Applicant ");
//FLName.DataBindings.Add("Text", ds, " Issuer ");
//SLName.DataBindings.Add("Text", ds, " Receiver ");
//PriName.DataBindings.Add("Text", ds, " Auditor ");
GroupField df = new GroupField(" Document number ");
GroupHeader1.GroupFields.Add(df);
}
2、 other Form Click the button to print the preview
Pick_Report rp = new Pick_Report(ds);
PreviewLocalizer.Active = new ChineaseReportLocalizer();
rp.ShowPreview();
3、 Event after clicking the print button :( I'm here to change the number of prints )
private void Pick_Report_PrintProgress(object sender, DevExpress.XtraPrinting.PrintProgressEventArgs e)
{
string BillNo = "('";
BillNo += dt.Rows[0][" Document number "].ToString();
for (int i = 1; i < dt.Rows.Count; i++)
{
BillNo += "','"+dt.Rows[i][" Document number "].ToString() ;
}
BillNo += "')";
BillNo = BillNo.Replace(",''", "");
sql = " update MM_purPurchasePickMain set State = 20 where BillNo in "+BillNo;
if (!DB.AF.sqlExec(sql, sqlconnSAP, out errMsg))
{
XtraMessageBox.Show(errMsg);
}
}
边栏推荐
- leetcode:689. Maximum sum of three non overlapping subarrays
- Design details related to sap e-commerce cloud Spartacus UI store
- Opportunities and challenges coexist for financial enterprises to go to sea in emerging markets, advance AI ensures its safety and compliance development
- SQL: SELECT t.`app_ code`, SUM(t.`success_num`) AS success_ num, SUM(t.`
- Implementation details of SAP e-commerce cloud Spartacus UI sitecontexturlparams
- Functions of the machine room dynamic loop monitoring system and main functions of the dynamic loop monitoring system
- [public class preview]: cloud video conference system privatization practice
- .NET Core 加载程序集AssemblyLoadContext
- DAM-第十三章(数据质量管理)
- LoRa基站覆盖范围
猜你喜欢
Skillfully using roaringbitmap to deal with the memory diff problem of massive data
Winform记住密码功能
图解LeetCode——1260. 二维网格迁移(难度:简单)
Hangzhou dynamic environment monitoring system supplier, dynamic environment monitoring equipment
PLC的通信模式
Okaleido tiger NFT即将登录Binance NFT平台,后市持续看好
let's go——2022年读书活动招募书(第1期)
openGauss内核分析:查询重写
Nacos cluster construction
DevExpress TreeList 实现父节点列值选中,其下子节点也全部选中
随机推荐
Arm assembly instruction set with examples
service和systemctl的区别/修改PATH的方法/一条命令查看IP地址和网关以及DNS服务器
C#调用存储过程传输表值参数
金融企业出海新兴市场机遇与挑战并存,ADVANCE.AI保障其安全合规发展
Detailed explanation of TCP communication concurrent server (with case code)
Skillfully using roaringbitmap to deal with the memory diff problem of massive data
[binary tree] maximum product of split binary tree
Un fantôme.
Section 3 of Chapter 2: general operation of string
Visual Studio 好用的插件分享
DAMA-第四章(数据架构)
从去IOE到CIPU,中国云计算要走出自己的路径
[CVA valuation training camp] read the annual reports of listed companies_ Lesson 2
招财喵|玉喵泰哥扑万两,梨花一支夏清雨
TCP sliding window explanation (very practical)
Flask 源码剖析(一)请求入口
DevExpress之GridControl按delete键删除所选行项
TDSQL PG版节省30%磁盘空间的同时如何保障数据安全?|DB·洞见
Many people think that the development logic of the metauniverse is consistent with that of the Internet, but I don't think so
Semantic matching of English keyword text splitting