Crystal Report自定义页面/纸张尺寸 [英] Crystal Report custom page/paper size

查看:218
本文介绍了Crystal Report自定义页面/纸张尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想在A4尺寸纸张的一半中打印钞票,即宽度:8.269英寸,高度:5.847英寸。我已经尝试过几次使用不同的设置。它具有尺寸,但问题是它以 landscape 方向打印。就像下面的图片一样。

I just want to print a bill in half of A4 size paper i.e. Width: 8.269 inches, Height: 5.847 inches. I have tried several times with different settings. It gets the size, but the problem is it is printing in landscape orientation. Just like the picture below.

即使进行了大规模搜索,我也无法得到我的问题的答案。当我写问题时, stackoverflow 给了我一些答案建议。

Even after a massive search, I am unable to get the answer of my question. When I am writing my question, stackoverflow gave me some answer suggestions.

就像

但是如何在开发PC中获得客户的打印机设置?难道不是通用打印机在所有打印机上都能正常工作吗?如果客户出于任何原因更换打印机,那将是一团糟吗?

But how can I get the client's printer setup in my development pc ? Is it not like generic that works fine in all printers ? If client change the printer for any reason, it will be a mess right ?

,问题仍然存在,但问题尚未解决。

In this question, the problem persists and the question was not solved.

根据这个问题,我之前尝试过此过程,但是失败了。

As per the answer of this question, I tried this process before, but failed.

我已写信给< a href = http://scn.sap.com/message/16058438#16058438 rel = nofollow noreferrer> SAP 。他们用文件链接回答了我,说可以解决我的问题。我发现这是我使用 vb.net c#代码。我能理解代码,但是我不知道从哪里开始。

I have written to SAP. They answered me with a link of a file and stated it could solve my problem. I found it is a c# code where I am using vb.net. I can understand the code, but I am unable to understand from where to start.

我总是使用水晶报表


  1. 直接连接到打印机.....

  1. directly to the printer.....

    Dim stdata As New DataSet()
    dbcommand.Connection = conn
    dbcommand.CommandText = qry
    dbadapter.SelectCommand = dbcommand
    dbadapter.Fill(stdata)
    stdata.WriteXml(Application.StartupPath & "\ReportXml\bill.xml", XmlWriteMode.WriteSchema)

    Dim objRpt As New NormalSaleBill
    objRpt.SetDataSource(stdata.Tables(0))
    Dim printPages As Integer = G_DefaultPrintPages '<--- A variable with print page count 
    objRpt.PrintToPrinter(printPages, True, 0, 0)



  1. 使用报表查看器...

  1. with report viewer...

        Dim stdata As New DataSet()
    dbcommand.Connection = conn
    dbcommand.CommandText = qry
    dbadapter.SelectCommand = dbcommand
    dbadapter.Fill(stdata)
    stdata.WriteXml(Application.StartupPath & "\ReportXml\SaleBill.xml", XmlWriteMode.WriteSchema)

    Dim objRpt As New NormalSaleBill
    objRpt.SetDataSource(stdata.Tables(0))

    FormReport.RptViewer.ReportSource = objRpt
    FormReport.ShowDialog()
    FormReport.RptViewer.RefreshReport()


那么我应该在哪里放置自定义纸张/页面尺寸(如果只能通过编程方式完成)?

So where should I put the custom paper/page size (If it can only be done programatically) ?

我完全感到困惑。我非常需要它,但是我无法解决它。我不需要任何现成的代码。但是,至少有一个指南可以帮助我。

I am totally confused. I need it badly, but I am unable to resolve it. I do not want any ready-made code. But at least a guide could help me.

为您提供信息,我正在将VB.NET 2010与Crystal Report 13配合使用。

For your information, I am using VB.NET 2010 with Crystal Report 13.

推荐答案

尝试使用纵向A3尺寸并调整顶部和底部边距

Try size A3 in portrait and adjust your top and bottom margins

这篇关于Crystal Report自定义页面/纸张尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆