Crystal Report C# final exam summary - c#

I am creating examination report in C#
i added a cross-tab crystal report to report first term exam marks for every class
so now i want to alter the second term reporting to the previos term and make a total from the both terms
this is the output

Add {Term} as a column to the CrossTab.

Related

Crystal Reports report 02.months - 01.next months

in Crystal Report 13 generated reports , the report is divided into months , with the first on the first number , and grouped automatically. It is necessary that the report formed the second day of the first month and the first day of the next . That is: with 05.02.2016 on 06.01.2016 how to implement it manually , I found a group , but the problem is that I have to create each month itself, and how to implement it in the formula can not understand . Sorry for my english , Google translator , as the Russian forums did not find help.
Now it looks like this:
and should
Дата this DateTime
After hours of hardwork, I was able to find a solution.. try and let me know if it works. Its a tested solution though.
This can be done using the sub report.
Create a formula Required date and write below code:
CDate(DateAdd("d",1,CDate(Year({Дата}),Month({Дата}),01)))
In main report create a group using the created formula Required date and unless you want some sections to display in main report suppress all sections except group footer
Now create a sub report with same tables as main report and place the report in group footer 1, Now link the created formula to the sub report, In sub report there will be a paramter created as Pm-#Required date
Open sub report Record Selection Formula and write below code:
CDate({Дата})>= {?Pm-#Required date}
and
CDate({Дата})< CDate(DateAdd("m",1,{?Pm-#Required date})
Now place the required fields on design of the report and run the report.
Let me know how it works

Crystal Reports and multiple tables

I'm using C# and Entity Framework.
I created the dataset to display data from it:
With only one table(buildings), i created my crystal report very well.
But now, i want to create another one that display:
name_b, Adresse_b,date
the number of appartements of a building
the number of shared_areas of a building
and the name of the user.
I have to write a query in the crystalReportViewer1_Load and set it as datasource or what?
Thank you to help me.
There are a few options -
1. In your current report, group the report by Building, then
create a sub-report containing all of the details (name,
address,etc) and place it into the group footer in the main (outer)
report. Link the report by ID_Building. This will show you all of
the details for each building.
2. In you current report, add all of the tables to the data connection (database expert); then group the report as desired (by building, Apartment, etc).
You can create running totals to get the count of apartments and the number of shared_areas.

Crystal Reports for Visual Studio: display 2 unrelated tables

I ask for advice what would you suggest to display 2 unrelated tables in a single report (if needed with subreport), the first one with groupings and the second one "flat"?
Details:
I am developing a report with C# 4 and Crystal Reports for Visual studio.
Data comes from a Stored procedure in Sql Server 2005, that returns 2 tables.
I pass the data to the report with the .SetDataSource(Dataset) method and I checked that data in the dataset is correct.
I need to display the data from the first table in a quite complex form with different sections. This part works.
At the end of the report I need to print the data from the second table (no grouping, just a "flat" print). To do this I added a subreport.
The tables are not related. I added a Dummy field on them with the same value and used it to mimic a relation in the database expert; I configured the subreport link, based on the dummy field.
I have 2 problems.
The data in the main report is cross joined with the second table (I could expect that since they are related with a constant field)
The subreport is always empty (I checked several times that its table in datasource contains correct data).
I tried different configurations of link and tried to place the subreport in different sections (It should be in the report footer).
I set a border around the subreport: the border is printed but inside it is empty.
I also setup a formula to count the records of both tables and put the count in the report: the count is > 0 for both.
Your approach looks wrong.... At first if both are not releated I don't see any use in creating a dummy field and linking tables which will always provide cross join. Any way as per your descrition table 1 data is saperately displayed and table 2 data is saperately displayed
As per your description in main report you need data from table 1 and in footer you need data from table 2.
Try this approach:
Don't link tables
take table 1 in main report and show the required display.
Take sub report and in that take only table 2 and display in footer and make sure don't link main report and sub report nor link two tables.
Ideally speaking, without linked table not used in crystal report as reporting tools used to display the relevant data based on our criteria and display 2 different set of data without link does not mean as a report as well as tough to integrate in crystal report.
Tough to integrate means at any point you have to link the table either via union in sqlserver or at crystal report side, other wise it display as Cartesian.
As per my thoughts you can do it by some approach.
Approach 1 : You can get the data by union or unionAll with set of columns and filter the data where table's column does not have null value ie.
http://www.maximumimpactsolutions.co.uk/blog/comments.asp?bd=118
Table1col1 Table1col2 Table1col3 Table2Col1 Table2Col2 Table2Col3
value value value null null null --table1data
null null null value value value --table2data
Approach 2 : Second is sub-report, but still need the linked as you already done. But there is proper rule to be set (this is very very tedious job).
Approach 3 : Generate 2 report at c# side and merge into one PDF, then export it.
check this links.
Reporting on multiple tables independently in Crystal Reports 11
http://www.tek-tips.com/viewthread.cfm?qid=241195
http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=4756
http://www.codeproject.com/Questions/348959/Crystal-reports-for-multiple-tables

Special field record number in crysal report not show when record does not exist

I am using crystal report asp.net visual studio 2012. I am showing table format data in crystal report and I am using special field record number as serial number but problem is when data not exist special field record number show 1.I want record number not display when data is not available.Which formula i will write to get rid of this problem.
I am getting following result when data is not available
SR NAME
1
I do not want record number
on your section expert under suppress condition you can write something like isnull(Name) or Name = "". Once that condition is true, it will suppress the entire row.

Dynamic sort group in crystal reports

I have a sales report grouped by city and country. I need to change the order, some times the groups will be sorted by the total of sales and another times will be sorted by name (alphabetic). How can I do it? I'm using VS2013 C# and the tools of Crystal Reports.
You need to create a formula with if else conditions and use the formula to create a group....
Best approach would be create a parameter and depending on the parameter selection write if else and use the formula in group expert

Categories

Resources