2015-11-03 50 views
0

我已经在Visual Studio 2008上开发了带有水晶报表的asp.net web窗体。我将默认纸张尺寸设置为“自定义尺寸”。但是当我发布网站时,水晶报表浏览器总是呈现为A4大小。Crystal Report的默认纸张尺寸设置

我也添加了代码来将纸张大小设置为代码后面的“自定义大小”。但是当我再次发布网站时,它显示错误消息“无法加载报告”

任何人都知道如何解决这个问题?

回答

0

尝试这个 -

Private Sub frmPrinterOption_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim i As Integer xmlDoc.Load(Application.StartupPath + "\Printer.xml") Dim xNodeBase As XmlNode = xmlDoc.DocumentElement Dim xNode As XmlNodeList xNode = xNodeBase.SelectNodes("//Print//PrintName") For i = 0 To xNode.Count - 1 Me.PrinterTextEdit.Text = (xNode.Item(i).ChildNodes(0).Value) Next i xNode = xNodeBase.SelectNodes("//Print//PaperSize") For i = 0 To xNode.Count - 1 Me.PrintSizeTextEdit.Text = (xNode.Item(i).ChildNodes(0).Value) Next i End Sub Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click Dim xNodeBase As XmlNode = xmlDoc.DocumentElement Dim xNode As XmlNodeList xNode = xNodeBase.SelectNodes("//Print//PrintName") xNode.Item(SIndex).ChildNodes(0).Value = Me.PrinterTextEdit.Text xmlDoc.Save(Application.StartupPath + "\Printer.xml") xNode = xNodeBase.SelectNodes("//Print//PaperSize") xNode.Item(SIndex).ChildNodes(0).Value = Me.PrintSizeTextEdit.Text xmlDoc.Save(Application.StartupPath + "\Printer.xml") MsgBox("Saved Successfully.......", MsgBoxStyle.Information + MsgBoxStyle.OkOnly) Me.Close() End Sub

相关问题