实现一个Print(PrintContent printContent)函数。
而PrintContent格式 是一个可能具有子表表单的结构class PrintFormat
{
String Caption;
int Width; //0-100
String Type; //S字符串, L列表
}class PrintList
{
PrintFormat[] ListFormat;
object[][] Content;
}class PrintItem
{
PrintFormat ItemFormat;
Object Content; // string or PrintList
}class PrintContent
{
string Caption;
PrintItem[] PrintItems;
}希望打印出如下示例 入库单
入库单号: 22222222 入库日期:2006-01-23 状态: 创建
客户:××××× 入库仓库:×××× 来源类型:××××
备注:×××××××入库明细产品 产品名称 条形码 产品种类 计量单位 入库数量 产品规格
产品1 ××××× ××× ×××× ×××× ××××× ×××××
库区 库位 入库数量
库区1 ××× ××××
库区2 ××× ×××
库区3 ××× ××××
产品2 ××××× ××× ×××× ×××× ××××× ×××××
库区 库位 入库数量
××1 ××× ××××
××2 ××× ××××
大概就是这样,哪位大侠给点提示啊!! 谢谢了!
而PrintContent格式 是一个可能具有子表表单的结构class PrintFormat
{
String Caption;
int Width; //0-100
String Type; //S字符串, L列表
}class PrintList
{
PrintFormat[] ListFormat;
object[][] Content;
}class PrintItem
{
PrintFormat ItemFormat;
Object Content; // string or PrintList
}class PrintContent
{
string Caption;
PrintItem[] PrintItems;
}希望打印出如下示例 入库单
入库单号: 22222222 入库日期:2006-01-23 状态: 创建
客户:××××× 入库仓库:×××× 来源类型:××××
备注:×××××××入库明细产品 产品名称 条形码 产品种类 计量单位 入库数量 产品规格
产品1 ××××× ××× ×××× ×××× ××××× ×××××
库区 库位 入库数量
库区1 ××× ××××
库区2 ××× ×××
库区3 ××× ××××
产品2 ××××× ××× ×××× ×××× ××××× ×××××
库区 库位 入库数量
××1 ××× ××××
××2 ××× ××××
大概就是这样,哪位大侠给点提示啊!! 谢谢了!
解决方案 »
- c#中为什么sbyte和short类型的数据不会溢出
- 帮一下忙呗大侠们 我的程序怎么实现这个效果啊
- 第三次发贴:vs05向导生成的DataSet如何使用参数???
- Winform做的安装包不能安装了..别的电脑上都能装.【如图】
- C#中,组合框可以多列显示吗?
- 高分求 ILOG Gantt 3.0 注册机
- 为何通过服务器名可以访问,而通过ip访问就不可以?
- 在C#中的MFC!!
- 100分求助:如何在C#中使用recordset?
- 是否有办法取得listview每个列的坐标啊?
- 我能判断,WORD文件中是否有内容吗?顶帖有分!
- 100分再论HttpWebRequest登陆后保持cookie问题!!!
报表打印控件wsReport
具体怎么操作呢,偶好迷茫。。
没找到呢
但是要求也不是那样子到,是读取一个个字段到打印页面上
比如第一行一个标题“入库单”
第二行获取内容“入库单号: 22222222 ”及其所占width,再获取下一个“入库日期:2006-01-23 ”及width如果本行长度不够则换行
还有表格到列名、内容及附属子表等哪位好心人指点指点偶呀!!
{
/// <summary>
/// PrintContent 的摘要说明。
/// </summary>
public class PrintContent
{
private static string m_Caption;
private static PrintItem[] m_PrintItem; public PrintContent()
{
//
// TODO: 在此处添加构造函数逻辑
//
} public static string Caption
{
get { return m_Caption; }
set { m_Caption = value; }
} public static PrintItem[] PrintItem
{
get { return m_PrintItem; }
set { m_PrintItem = value; }
}
} public class PrintFormat
{
public PrintFormat()
{
}
string Caption;
int Width; //整行宽设为100,获取(行宽/100×width)即为列宽
string Type; //S代表是字符串,L代表为列表
} public class PrintList
{
public PrintList()
{
}
PrintFormat[] ListFormat;
object[][] Content;
} public class PrintItem
{
public PrintItem()
{
}
PrintFormat ItemFormat;
object Content;
}
}那怎么在Print()里获取PrintContent各item再弄到printDocument上啊?