Hyperlink in RDLC breaks the report - c#

I have a client side report that is displayed in a report viewer within a webform. The report displays perfectly until I create a hyperlink within a textbox. However, when I try to render the report, it crashes with the following error:
An error occurred during local report processing.
Nothing fancy is done with the link. The link is static, not altered by any code, and points to an external site.

Apparently, there is an option EnableHyperlinks on the LocalReport object that I couldn't find in the designer, but is accessible during runtime:
reportViewer.LocalReport.EnableHyperlinks = true;
Once I included this single line the report stopped crashing and the link worked.

Related

Drill through report, go to report action not loading avaible reports VS2012

Hi Im trying to make a drill through report, I'm new with reports, my problen is when I try to link a textbox and choose the "go to report" action, it does not load the dropdown list that show the available reports. I typed the path but still won't work. I can set the parameters because it does not recognize the report's path.
If the sub-report is located in the same project as the main report then you should see a report selection with parameters. Make sure you have built or deployed the sub-report. If the sub-report is located in another ssrs project then you will have to manually enter the link and all parameters. You can enter any location and any parameter for sub-reports. The dialog is just a convenience.

Load report failed in C#.net

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

ASP.NET Crystal Report Print Automatically

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.

Crystal Reports load depending on its mood

I have a crystal report viewer on Windows forms.
The report viewer has one report associated with it. I pass 24 parameters programatically. When i try to run the program, sometimes the reports shows and sometimes the software hangs up.
I m passing same data every time to the report. There are no compile time errors. When I do step-debbuging, then every time the report loads perfectly and there are no hang-ups.
What can be reason of this moody opening of report ????
Edit1:
During step debugging, I found that assignment of reportsource to CrystalReportViewer causes the software to hangup.
goldBillReport = new GoldBill();
crystalReportViewer1.ReportSource = goldBillReport; //Hangs after this !!
SetGoldParameters();
Edit 2:
I have changed the scenario now, I take simple windows form, add a crystal report viewer to it. Secondly I create a blank crystal report.
Now I write the following lines in form load event of the windows form which contains viewer.
goldBillReport = new BillReport();
crystalReportViewer1.ReportSource = goldBillReport ;
80% of times when I load the form it shows the blank report (as required). The remaining time it shows nothing and application just hangs. Why ?
Note: My real application is very large. Is it the problem that the program is not getting proper memory space to open the report. If yes then are there any ways to collect garbage ?
Thank you in advance
I would check that you are correctly disposing of your viewer when the form is closed.
Also, I had an issue where the first time I ran a report it was extremely slow. The solution to this was to load a temp report during Application startup (behind a splash screen). This ensured that the Crystal Report DLL's were fully loaded before the user can generate a report. After I did this the reports loaded in few seconds each time.

Microsoft report viewer shows no report

I am working on a small windows application. The application needs to show some reports. For each report, I made a simple form with Report Viewer control. When the form shows up, I call the RefreshReport() method and the report is shown. My problem is this - one report does not show up at all. I get only form with empty ReportViewer control. There is also no "Generating report" message. The query I use returns the correct data, but I am unable to get anything when I run the application. For each of the reports, I am using separate dataset. In each DtaSet I have placed the tables I want to use in corresponding report. I
I have also tried to create this particular report using Report Server Project Wizard (Business Intelligence Project > Report Server in Visual Studio). It showed the report correctly. I used exactly the same settings, same query, everything is identical. What could be the problem? Why is Visual Studio unable to show me this report? The other reports are working fine.
Thanks
Ok, I found out what was happening. For some reason, an exception was thrown during the creation of the report. The exception was "invisible" - there was no any message about it, nothing. I caught it when I was debugging the whole thing line by line. It seems that the exception originates on the database level, when the query is executed (the query contains several JOIN commands). I solved the whole thing by simply putting the Fill() method, which fills the dataset when the form is opened in the try block, with an empty catch block. The report showed correctly.

Categories

Resources