Showing posts with label Crystal Report. Show all posts
Showing posts with label Crystal Report. Show all posts
Wednesday, January 13, 2016
Using "Crystal Report" with "Visual Studio 2010"
First shocking news is Crystal Report tool is not included by default with Visual Studio 2010. To come back from this shock, download crystal report tool from following link
=> http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0.exe
After install don't forget to restart your computer. Because this is WINDOWS. Then after creating your first report if you get the following exception -
Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies.
Than open App.Config file. Then find the attribute useLegacyV2RuntimeActivationPolicy and change the value to "true"
Happy Coding..........
Monday, August 18, 2014
Export crystal report to Excel - some tips.
Developing a crystal report which will be exported into Excel is always tricky, time consuming and needs a lot of patience. There are a lot of blog posts, forum discussions, articles in the web about this matter. During last couple of days I was hanging with one of my report and at last I've figured out some tricks about exporting crystal report to excel. Here is some -
1. Do not use your mouse to resize/align your header/detail fields. Always depend on Properties pane. make sure the height. width and left properties are always same of related header and detail fields.
2. Top property of header/detail fields should be always 0.
2. Do not use line object. It will create an extra excel row after export.
3. You can use (single) right and bottom border of detail field objects. and only right border of header objects.
4. May be the report which will export to excel will not be presentable for clients. So create another presentable report for client which may have lines or brders or colors whatever you want.
5. After export into excel - may be your header or detail section will be created using more than one excel rows. This may not be a problem. But you can decrease the height of detail/header fields to accommodate in single excel row.
6. Suppress (Drill Down) the report header, report footer, page header, page footer. Because they are value less in Excel.
7. In your data source do not keep null data in any field. At-least fill data with empty string/something not valuable like dash (-).
May be these tricks will help you.
Happy coding!
(also published in codeproject.com)
1. Do not use your mouse to resize/align your header/detail fields. Always depend on Properties pane. make sure the height. width and left properties are always same of related header and detail fields.
2. Top property of header/detail fields should be always 0.
2. Do not use line object. It will create an extra excel row after export.
3. You can use (single) right and bottom border of detail field objects. and only right border of header objects.
4. May be the report which will export to excel will not be presentable for clients. So create another presentable report for client which may have lines or brders or colors whatever you want.
5. After export into excel - may be your header or detail section will be created using more than one excel rows. This may not be a problem. But you can decrease the height of detail/header fields to accommodate in single excel row.
6. Suppress (Drill Down) the report header, report footer, page header, page footer. Because they are value less in Excel.
7. In your data source do not keep null data in any field. At-least fill data with empty string/something not valuable like dash (-).
May be these tricks will help you.
Happy coding!
(also published in codeproject.com)
Subscribe to:
Posts (Atom)