Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to make an application that's using crystal report that generates report
i am confused how to use the formula function
I tried the Parameter Function but It only shows the details with the same value with the textbox

What im trying to make is
To compute the Total Number of Employees from all Department but diplayed and sorted/filtered by department.

e.g.
Employee Profile

HR Department
            Male     Female    Total:
             5         6         11
             6         3         9
Total :     11         9         20


What I have tried:

Can i do the computations and sorting/filtering in the crystal report or should i do it in the database using vb?
thanks!
Posted
Updated 1-Sep-21 17:29pm

1 solution

Based on the example it looks like you could use a crosstab report to do the calculation fot both rows and columns.

For example, have a look at Crystal Reports Tutorial - Cross-tab report (Lesson 7) - YouTube[^]
 
Share this answer
 
Comments
Beginner213456 2-Sep-21 20:03pm    
can i apply this in my vb.net winforms?
i think the toturial is application in sql?
Wendelius 2-Sep-21 23:21pm    
Not sure what you mean. The tutorial shows how to organize the report. The data can come from a SQL database, a dataset in the program etc. That depends how the connection on your report is defined.
Beginner213456 5-Sep-21 20:03pm    
I am using ms access as my database,
in the Total Fields.
Its not saved in the database
my only fields are male,female,total and the Department Total can only be seen in the Crystal Report.
is there a way to achieve this.
or should i add a fields with the department total?
Wendelius 5-Sep-21 23:16pm    
Storing a calculated field in the database should not be done. Instead the calculation can be done when the data is fetched or shown, as in your case.

Did you go through the tutorial link? It shows how summary fields are selected in a crosstab

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900