I created one application in C# .Net for viewing crystal report.
But when i try to execute,it shows "load report failed" error message.
May i know the reason.
And what are the viewer files to be install for viewing report.
Developed the report in Crystal report 2008.
This usually happens. Try the following
Check your code. Try this here
Check your data table name and column names. They needs to be the same (case insensitive) as that of database
Check your database connectivity.
Check if you have any spelling errors in your code that specifies the name of your report file.
Check if you have installed all the right components for crystal report to work
Open crystal report and try to update connection to your data source
Try debugging by removing all fields and blankly showing the report. If it works, it should be problem with your code else it could be problem with crystal report or connectivity.
Let me know if any of this works for you
Related
I'm looking at a VS project which stores report records in a database table (here it holds things like the report url, name, etc.). We have a link that when you click it, it opens a report as a PDF. This one works fine.
I duplicated this report, made appropriate changes for a new report, and also copied the exact same format when adding a new row for it in the database (just with its own name and different url, etc.).
When I change the link in the code to grab the new report (nothing in the code has changed aside from which report ID it grabs from the database), it gives me 'folder/reportname' cannot be found (rsitemsnotfound).
Both reports are under the same folder location, and in the code it definitely grabs all the information from the database, and it uses the same data source credentials for the reports. No spelling errors either. Both reports work in the survey designer preview btw.
It seems like there is an issue with connecting to the data source for the new report, but again all the credentials and everything are the same so I am a bit stumped as to why this error is happening.
I am using Visual Studio 2019, I am not sure if it matters but the previous reports likely were made using earlier versions
Figured out the issue, very silly of me to not realize. In the DB I saved the report name in the path as something different than the name of the rdl
I am using Visual Studio 2013 to do my Report. To generate the report my steps are:
Use report viewer
Connect database (ACCESS)
Successfully generate my report
The issue I'm facing right now is that I want my report to show according to a specific date which I need to enter into the textbox or by using a timepicker. I've been searching for YouTube tutorials and tried using an SQL statement in the Table Adapter. The code I wrote is:
(WHERE abx_date= [Forms]![Form1]![searchTextBox] )
but it doesn't work.
I designed a report in crystal report v13. Steps that i followed are,
create a system dsn for Mysql with database details in
administration tools.
go to crystal report, click on database->database expert->create new
connection -> odbc -> new connection and selected the dsn I created.
When the connection is added i clicked on add command and added my report command.
Then Designed the report.
loaded and printed report using C#
once I designed the report tested with printing , I moved my report file(.rpt file) to another PC.Printing through C# in this system Failed(Blank Report).Then I opened up the report in crystal report in this system and previewed.The Report was Blank.
So I Followed first two steps Which I did in My PC(above mention step 1 and 2).
Then again I preview it. The Report Was Blank With no details from database but other skeletal structure was present(I mean except values from database).
What did i Do Wrong Here?
I had to do step 3 and step 4 again in this PC. Designing the report in every system I transfer the report file is pathetic. Can Anyone Tell Me what step i am missing here?
I would like to know if exists the way to send a crystal report directly to the printer without print dialog. Ex. I have an asp.net page with a crystal report viewer and I want send to print once the report have been loaded into the viewer.
I saw an application what it is doing that but I don't know how that work.
I am using
Visual Studios 2010
Crystal Report for .NET Framework (Version=13.0.2000.0)
C# 4
if have a code sample (will be great!!!!)
I have read lot of resources in internet but nothing give me idea how to do what I need.
Thanks in Advance.
J.S.
It does not working like you think. Method PrintToPrinter generates printout directly to printer. Report preview also do the same. If you are executing both methods then report is generating twice. If you have more pritnout pages then report preview generates only visible pages. In most cases this does not change anything, but if report is generating a lot of time, then you are getting a lot of resources from system and you can expect deadlock on database. You also have to remember that if your report is generating new data per each executing then you will have doubled data.
Good I did it
I Just set this values to the ReportDocument.
CrystalReportDocument.PrintOptions.PrinterName = "Printer Name";
CrystalReportDocument.PrintToPrinter(1, true, 1, 1);
anyways I am open to other ideas and suggestion.
When I print my crystal report, it will not print the correct (most recent) database view. To get it to print the correct one, i have to manually select "set datasource location" and then click on the tables i want and then click update. If i don't it will keep printing the same old view over and over.
I do have the "verify on every print" option selected but it doesn't seem to work.
I am using VS2010 with the beta crystal reports for vs2010 and ODBC 5.1.
Thanks
It sounds as though you have the Save Data with Report option enabled. Try opening the report in the report designer, and see whether there is a tick on the File menu next to the Save Data with Report option - if so, uncheck it, save the report and try again.