I have a crystal report within my web app that works fine by itself.

My question is simple:

How Do I Add A subreport without getting a login error?

I just Need the C# code to allow for the subreport to display in the viewer along with the main report.

The subreport takes No Parameters and it is in the same db as the main report dataset. It is placed in the Header of the main report.

There has got to be a simple way to do it.

Here is my code for the main report.


Code:
this.sqlSelectCommandComparison.CommandText = "SELECT * , '" + Session["FromDate"] + "' AS FromDt, Convert(SmallDateTime, '" + Session["ToDate"] + "') AS ToDt FROM qselComparison WHERE SAMPDATE BETWEEN '" + Session["FromDate"] + "' AND '" + Session["ToDate"] + "' Order By SAMPDATE";    
                this.sqlDAComparison.Fill(this.dsVocComparison1,"qselComparison");                                
                Session["ReportName"] = "crVocComparison1";
                this.crVocComparison1.SetDatabaseLogon("user","password","sql_server","dbName");                            
                this.crVocComparison1.SetDataSource(this.dsVocComp arison1);    
//                this.crVocComparison1.OpenSubreport("qselComparisonStats1").SetDataSource(this.dsVocComparison1);
                this.crVocComparison1.PrintOptions.PaperOrientatio n= PaperOrientation.Portrait;
                this.crVocComparison1.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.DefaultPaperSize ;                
                this.crvVOC.ReportSource = this.crVocComparison1;    
                //Response.Write(Session["rptSelected"] + " - crVocComparison1");