Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Crystal report log on failed


Message #1 by "Nazim" <syednazimzawar@h...> on Mon, 17 Sep 2001 09:38:05
Hello Nazim,

Here are the steps to define and then bind the crystal report at runtime.

The first step consists in defining the report's .rpt file

 In the second step u bind these .rpt files to the CrystalReportViewer in
the  programs at the runtime .

 For this u select the CrystalreportViewer from the toolbox.
 Go to the properties of the CrystalReportViewer and  Select
Data-DataBindings. 
 Then on the list provided on the DataBindings window select the RepotSource
option,
 Check the "Custom Binding Expression" and enter the path of the .rpt file
created earlier on and which is to be 
 Shown as the report (for exp
"C:\inetpub\wwwroot\CrystalReportSasmple\Report.rpt")
 And then in the program's .vb or .cs file enter the folln code

 CrystalReportViewerName.DataBind()


In case there are multiple reports and one of these is to presented at the
runtime then the "report source" too needs
To be specified in the code before the databind expression
i.e. CrystalReportViewerName.ReportSource = "fully qualified path of the
.rpt file"
      CrystalReportViewerName.DataBind()

In case u want to use the selection formula say u have a table abc with
field ID and u want to get
The records for ID > 5

Then follow these steps

CrystalReportViewerName.SelectionFormula = "{abc.ID } > 5"
CrystalReportViewerName.DataBind()


regards
Santosh

-----Original Message-----
From: Nazim [mailto:syednazimzawar@h...]
Sent: Monday, September 17, 2001 3:08 PM
To: ASPX_Professional
Subject: [aspx_professional] Crystal report log on failed


Am trying to bind a report with cystal viewer on runtime, am using 
vb.net . can any1 help me how to do it. my backend is sql server. i would 
appreciate if some1 suggests how to go about selectionformula too.

Thanx


  Return to Index