Editing an .rpt file - vb.net

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.

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

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.

Related

Error opening an .RPT Crystal Report file

I have a crystal report .RPT file which was created in 2004. I am having trouble opening it using software like VB or Crystal Report. It shows "Failed to open Document", follow by "Invalid Report Schema". Seems like the file itself it corrupted, but there is an application generating reports using this file that is still running fine, and it is able to read the file without any problem.
Is there any other software I can use to possibly open this file up? I need to edit the formula expression in a couple fields. When I tried NotePad++, it shows a bunch of unreadable characters which don't help at all. By the way, this file seems to be consisted with a bunch of reports. (There are about 10 reports within this .RPT file.)
I am not sure what the problem is here, could anyone please help me? Any help/suggestion is greatly appreciated!
Thanks,
In that era of Crystal Reports, version 10 would have been the current release. Through version 10, .rpt files could not be successfully opened by any version earlier than the version which last saved the file. Ergo, to open and edit the file, you need the designer/editor for the version which produced that file, or else a newer designer/editor.
If your current Crystal Developer tool wont open it, then it is from a newer one than you are using, or it is truly corrupted ( but since you say it is running well within an application then it's almost certainly not corrupted ).
You need to determine specifically what version of Designer DLL is being invoked by the application that is running the report. Open the source code project and look at the REFERENCES, get the name and GUID of the CRAXDRT.DLL ( or CRAXDDRT.DLL ) and then find exactly that entry in the registry. There you will see which version of Crystal Designer deployed that CRAXDRT.DLL. THAT is the edition you should be able to open the file with.
If you dont have that edition in house, you will have to go to SAP ( or eBay , etc ) and buy one. The oldest SAP sells now is version 11, which should be able to open 8.5 rpts and above. version 11 no longer has support from SAP ( yes, they sell it but no longer sell support, I know, it was only a week ago I talked to them about upgrading my v10 to something newer ). And v12 support is soon to be dropped.
It looks like you are at the crossroads of a Crystal upgrade. If you are still working with VB6 as your application language, then V11 R2 is probably your best bet. g'luck.. I feel your pain. I been there.

Can't get SQL code working on Visual Studio

With the exception of a little HTML/Javascript, I've always used C++ on Visual Studio C++ 2010. I have an internship next week that will involve the use of SQL and .Net. I'm currently reading a book on SQL and it instructs us to go to its website to download code so that we can practice. The website is here: http://forta.com/books/0672336073/ I downloaded the one labeled "Microsoft SQL Server" which is basically two .sql files. One creates a simple database and the other one populates it.
However, for the life of me I cant figure out how to do it on Visual Studio 2010 or 2013 (I downloaded the full version of 2010). If anyone knows how to get these file to run on either VS version I would be very happy. I'm used to just hitting the green arrow button in Visual Studio C++ 2010, which I believe is execute. Obviously it isnt working for my sql code.
On VS 2013 I created a new "SQL Server Database Project". I then added two new "Application Role" items for the two .sql files. Now after clicking the "SQL" tab and "Execute" I get error messages about duplicate objects/keys, which I assume means the database is already created...but how do I view it? At one instance I mustve hit the right combination of buttons because I was able to view my database in a table format.
Thanks for any suggestions!
In visual studio go to view and select sql server, (see image) then click the + symbol and connect to the server installed on your machine (if its not yet listed)

Will reportviewer of Visual Basic can do a report that came in MS ACCESS database file?

Is there any possibility to make a report using MS ACCESS database files? I'm using Visual Studio 2013 however no reportviewer, just saw a source to download and have a toolbox for it however seems not working to make a new report since it lacks Report Wizard and Create a Report thus available only in paid.
Any alternatives to make simple but useful way of making a report?

Crystal Reports & VBScript - Could Not Locate Automation Class

First off, I have very little Crystal Reports experience, so apologies in advance if this is a stupid question. I had this "fantastic" work project dumped on me when a co-worker left, so I'm hoping someone can help as most of the Business Objects links I find that might have solutions just redirect to a generic SAP splash page.
So I have a few hundred Crystal Reports (mostly File Schema 10.2, although some are 8.5 or 12.0) that are stored on a server. All of them have an associated VBScript file that calls them in the following way:
Set AppCrystal = WScript.CreateObject("CrystalRuntime.Application.10")
Set CrystalReport = AppCrystal.OpenReport("<file path to report>")
Set CrystalOptions = CrystalReport.exportOptions
CrystalOptions.DestinationType = 1
CrystalOptions.FormatType = 36
CrystalOptions.DiskFileName = "<file path to output excel file>"
CrystalReport.Export False
According to BO, this should be correct. See the following links about the CR API:
http://devlibrary.businessobjects.com/businessobjectsxi/en/en/RDC_SDK/rdc_com_dg_doc/doc/rdcsdk_com_doc/RDC_ObjectModel62.html
http://devlibrary.businessobjects.com/businessobjectsxi/en/en/RDC_SDK/rdc_com_dg_doc/doc/rdcsdk_com_doc/RDC_ObjectModel151.html#1387900
http://devlibrary.businessobjects.com/businessobjectsxi/en/en/RDC_SDK/rdc_com_dg_doc/doc/rdcsdk_com_doc/RDC_ObjectModel8.html#1646326
So basically the script just executes the report and outputs it to an Excel file. This works great on the old server, but when I try to execute this script on the new server I get the following error:
I assume this is because there's some kind of runtime components I need to install, but I can't for the life of me figure out what. I found this page: https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=56787567
But none of the files I've tried to download have worked, and, frankly, I've found SAPs documentation to be sub-par in this area. I do have Crystal Reports 2008 available, so if I need to update the vbscript to use CrystalRuntime.Application.12 or something and then install the newest runtime files for Crystal Reports 2008 on the server, that'd be fine. But I still need to know what runtime files to use? Nothing I can find has worked. Help?
Apparently this type of call to a Crystal report uses the RDC Report Engine, unfortunately CR 10 is no longer available. You can still get CR XI R2 which still deployed the RDC and it's version 11.5.
There is no RDC in CR 2008, it was actually deprecated in CR 9 and now no longer shipped.
Only other option you have is to convert your app to use Visual Studio .NET and use one of the current CR 2008 or CR for VS 2010 components and rewrite your app to .NET Framework.
No more VB Scripting supported, but that was just the Dev Language...
I ended up just upgrading to CR 2008, and using .NET console projects to replace the VB scripts.

convert rdl to rdlc?

I am using visual studio 2008 and reporting service 2008.
I created a .rdl reports. Now I want to convert .rdl to .rdlc. How can I do it?
Good question. According to spec whey should be more or less the same, but in reality they differ wildly depending on version. For instance if I open an RDLC file I created in Visual Studio 2010 in Report Builder 3.0 it works. But if I make a change in my RDL(C) file and try to open it in VS2010 I first get asked if I want to convert it to RDLC 2008 format (yes) and then I get the error message "The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition' which cannot be upgraded."
There is nothing to convert. All you have to do is to rename the file to .rdlc. This converts it from a server report to a client report. The underlying schema is the same, whether it's an .rdl or .rdlc file.
Take a look at FAQ #8 here: http://www.gotreportviewer.com/
I found working with MS support that converting an RDL to RDLC merely by changing the extensions results in a ReportViewer Control HTTPHandler error which is shown with a style of "dsiplay:none". It accuses the developer of not including the HTTPHandler in the web.config, when it is actually in the web.config. Using an rdlc created by VS in that project, then the reportviewer opens just fine and properly displays. MS support and I are still researching what other changes need to be made, but as of now, I can let people know not to drink the MSDN Kool-Aid.
I also tried changing the schemas namespace in the XML file and I got the same report definition cited above.