Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hELLLO,

I am trying to create dynamic RDLC report in C# application.

code is working fine but.. in frontend reportviwer is not visible with report.
i checked visible property as it is default TRUE.

see my below code..
C#
protected void Page_Load(object sender, EventArgs e)
        {
            ReportViewer1.LocalReport.DataSources.Clear();
            
            OracleConnection oracon = new OracleConnection();
            
            oracon.ConnectionString = ConfigurationManager.ConnectionStrings["myConnection"].ConnectionString;

            
            OracleCommand cmd = new OracleCommand("select * from emp ", oracon);

            cmd.CommandType = CommandType.Text;

            OracleDataAdapter da = new OracleDataAdapter(cmd);
            DataSet dsHeader = new DataSet();
            da.Fill(dsHeader);

            ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DS1_LoadHeaderData",dsHeader.Tables[0]));
            ReportViewer1.LocalReport.Refresh();

        }


is i misssed sonthing in above code?

help would be appreciable.. :)
Posted
Comments
yourfriendaks 13-Jun-13 2:17am    
can u explain in brief..
reportviewer is no visible or report is not coming inside report viewer?
ssd_coolguy 13-Jun-13 2:31am    
reportviewer is not visible..hence report also not..
and when i set report to reportviewer through properties... report viewer and report both are visible...
yourfriendaks 13-Jun-13 2:35am    
if u r not set rdlc from properties then u have to
assigned report path
ReportViewer1.LocalReport.ReportPath = reportPath;
ssd_coolguy 13-Jun-13 2:37am    
yep... thanks.. i think we both solved at same time...:)

thank you for your support.. :)
Sunasara Imdadhusen 13-Jun-13 7:45am    
You have to mention your answer in Answer box so other would take befit from there, if they will face same issue

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