none
DrillDown RRS feed

  • Question

  • I'm trying to make a sample of this technic but having some problems setting up the second report - thefirst report works fine I think because I "set it up by clicking" - the second report must be set up programmically and I miss something here - my code is here:

    1         private void reportViewer1_Drillthrough(object sender, Microsoft.Reporting.WinForms.DrillthroughEventArgs e)  
    2         {  
    3               
    4             this.reportViewer1.LocalReport.ReportEmbeddedResource = "TestDrillDown.L2.rdlc";  
    5               
    6             List<TestDrillDown.DataSet1TableAdapters.KSO_L2_KundersOrdreTotalIPeriodeTableAdapter>  
    7                          ds = new List<TestDrillDown.DataSet1TableAdapters.KSO_L2_KundersOrdreTotalIPeriodeTableAdapter>();    
    8             this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1_KSO_L2_KundersOrdreTotalIPeriode",  
    9                                                                         ds));  
    10             this.KSO_L2_KundersOrdreTotalIPeriodeTableAdapter.Fill(this.DataSet1.KSO_L2_KundersOrdreTotalIPeriode,  
    11                                                                         fraDato,tilDato);  
    12             this.reportViewer1.RefreshReport();  
    13         }  
    14  

    the reportViewer shows this error:

    Some parameters or credentials have not been specified

    My report level 2 HAS in fact parameters and I've set them by clikcking on a textbox in my level 1 report,choose properties, nagivation flap, Jump to report, button Parameters and specified where they should get their values - BUT if I ask for count of parameters in line 12 ... count is 0 !

    What do I miss here ?


    Best regards KSor, Denmark
    • Edited by Ksor Saturday, September 20, 2008 9:41 PM mere info
    Saturday, September 20, 2008 9:38 PM

All replies

  • Now I've come a little bit longer - my code now looks like this:
    1         private void reportViewer1_Drillthrough(object sender, Microsoft.Reporting.WinForms.DrillthroughEventArgs e)  
    2         {  
    3               
    4             this.reportViewer1.LocalReport.ReportEmbeddedResource = "TestDrillDown.L2.rdlc";  
    5             this.reportViewer1.LocalReport.DataSources.Clear();  
    6  
    7             List<TestDrillDown.DataSet1TableAdapters.KSO_L2_KundersOrdreTotalIPeriodeTableAdapter>  
    8                          ds = new List<TestDrillDown.DataSet1TableAdapters.KSO_L2_KundersOrdreTotalIPeriodeTableAdapter>();  
    9             ds.Add(KSO_L2_KundersOrdreTotalIPeriodeTableAdapter);  
    10             this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1_KSO_L2_KundersOrdreTotalIPeriode",  
    11                                                                         ds));  
    12             this.KSO_L2_KundersOrdreTotalIPeriodeTableAdapter.Fill(this.DataSet1.KSO_L2_KundersOrdreTotalIPeriode,  
    13                                                                         fraDato,tilDato);  
    14             this.reportViewer1.RefreshReport();  
    15         }  
    16  
    and data - IS PRESENT in line 12(13) - here

    this.KSO_L2_KundersOrdreTotalIPeriodeBindingSource.Count is 7 - and that's the right count

    and fraDato and tilDato has the right values but STILL the reportviewer WANTS something for the OLD datasource - the reportviewer now returns this error message:

    An error occurred during local report processing.
    An error has occurred during report processing.
    A datasource instance has not been supplied for the datasource "DataSet1_KSO_L1_TotalAlleOrdreIPeriode"

    and "DataSet1_KSO_L1_TotalAlleOrdreIPeriode" is the OLD datasource and I cleared the collection of datasources for the report in line 5 before I added the new datasource !!!!!

    Before line 14 is excecuted:
    this.reportViewer1.LocalReport.DataSources.Count is 1 and 
    this.reportViewer1.LocalReport.DataSources[0].Name is the right name ... "DataSet1_KSO_L2_KundersOrdreTotalIPeriode"

    How can I kill this spooky old datasource "DataSet1_KSO_L1_TotalAlleOrdreIPeriode" ?



     


    Best regards KSor, Denmark
    Sunday, September 21, 2008 5:07 AM
  • ??????

    Nobody got any ideas .... ???

    Maybe nobody tried the DrillDown technic ... ???

    No, can't be true !

    Best regards
    KSor, Denmark



    Best regards KSor, Denmark
    Monday, September 22, 2008 3:31 PM