Click here to Skip to main content
16,016,678 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,
I am having problem in To add a value from session to textbox of rdlc report.
Actully i want to add a value in textbox that consist date.


here is my code....
code behind>>>>>>>>>>>

C#
protected void Page_Load(object sender, EventArgs e)
   {
       ReportViewer1.SizeToReportContent = true;
       ReportViewer1.DataBind();
       ReportViewer1.LocalReport.Refresh();
      // TextBox t1 = (TextBox)ReportViewer1.FindControl("txt_date");
      // t1.text= t1.text+session["date"].ToString();
 //
   }


Inline code>>>>>>>>>>>>>>>>>>>>>>>>>>

XML
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
                Font-Size="8pt" Height="339px" InteractiveDeviceInfos="(Collection)"
                ShowExportControls="False" ShowFindControls="False"
                ShowPageNavigationControls="False" ShowPrintButton="False"
                ShowRefreshButton="False" ShowZoomControl="False" style="margin-top: 10px"
                WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="731px"
                ShowBackButton="False">
                <LocalReport ReportPath="StmtRpt.rdlc">
                    <DataSources>
                        <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1" />
                    </DataSources>
                </LocalReport>
            </rsweb:ReportViewer>
Posted

Why don't you use Parameters for this?
Using report parameters[^]

Anyway I found the below one(I never tried like this in my code)
How to get Table Cell or Text Box value in SSRS[^]
 
Share this answer
 
u can pass session value to reportparamter

& in the rdlc add in the specific textt cell this parameter value
 
Share this answer
 
Comments
Akhilash Mishra 14-Nov-11 2:18am    
hi.. i am using like dis, as u told, bt still not get any resolve......
here ReportParameter does not contain any overload that take 1,2, or 3 arguments.

So wht i need to do
.................................................................
ReportParameter p = new ReportParameter(Session["stextdate1"]);
[no name] 14-Nov-11 4:08am    
what u mean by 2 or 3 argument
u want to add more than 1 value in that text or what
please more explain

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900