I need to print a 100-question test (stored into a datatable) to a Word document. Part 1-question 1 to question 56. Part2-question 57 to question 66; Part3-question 67-question 100. Part 1 and Part 2 questions are required to be on two columns on paper.
For example, questions appear on the first page are following.
1. 7.
2. 8.
3. 9.
4. 10.
5. 11.
6. 12.
I have created code behind and the report PT.rdlc. All questions are showed up nicely on the Word doc except some of the question numbers are dropped off. I can't figure out why. Here are some my codes:
int TRow = Dt.Rows.Count; //TRow = number of rows in Part1 or Part2. Dt is a datatable that has 100 questions for (int RowCount = 0; RowCount < TRow; RowCount++) { TDt.Rows.Add(1); if (RowCount < TRow) TDt.Rows[TDt.Rows.Count - 1]["ID"] = Dt.Rows[RowCount]["qnum"]; //q1 if RowCount + 6 < TRow TDt.Rows[TDt.Rows.Count - 1]["TID"] = Dt.Rows[RowCount + 6]["qnum"]; //q7 .... }
I do the same way above for all questions in Part 1 and 2. In the report, I use expressions as following for question numbers.
=iif(Fields!question.Value<>"",Fields!ID.Value&". ","")and=iif(Fields!Tquestion.Value<>"",Fields!TID.Value&". ","")
Can you please help me to identify what is wrong with some question numbers are dropped off? Thank you in advance.