3
Answers

How to assign dataset values in Header in RDLC report

Photo of pratyush

pratyush

8y
597
1

I am using RDLC report with Microsoft visual studio 2008. In the first page of RDLC i have two text boxes and one table in body section. In the second and subsequent pages i want to repeat the data from textbox1 and textbox2 along with table data continuation of page1.

Currently the continuation of table data from page1 to page2 is working properly. But the textbox1 and textbox2 data also needs to be repeated in every pages.

I tried the following steps, but fails to work.

1. added two text boxes in header section and another two text boxes in Body section.

2. Assigns the dataset value to textboxes in body section.

(Ex: =first(Fields!Address.Value)

3. Assigns the textboxes value from Body section to the corresponding text boxes in header section.

(Ex : =first(ReportItems!textbox1.Value))

Result:

The header text box value displayed in the first page only and not repeated in the subsequent pages.

Expected:

Whatever assigned to the header section should be repeated in the subsequent pages. But only page number, date... is reflecting in other pages and not the text box values in header section.

Kindly give me the solution.

Answers (3)

0
Photo of Santhosh Kumar Jayaraman
NA 9.9k 2.3m 12y
When You are deleting records,

You can write query as

delete table AU_Delete

or
delete from table au_Delete.

you have to use * only in select queries.

try this

 SqlConnection con = new SqlConnection("Data Source=APPLE;Initial Catalog=sam;Integrated Security=True");
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = con;
            con.Open();
            string str1 = "DELETE  AU_Delete";
            cmd.CommandText = str1;
            cmd.ExecuteNonQuery();
            con.Close();
          

0
Photo of Hemant Kumar
NA 3k 215.2k 12y
Mohammed Shamsheer,

you can't write '*' for the delete Statements

string Query="delete from AU_DELETE";
0
Photo of Naresh Avari
NA 811 1.6m 12y
Hi,

Remove '*' from your SQL Query and use

string str1 = "DELETE FROM AU_Delete";

You don't need to specify '*' for DELETE statement.