Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Monday, July 15, 2013

How to print a subtotal base on per page (Crystal Report)

lets say i have 3 pages in crystal report there should be a subtotal per page

You need to use three formulas ;
Formula 1 : @Reset

Code:
NumberVar x;
WhilePrintingRecords;
x:=0;
 
 Formula 2 : @Sum

Code:
NumberVar x;
WhilePrintingRecords;
x:=x+{DatabaseField};
 
Formula 3 : @Display

Code:
NumberVar x;
WhilePrintingRecords;
x
Place Formula1 in Page Header section and suppress
Place Formula2 in Details section and suppress
Place Formula3 in Page Footer and don't suppress, this is your subtotal
 
Note :
For Duplicates Records :
NumberVar x;
WhilePrintingRecords;
IF OnFirstRecord= true Then
x:= {Databasefield}
Else

if {DatabasefieldKey} <> previous( Databasefieldkey) Then
x:=x+{Databasefield}
ELSe
x:=x ;

Wednesday, July 10, 2013

Crystal report does not export on windows XP

The problem was Crystal report 8.5 can not export function. I searched for any site for the solution. Finally, I download SP3 from businessobjects and installed them. After SP3 was installed, it works

try this Solution download link:

https://smpdl.sap-ag.de/~sapidp/012002523100011722112008E/cr85win_en_sp3.exe

https://smpdl.sap-ag.de/~sapidp/012002523100005986522008E/cr85devwin_en.zip

ftp://ftp1.businessobjects.com/outgoing/ehf/cap85win_en.zip

cr85devwin_en.zip
cr85mainwin_en.zip
dbexdrvrwin_en.zip
actxviewwin_en.zip

Replace each with the file name in the link ftp

Another way : try search file dll in your program files
 * crtslv.dll                  8.6.1.726
 * ExportModeller.dll   8.6.2.440
and register them.

Thursday, May 23, 2013

Count Decimal on Crystal Report

 Try This !
numbervar x:= abs({table.field});
stringvar y:= strreverse(totext(x,10,"")); numbervar z:= tonumber(y); numbervar c:= len(totext(z,0,""));
Example: 
Suppose Price is 0.1023000 
strreverse(totext({Price},7)) ==> 0003201.0 tonumber( 0003201.0 ) ==> 3201.0 Round(tonumber( 3201.0 )) ==> 3201 len(totext( 3201 ,0)) ==> 4 ,
so set decimal places to 4

Tuesday, March 19, 2013

Create Crystal Report with SQL Query

This is very simple but almost forgotten how important this step.

1. Open Crystal Report Application
2. at pop up when you start, choose using the Report Wizzard
3. choose Standard
4. Press OK
5. Create New Connection
6. Choose OLE DB(ADO)
7. Choose Provider Database
8. Fill Server Name, Password, and database you are connect

Friday, October 5, 2012

Crystal Report : Format Numbering Decimal

Crystal Report: Formatting the Decimal Field

Even though I am currently working in SharePoint I still have a fond of working in crystal reports. Recently in the MSDN forums I saw a requirement in Crystal Report forums section. The requirement is that there is a decimal type column in the SQL Server Database as Shown below.




When we connect the DB in the crystal report, we got the output like this.

But the output should show something like; if the Decimal Field value has no decimal value then it should show as integer without decimal places. If the Decimal Field value contains some decimal value data then it should be left as it is.


Solution:
In the Crystal Report, Right Click the Decimal Field we have placed in the Detail section and select Format Object.


In the Format Editor window select Custom Style under Style and click Customize button.


 In the opening popup window select Number tab and click the Formula Editor Button next to Decimals:


 Enter the formula as shown.


 Click Save and Close in the Formula editor and click Ok in Custom Style window


Now the Output in the Crystal Report is come as Expected.

Good Lucks!!!