Reputation: 2140
A company developed a small web interface written in VB.net to query a database and produce reports. The interface uses CrystalDecisions.Shared
library. In the code, it references this:
If rbExportType.SelectedValue = "PDF" Then
Dim sda As New DB2DataAdapter(cmd)
ReportName = "Reports/R002.rpt"
rpt.Load(Server.MapPath(ReportName), CrystalDecisions.[Shared].OpenReportMethod.OpenReportByTempCopy)
sda.Fill(ds.tbl_R002)
rpt.SetDataSource(ds)
rpt.SetParameterValue(0, ddDatabase.SelectedItem.Text)
ExporttoPDF()
Else
Now, the users have asked me to add a simple field to the report, Date
. I've edited the query to pull this data, but when I run the report the Date
field is not shown on the report. I'm assuming that the actual .rpt file has to be edited to include this field on the report.
When trying to edit Reports/R002.rpt
in a text editor, there are just numbers/symbols.
How can I edit this .rpt file? The version of Visual Studio 2010 has past it's trial.
Upvotes: 0
Views: 8212
Reputation: 416059
Visual Studio has (or had) a Crystal Reports editor built in. I couldn't find it just now in my Visual Studio 2012 install, so it's possible they dropped it in favor of their own Reporting Services platform, but I might just have missed it. If you can't find the editor in your Visual Studio 2010 copy, try downloading an older version of Visual Studio.
Update:
A quick Google search indicates that it's simply distributed separately now.
Here's the VS2012 version: http://scn.sap.com/docs/DOC-35074
Here's the VS2010 version: http://scn.sap.com/docs/DOC-7824
Upvotes: 2
Reputation: 2213
CrystalReports is a proprietary software and wouldn't be part of the default VS package.
And yes, in order to add a field to the report, you would have to edit the report itself. Its not that big of a deal, if you have a copy of the CrystalReport software.
Upvotes: 0