SSRS 2008 R2: How to design students result spreadsheet using crystal report -
I have a dataset with different fields, first 5 fields are fixed, while the remaining names and the total number change both Are there. How do I add my unknown field to my table? I had thought of writing a code that is thinner through my fields and from the 6th field to the last, in my tabelles, a column is inserted, but I do not know how to go about it - I wonder if It is possible or if this is the best way to solve my problem I am also new to ssrs and have not written any code yet. Your thoughts are highly appreciated
Thank you in advance.
I've lost some hair trying to solve it. For those people who may face such a problem, though I believe that there can be a better, less stressful way, before this work is for me, try to explain my problem before : I would like to create a report that has both static and dynamic columns (such as a student grade spreadsheet, where courses differ with faculty, session and semester). My main issue was how to get my dynamic results in the pre-designed crystal report from the database. So, here's what I did:
- Add an empty dataset to your app.
- Add 2 datatable to the dataset: a blank
DataTable1
and a strongly typedDataTable2
with the number of expected columns in your report - if your 10 fields of report are required, there should be 10 columns inDatatable2
. In addition, the column name should be similar to easy coding (e.g.,DataColumn1
,DataColumn2
, ...). - Add a report control to your app (in my case, I used Crystal Report).
- Design the
DataTable2
report using the column - Write a code that is dynamic column (in this case, course code) from your database and it Fill in
DataTable1
. - Write another code that receives grades of students with each course code from step 5 above. Rename the text property of dynamic text objects in the report titled Dynamic Column populated in
-
DataTable1
. It was done using nestedfor the next ...
loop. it's urgent; Otherwise, the report will not recognize that data and will display an empty sheet. - Display your report.
If anybody has to face any difficulties in the above implementation, or amendment is needed, then I am in your settlement.
Regards.
Comments
Post a Comment