crystal report customer pagesize
来源:互联网 发布:深圳租房 知乎 编辑:程序博客网 时间:2024/05/22 09:00
Go to Start > Settings > Printers.
Select File > Server Properties.
Select Create New Form.
Type a name for your new form.
Enter the paper size of your form. You can also enter the margins if applicable.
Click Ports. Select the port to which the printer is attached.
Click Drivers. Select the printer driver.
Click Save Form.
Return to Crystal Reports. Go to Page Setup. Your new form should be listed in the drop-down list in the Page Options panel. It will set your horizontal and vertical dimensions to the same as you added on your new form. This will also keep the orientation correct (not changing between portrait and landscape).
Select File > Server Properties.
Select Create New Form.
Type a name for your new form.
Enter the paper size of your form. You can also enter the margins if applicable.
Click Ports. Select the port to which the printer is attached.
Click Drivers. Select the printer driver.
Click Save Form.
Return to Crystal Reports. Go to Page Setup. Your new form should be listed in the drop-down list in the Page Options panel. It will set your horizontal and vertical dimensions to the same as you added on your new form. This will also keep the orientation correct (not changing between portrait and landscape).
setting customer pagesize in code:
C# version:
System.Drawing.Printing.PrintDocument doctoprint = new System.Drawing.Printing.PrintDocument();
doctoprint.PrinterSettings.PrinterName = "Printer"; //'(ex. "Epson SQ-1170 ESC/P 2")
for (int i = 0; i < doctoprint.PrinterSettings.PaperSizes.Count - 1; i++)
{
int rawKind;
if (doctoprint.PrinterSettings.PaperSizes[i].PaperName == "72mm x Receipt")
{
rawKind = Convert.ToInt32(doctoprint.PrinterSettings.PaperSizes[i].GetType().GetField("kind", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(doctoprint.PrinterSettings.PaperSizes[i]));
//crPrintOut.PrintOptions.PaperSize = rawKind;
crPrintOut.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)rawKind;
break;
}
}
System.Drawing.Printing.PrintDocument doctoprint = new System.Drawing.Printing.PrintDocument();
doctoprint.PrinterSettings.PrinterName = "Printer"; //'(ex. "Epson SQ-1170 ESC/P 2")
for (int i = 0; i < doctoprint.PrinterSettings.PaperSizes.Count - 1; i++)
{
int rawKind;
if (doctoprint.PrinterSettings.PaperSizes[i].PaperName == "72mm x Receipt")
{
rawKind = Convert.ToInt32(doctoprint.PrinterSettings.PaperSizes[i].GetType().GetField("kind", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(doctoprint.PrinterSettings.PaperSizes[i]));
//crPrintOut.PrintOptions.PaperSize = rawKind;
crPrintOut.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)rawKind;
break;
}
}
- Proposed as answer by deepgags
0 0
- crystal report customer pagesize
- crystal report
- Crystal Report
- Crystal Report 其他帮助文件
- Crystal Report's BUG?
- Crystal Report 其他帮助文件
- Crystal Report print (vb)
- [Crystal Report]使用技巧
- Crystal Report注册码
- crystal report初体验
- Crystal Report 部署
- 如何部署Crystal Report
- crystal report tips
- Crystal Report开发报表
- Crystal Report制作使用
- crystal report 报表制作
- Crystal Report的使用
- Crystal Report开发报表
- FolderBrowserDialog(文件夹浏览对话框) 使用详解和例子
- shell
- 1214
- C#中String类的几个方法(IndexOf、LastIndexOf、Substring)
- 我的第一个JS组件-跨浏览器JS调试工具
- crystal report customer pagesize
- 让普通C++类轻松支持IDispatch自动化接口
- ios中一些老组件(ARC之前)的导入方法
- How to display Chinese/Japanese (Unicode) Character on Windows
- 最新版本spring框架下载
- LeetCode | Sudoku Solver
- Sql Server 2008登录失败问题
- 判断字符串内容是否为数字
- Integer与int的区别