C# Crystal report export to PDF with Chart - c#

My Crystal report file contains data and one chart. When i am trying to export PDF from C# code, It does not export Chart. Showing Blank page for Chart.
I am using following code.
cryRpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

It seems similar with "Exportable" property, that all objects contain in FastReport.Net. Is there the same property in Crystal may be?

C# Crystal Report problem and chart?
It might be worth checking some of the previous answers provided on this question, that sounds to be fairly similar to your issue.

Related

Exporting crystal reports to pdf with size smaller than A4

I'm trying to export a Crystal Report to PDF (or .doc or something else that Crystal Reports support) and then put it in my file system with a size smaller than A4. This is being done through Visual Studio 2010. I want to do this because the report has an image that is not that big and thus creating an A4 page with that small image would be ugly. If the size could be A5 or something similar, that would be great.
Thank you in advance,
Rafael Valente
So, i couldn't solve this issue with Crytal Reports after spending almost 2 days looking for a solution. Then i started to look for other reporting solutions, like SSRS. In Visual Studio, we can actually create a report with a .rdlc format (Add --> New Item --> Reporting --> Report). This format allows you to work with Report Viewer through VS and do the workaround to export succesfully to PDF (or other reading/writting format like .doc) or even an image.
This is my code:
I hope this is helpfull and can prevent other people for going crazy with things like this.
Best regards,
Rafael Valente
EDIT: This code is written in a normal class in VS. If you're using a .apsx item, then you can change the code and try to work with HTTP Response collection.

Crystal Report Excel Export Issue

I created a Windows Form Application using C# that have a few Crystal Reports. Whenever I try to export the crystal report in Excel using the Crystal Report Export build in button, the excel formatting output is completely different. My Subtotal and Grand Total does not align with the corresponding column. Any idea what I can do to fix it or is it a flaw in crystal report exporting coding?
When exporting to excel, there are several reasons that can cause formatting issue. For example, If you go to Export options Using the column width of Header 1 may give you better formatting that the whole page. The best way to avoid formatting problems when exporting to excel is designing your report around the fact that it will be exported to excel. That means try to keep the fields in every section aligned. so if you have two .5 in fields in one section. and you have another field in the section below it. Make that field .5 or 1 in and align it with the fields above it. Also make sure all the sections are fitted by right clicking a section and click fit to section. If your still getting unwanted black rows when exporting,
1.)Right click section 2.)click arrange lines 3.)right click section 4.)click fitSection
you should have provided the screenshot of your report.... but will try to answer to the extent I understand.
This is not a flaw in crystal report...normally detail fields have extra columns compared to grand totals or group summaries so the wayout would be to insert dummy text fields before the sub totals and grand totals so that those are alligned correctly.
If this is not your requirement post a screenshot of how the report looks like and how do you need the output

How to generate excel like report in WPF?

I have this Excel Sheet That I want to generate from my WPF Application, What is the easiest way to do so, bear in mind that the table in the sheet may have many containers and each container may have one or more sizes and so on as shown.
I'v looked at the ReportViewer provided in WPF but I don't know how to design such a report using the ReportViewer.
Another thing came to my mind is to fill the excel sheet from the WPF and I found a way to do so by specifying tags (Ex: Date: ) in which I can fill these tags from my WPF application, but I don't know who to generate tables and set their columns and rows according to the data in the database.
Thank you.
Did you try adding Microsoft.Office.Interop.Excel as a dll, and try the code given here.
Or have a look at this sample:
WPF Spreadsheet
I have made good experience with the EPPlus library. The nice thing is, you don't need any MS Office components on your OS to generate the excel files.

Export multiple reports to Excel

I have a c# windows form that opens up a report viewer (using visual studio reports). The first report shown is an overview report displaying various figures split by year. Each year can then be clicked on and a drill through report is opened up passing the date as a parameter where a more detailed view is shown.
Is there a way of exporting this overview report and its drill through reports to one excel workbook with the reports separated as worksheets? I can save each report separately but I need the option of saving them all to one workbook automatically. So the excel file looks essentially the same as it does on the report viewer. I've searched everywhere and not found a clear solution.
Any help is much appreciated.
I don't believe it, u probably will need to write you own xls writer to make it work.

Reporting Services in visual studio 2010

I am creating an rdlc report in VS 2010 .
When I see my report in reportviewer it seems OK to me but when i export that report to PDF its format changes and reportviewer format do not match with PDF format....
I want to have same format in report
How can i resolve this problem....
This is a bit difficult to answer without knowing exactly what changes but I would assume this is down to page widths etc as thats one of the most common issues I've seen.
Your PDF is going to render the data in pages to fit on whatever the default is, probably A4 for uk or I believe Letter for USA, so the best way to get consistent results is to set the page size of your report to whatever size you are going to be printing it out on, and have fixed sizes, do not let things resize on their own.
If you want to update your answer with what is changing I can possibly help you more.

Categories

Resources