Click here to Skip to main content
15,887,683 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to display image from database Pin
Not Active11-Feb-10 8:16
mentorNot Active11-Feb-10 8:16 
GeneralRe: how to display image from database Pin
netJP12L11-Feb-10 10:46
netJP12L11-Feb-10 10:46 
AnswerRe: how to display image from database Pin
T M Gray11-Feb-10 10:46
T M Gray11-Feb-10 10:46 
QuestionColor parameter in query string ? Pin
paper6711-Feb-10 6:01
paper6711-Feb-10 6:01 
AnswerRe: Color parameter in query string ? Pin
Steve Wellens11-Feb-10 7:36
Steve Wellens11-Feb-10 7:36 
AnswerRe: Color parameter in query string ? Pin
Abhishek Sur11-Feb-10 11:46
professionalAbhishek Sur11-Feb-10 11:46 
Questionreportviewer Pin
arkiboys11-Feb-10 3:43
arkiboys11-Feb-10 3:43 
AnswerRe: reportviewer Pin
Pranay Rana11-Feb-10 19:01
professionalPranay Rana11-Feb-10 19:01 
You can try below code because what i did in the code is added reportviewer control dynamically to div control on page

and its working file for me

protected void bRunReport_Click1(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            divRptView.Controls.Clear();
            #region reportviewer setting
              
            
                ReportViewer ReportViewer1 = new ReportViewer();
           

                    ReportViewer1.ProcessingMode = ProcessingMode.Local;
                    ReportViewer1.ID = "ReportViewer1";
            
                    ReportViewer1.Font.Bold = false;
                    ReportViewer1.Font.Name = "Arial";
                    ReportViewer1.ShowExportControls = false;
                    ReportViewer1.ShowBackButton = false;
                    ReportViewer1.SizeToReportContent = true;
                    ReportViewer1.BackColor = System.Drawing.Color.WhiteSmoke;
            
                    ReportViewer1.LocalReport.DataSources.Clear();
           
            #endregion reportviewer setting
            
                
                //ReportDataSource ds = new ReportDataSource();
                string _reportID = string.Empty;
                bool isnull = true;
          
            #region snapshot
            else if (ddlListofReports.SelectedValue == "1")
            {
                _reportID = "snapshot";
                List<snapshot> slist = new snapshot().GetCustomersForCountry(this.ddljobsSnapshot.SelectedValue);
                ReportViewer1.LocalReport.ReportPath = "Admin\\ReportDesigns\\" + _reportID + ".rdlc";
                if (slist != null)
                {
                    if (slist.Count > 0)
                    {
                        ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("snapshot1", slist));
                        isnull = false;
                    }
                }
            }
            #endregion snapshot
            #region VoiceAgentUtilization
            else if (ddlListofReports.SelectedValue == "2")
            {
                DateTime _dcstarttime = Convert.ToDateTime(this.txtAgetnFromDate.Text);
                string _dcstarttimestr = _dcstarttime.ToLongDateString() + " " + _dcstarttime.ToLongTimeString();
                DateTime _dctotime = Convert.ToDateTime(this.txtAgentTodate.Text);
                _reportID = "VoiceAgentUtilization";
                List<AgentDetailed> alist = new AgentDetailed().getAgentReport(this.dcagent.SelectedItem.ToString(), _dcstarttime, _dctotime);
                ReportViewer1.LocalReport.ReportPath = "Admin\\ReportDesigns\\" + _reportID + ".rdlc";
                if (alist != null)
                {
                    if (alist.Count > 0)
                    {
                        ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("AgentDetailed1", alist));
                        isnull = false;
                        ReportParameter starttime = new ReportParameter("StartTime", _dcstarttimestr);
                        ReportParameter endtime = new ReportParameter("EndTime", _dctotime.ToString());
                        ReportParameter Agent = new ReportParameter("Agent", this.dcagent.SelectedItem.ToString());
                        ReportParameter[] p = { starttime, endtime, Agent };
                        ReportViewer1.LocalReport.EnableExternalImages = true;
                        ReportViewer1.LocalReport.SetParameters(p);
                    }
                }
            }
            #endregion VoiceAgentUtilization
          
           

            if (!isnull)
            {
                lblMessageBox.Visible = false;

                if (ddlListofReports.SelectedValue != "11")
                {
                    divRptView.Controls.Add(ReportViewer1);
                    ReportViewer1.Height = 290 + (25 * 10);
                    ReportViewer1.Width = Unit.Percentage(91);
                    ReportViewer1.ShowRefreshButton = false;
                    ReportViewer1.Visible = true;
                    ReportViewer1.ShowPrintButton = true;
                    ReportViewer1.SizeToReportContent = true;
                    ReportViewer1.LocalReport.Refresh();
                }

            }
            else
            {
                lblMessageBox.Visible = true;
                lblMessageBox.Text = "No Records are avaliable.";
                ReportViewer1.Visible = false;
            }
        }
    }

GeneralRe: reportviewer Pin
arkiboys12-Feb-10 10:43
arkiboys12-Feb-10 10:43 
QuestionResponse Problem in asp updated Pin
Hema Bairavan11-Feb-10 3:29
Hema Bairavan11-Feb-10 3:29 
AnswerRe: Response Problem in asp updated Pin
R22k11-Feb-10 3:41
R22k11-Feb-10 3:41 
GeneralRe: Response Problem in asp updated Pin
Hema Bairavan11-Feb-10 3:51
Hema Bairavan11-Feb-10 3:51 
GeneralRe: Response Problem in asp updated Pin
T M Gray11-Feb-10 9:45
T M Gray11-Feb-10 9:45 
GeneralRe: Response Problem in asp updated Pin
Hema Bairavan11-Feb-10 17:48
Hema Bairavan11-Feb-10 17:48 
GeneralRe: Response Problem in asp updated Pin
T M Gray12-Feb-10 4:16
T M Gray12-Feb-10 4:16 
QuestionResponse Problem in asp Pin
Hema Bairavan11-Feb-10 3:27
Hema Bairavan11-Feb-10 3:27 
Questionbrowse to reporting servicces report [modified] Pin
arkiboys11-Feb-10 2:59
arkiboys11-Feb-10 2:59 
AnswerRe: browse to reporting servicces report Pin
arkiboys11-Feb-10 3:37
arkiboys11-Feb-10 3:37 
GeneralRe: browse to reporting servicces report Pin
Hema Bairavan11-Feb-10 3:53
Hema Bairavan11-Feb-10 3:53 
GeneralRe: browse to reporting servicces report Pin
arkiboys11-Feb-10 3:57
arkiboys11-Feb-10 3:57 
QuestionHelp in Widget Pin
Rock Star.11-Feb-10 1:42
Rock Star.11-Feb-10 1:42 
AnswerRe: Help in Widget Pin
T M Gray11-Feb-10 10:52
T M Gray11-Feb-10 10:52 
QuestionImage transparent in Asp.Net Pin
koncuk11-Feb-10 0:49
koncuk11-Feb-10 0:49 
AnswerRe: Image transparent in Asp.Net Pin
Anurag Gandhi11-Feb-10 1:30
professionalAnurag Gandhi11-Feb-10 1:30 
GeneralRe: Image transparent in Asp.Net Pin
koncuk11-Feb-10 1:33
koncuk11-Feb-10 1:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.