I am developing marks card for my college which consists of Student name, Student rollnum, subject name with their subject code and marks of their respective subject scored by student. I have a database which has a definition as shown below :
Name |Roll Num |SubjectCode |SubjectName |Marks
Std_Name 1001 Phy Physics 65
Std_Name 1001 Che Chemistry 59
Std_Name 1001 Math Mathematics 69
From the above table, I want to get SubjectCode, SubjectName and Marks to datatable/dataset/datagrid and insert those data to particular section(section 1,Section 2,..etc) in Crystal Report. How can I achieve this? Thank you.
You should learn more about
how to create a crystal report with dataset?
Inserting fields in section is not a big issue. You just need to create dataset or datatable and reference it to your crystal report. After designing report you can pass the dataset object to the crystal report with data.
You should also learn about each section and their role.
Report Header: This section is printed at the top of the first page of report. You can put here company name, address etc. which should not come on next page.
Page Header: This section is printed at the top of the each page of report. you can put page number, column header labels (Subject Code, Subject Name, Marks, etc).
Detail Section: This section will print the records in a row form. So, you can put here your fields so, the values will be displayed as you want.
Page Footer and Report Footer: These sections are self descriptive after understanding the above two. In Report Footer section you can put comments which should be printed at the bottom of the last page and In Page Footer section you can put Sum of values like total marks, total out of marks, etc. You can also put these fields in Report footer section if there are multiple pages are printed and you wanted print the total only on last page.
There are also another section type is Group Header and Group Footer. When you want to display record group wise and the header and footer should be printed also group wise then you can use this section here.