![]() If your application only sends reports to the printer, it is lacking the functionality to make your data accessible to a variety of applications. But printing this report to Acrobat PDFWriter will result in an unreadable PDF file. For example, if a report was designed for use with an HP printer, then it is okay to switch between similar models of an HP printer. If the new printer doesn’t use the same printer language as the default printer that the report was designed to use, then the report will not print correctly. Each printer uses a unique printer language for producing output. PaperOrientation and PaperSize).Ĭhanging the printer name can cause the report output to be scrambled. In same cases you will have to use a predefined constant to set the property (e.g. Set the tray that the paper is printed from.Ĭhange the printer by passing a string that exactly matches the printer name listed in the Printers Control Panel.Įach of these properties is easy to modify. ![]() Set the paper size using pre-defined size constants. There are only a half dozen properties that this class exposes (see Table 14-1). This information was set by the report designer and won't need to change during runtime. Although you can override the property values, more than likely, you will only want to read from these values. ![]() The class that maintains this summary information is the SummaryInfo class. This information is set during design mode by right-clicking on the report and selecting Report | Summary Info. This information is set by the report designer and it usually consists of things such as the report author, the report title and report comments. Either method gives you access to the properties of the object variable to manage the different collections.Įvery report has a variety of summary information saved with it. Both of these methods were discussed in Chapter 3. You can declare and instantiate it yourself, or you can add a ReportDocument component to your form. There are two ways to create this object variable. Since it is a class, you have to declare an object variable and instantiate it. The ReportDocument object model.Įvery report in Visual Studio is saved as a class. = My.ĬrystalReportViewer.ReportSource = MyReportĬrystalReportViewer.Figure 14-2. Public Sub ShowReport(ByVal MyReport As, ByVal filterstring As String, ByVal CrystalReportViewer As )ĭim myLogonInfo As New įor Each myTable In ShowReport(MyReport, filterstring, CrystalReportViewer1) MyReport.SetParameterValue("TestParameter", TextBo圆.Text) Private Sub btnShowReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowReport.Clickĭim MyReport As = New DailyShadeCosting Now Click on Project Menu and go Your Project Propertise and click Setting then setup this format This is my code : Dim cryRpt As New rptPrntIssĬryRpt.Load("C:\Users\IEEC\Desktop\Sys\InventorySys\InventorySys\rptPrntIss.rpt")ĬrystalReportViewer1.ReportSource = cryRptĭim crParameterFieldDefinitions As ParameterFieldDefinitionsĭim crParameterFieldDefinition As ParameterFieldDefinitionĭim crParameterValues As New ParameterValuesĭim crParameterDiscreteValue As New ParameterDiscreteValueĬrParameterDiscreteValue.Value = ĬrParameterFieldDefinitions = ĬrParameterFieldDefinition = crParameterFieldDefinitions.Item("IID")ĬrParameterValues = crParameterFieldDefinition.CurrentValuesĬrParameterValues.Add(crParameterDiscreteValue)ĬrParameterFieldDefinition.Appl圜urrentValues(crParameterValues)Ĭreate A New Parameter 'TestParameter' on your report then put Your desire location. But when the report loads it has nothing to display with. I created a parameter in Crystal Report named IID.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |