gallery.technet.microsoft.com · web viewright click on detail section of formatting formula select...
TRANSCRIPT
Visual studio 2012 and Crystal ReportWhen we develop windows application in visual studio using c# and use Crystal Report for reporting services. We have various problem in creating a report like :- total of particular column, designing, displaying image etc.
This is the reason of creating this helpful guide for help in crystal report. We take various problems and solution. Let’s start……..
Problem 1:- how to calculate total of particular column?
Solution:-
For it:- Go To Formula field in field explorer and right click and select new.
Total
enter the name of formula and press ok
after that you see a new window
write this code “sum()” and select and drag& drop the column, which is get total
Write here function
And save it. Drag this field on your report according to requirement.
Problem 2:- how to get a single row according to parameter
Solution :- first create a parameter in parameter field,
Right click on parameter and select & click on find in formula, write this code… on selection formula then Record selection.
{sale_mob.invoice}={?invoice}
Sale_mob.invoice :- is report field
?invoice :- is a parameter name
Pass the parameter value through code and you will get row according to your parameter.
Problem 3:- how to display image in crystal report?
Solution:-
Right click on detail section of crystal report select insert and choose picture.
Right click on picture box and select format object and choose picture tab..
\
Click on the Graphic location
Create a parameter before all of this. Write parameter name. Pass the parameter value via code and you will get images on report. If you want to fix the size of image use this, right click on picture box select format object and uncheck
the can grow option and save them.
Parameter name
Problem 4:- how to fix rows in single page in details section?
Solution :-
Right click on detail section of formatting formula select add new formatting formula give the name of formula
And write the code
if Remainder (RecordNumber, 10) = 0 then true else false