// Pre: No value is NULL
        // Post: output report bytes
        public static byte[] GetUmzugsmitteilung(COR_Reports.ReportFormatInfo formatInfo, string in_ump_uid, string in_sprache)
        {
            string report = "UM_Umzugsmitteilung2.rdl";
            byte[] baReport = null;

            // if (string.IsNullOrEmpty(in_ump_uid)) in_ump_uid = "C38CB749-1EEC-4686-9BBA-F627B9C4E8EC";
            if (string.IsNullOrEmpty(in_sprache)) in_sprache = "DE";

            // formatInfo = new Portal_Reports.ReportFormatInfo(ExportFormat.Word);

            try
            {
                COR_Reports.ReportTools.ReportDataCallback_t myFunc = delegate(COR_Reports.ReportViewer viewer, System.Xml.XmlDocument doc)
                {
                    // viewer["format"] = formatInfo.FormatName;
                    // viewer["extension"] = formatInfo.Extension;
                    // viewer["report"] = report;

                    //string extension = viewer["extension"];
                    ////////////////////////////

                    System.Collections.Generic.List<COR_Reports.ReportParameter> lsParameters =
                        new System.Collections.Generic.List<COR_Reports.ReportParameter>();

                    viewer.SetParameters(lsParameters);
                    lsParameters.Clear();
                    lsParameters = null;

                    {
                        // Add data sources
                        COR_Reports.ReportDataSource rds = new COR_Reports.ReportDataSource();
                        rds.Name = "DataSet1"; //This refers to the dataset name in the RDLC file
                        string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rds.Name);
                        rds.Value = SQL.GetDataTable(strSQL);

                        strSQL = null;
                        viewer.DataSources.Add(rds);
                    }

                };

                baReport = COR_Reports.ReportTools.RenderReport(report, formatInfo, myFunc);
            }
            catch
            {
                // Basic_SQL.SQL.Log(ex);
                throw;
            }

            // If testing
            if (System.StringComparer.InvariantCultureIgnoreCase.Equals(System.Environment.UserDomainName, "COR"))
            {
                using (System.IO.FileStream fs = System.IO.File.Create(@"D:\" + System.IO.Path.GetFileNameWithoutExtension(report) + formatInfo.Extension))
                {
                    fs.Write(baReport, 0, baReport.Length);
                } // End Using fs
            }

            return baReport;
        }
Example #2
0
        } // End Sub GetUmzugsmitteilung

        // D:\reportviewerz\2005
        // Depends on TFS://COR-Library\COR_Reports\COR_Reports.csproj
        // Pre: No value is NULL
        // Post: output report bytes
        public static byte[] GetFooter(string report, COR_Reports.ReportFormatInfo formatInfo, string in_aperturedwg, string in_stylizer)
        {
            byte[] baReport = null;

            try
            {
                COR_Reports.ReportTools.ReportDataCallback_t myFunc = delegate(COR_Reports.ReportViewer viewer, System.Xml.XmlDocument doc)
                {
                    // viewer["format"] = formatInfo.FormatName;
                    // viewer["extension"] = formatInfo.Extension;
                    // viewer["report"] = report;

                    //string extension = viewer["extension"];
                    ////////////////////////////

                    System.Collections.Generic.List <COR_Reports.ReportParameter> lsParameters =
                        new System.Collections.Generic.List <COR_Reports.ReportParameter>();

                    lsParameters.Add(new COR_Reports.ReportParameter("in_aperturedwg", in_aperturedwg));
                    lsParameters.Add(new COR_Reports.ReportParameter("in_stylizer", in_stylizer));
                    // lsParameters.Add(new COR_Reports.ReportParameter("datastart", "dateTimePickerStartRaport.Text"));
                    // lsParameters.Add(new COR_Reports.ReportParameter("dataStop", "dateTimePickerStopRaport.Text"));

                    viewer.SetParameters(lsParameters);
                    lsParameters.Clear();
                    lsParameters = null;

                    // Add data sources
                    COR_Reports.ReportDataSource rds = new COR_Reports.ReportDataSource();
                    rds.Name = "DATA_Planinfo"; //This refers to the dataset name in the RDLC file
                    string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rds.Name);
                    strSQL = strSQL.Replace("@in_aperturedwg", "'" + in_aperturedwg.Replace("'", "''") + "'");
                    strSQL = strSQL.Replace("@in_stylizer", "'" + in_stylizer.Replace("'", "''") + "'");

                    rds.Value = Basic_SQL.SQL.GetDataTable(strSQL);
                    strSQL    = null;
                    viewer.DataSources.Add(rds);
                }; // End Sub ReportDataCallback_t

                baReport = COR_Reports.ReportTools.RenderReport(report, formatInfo, myFunc);
            }
            catch (System.Exception ex)
            {
                Basic_SQL.SQL.Log(ex);
                throw;
            }


            // If testing
            if (System.StringComparer.InvariantCultureIgnoreCase.Equals(System.Environment.UserDomainName, "COR"))
            {
                using (System.IO.FileStream fs = System.IO.File.Create(@"D:\" + System.IO.Path.GetFileNameWithoutExtension(report) + formatInfo.Extension))
                {
                    fs.Write(baReport, 0, baReport.Length);
                } // End Using fs
            }

            return(baReport);
        } // End Sub GetFooter
        // D:\reportviewerz\2005
        // Depends on TFS://COR-Library\COR_Reports\COR_Reports.csproj
        // Pre: No value is NULL
        // Post: output report bytes
        public static byte[] GetFooter(string report, COR_Reports.ReportFormatInfo formatInfo, string in_aperturedwg, string in_stylizer)
        {
            byte[] baReport = null;

            try
            {
                COR_Reports.ReportTools.ReportDataCallback_t myFunc = delegate(COR_Reports.ReportViewer viewer, System.Xml.XmlDocument doc)
                {
                    // viewer["format"] = formatInfo.FormatName;
                    // viewer["extension"] = formatInfo.Extension;
                    // viewer["report"] = report;

                    //string extension = viewer["extension"];
                    ////////////////////////////

                    System.Collections.Generic.List<COR_Reports.ReportParameter> lsParameters =
                        new System.Collections.Generic.List<COR_Reports.ReportParameter>();

                    lsParameters.Add(new COR_Reports.ReportParameter("in_aperturedwg", in_aperturedwg));
                    lsParameters.Add(new COR_Reports.ReportParameter("in_stylizer", in_stylizer));
                    // lsParameters.Add(new COR_Reports.ReportParameter("datastart", "dateTimePickerStartRaport.Text"));
                    // lsParameters.Add(new COR_Reports.ReportParameter("dataStop", "dateTimePickerStopRaport.Text"));

                    viewer.SetParameters(lsParameters);
                    lsParameters.Clear();
                    lsParameters = null;

                    // Add data sources
                    COR_Reports.ReportDataSource rds = new COR_Reports.ReportDataSource();
                    rds.Name = "DATA_Planinfo"; //This refers to the dataset name in the RDLC file
                    string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rds.Name);
                    strSQL = strSQL.Replace("@in_aperturedwg", "'" + in_aperturedwg.Replace("'", "''") + "'");
                    strSQL = strSQL.Replace("@in_stylizer", "'" + in_stylizer.Replace("'", "''") + "'");

                    rds.Value = Basic_SQL.SQL.GetDataTable(strSQL);
                    strSQL = null;
                    viewer.DataSources.Add(rds);
                }; // End Sub ReportDataCallback_t

                baReport = COR_Reports.ReportTools.RenderReport(report, formatInfo, myFunc);

            }
            catch (System.Exception ex)
            {
                Basic_SQL.SQL.Log(ex);
                throw;
            }

            // If testing
            if (System.StringComparer.InvariantCultureIgnoreCase.Equals(System.Environment.UserDomainName, "COR"))
            {
                using (System.IO.FileStream fs = System.IO.File.Create(@"D:\" + System.IO.Path.GetFileNameWithoutExtension(report) + formatInfo.Extension))
                {
                    fs.Write(baReport, 0, baReport.Length);
                } // End Using fs
            }

            return baReport;
        }
Example #4
0
        } // End Sub GetFooterPDF

        // D:\reportviewerz\2005
        // Depends on TFS://COR-Library\COR_Reports\COR_Reports.csproj
        // Pre: No value is NULL
        // Post: output report bytes
        public static byte[] GetReport2(string report, COR_Reports.ReportFormatInfo formatInfo)
        {
            byte[] baReport = null;

            try
            {
                COR_Reports.ReportTools.ReportDataCallback_t myFunc = delegate(COR_Reports.ReportViewer viewer, System.Xml.XmlDocument doc)
                {
                    // Add data sources
                    COR_Reports.ReportDataSource rds = new COR_Reports.ReportDataSource();
                    rds.Name = "DataSet1"; //This refers to the dataset name in the RDLC file
                    string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rds.Name);


                    rds.Value = Basic_SQL.SQL.GetDataTable(strSQL);
                    strSQL    = null;
                    viewer.DataSources.Add(rds);
                }; // End Sub ReportDataCallback_t

                baReport = COR_Reports.ReportTools.RenderReport(report, formatInfo, myFunc);
            }
            catch (System.Exception ex)
            {
                Basic_SQL.SQL.Log(ex);
                throw;
            }


            // If testing
            if (System.StringComparer.InvariantCultureIgnoreCase.Equals(System.Environment.UserDomainName, "COR"))
            {
                using (System.IO.FileStream fs = System.IO.File.Create(@"D:\" + System.IO.Path.GetFileNameWithoutExtension(report) + formatInfo.Extension))
                {
                    fs.Write(baReport, 0, baReport.Length);
                } // End Using fs
            }

            return(baReport);
        } // End Sub GetReport2
        // Pre: No value is NULL
        // Post: output report bytes
        public static byte[] GetUmzugsmitteilung(COR_Reports.ReportFormatInfo formatInfo, string in_ump_uid, string in_sprache)
        {
            string report = "UM_Umzugsmitteilung.rdl";
            byte[] baReport = null;

            // if (string.IsNullOrEmpty(in_ump_uid)) in_ump_uid = "C38CB749-1EEC-4686-9BBA-F627B9C4E8EC";
            if (string.IsNullOrEmpty(in_sprache)) in_sprache = "DE";

            // formatInfo = new Portal_Reports.ReportFormatInfo(ExportFormat.Word);

            try
            {
                COR_Reports.ReportTools.ReportDataCallback_t myFunc = delegate(COR_Reports.ReportViewer viewer, System.Xml.XmlDocument doc)
                {
                    // viewer["format"] = formatInfo.FormatName;
                    // viewer["extension"] = formatInfo.Extension;
                    // viewer["report"] = report;

                    //string extension = viewer["extension"];
                    ////////////////////////////

                    System.Collections.Generic.List<COR_Reports.ReportParameter> lsParameters =
                        new System.Collections.Generic.List<COR_Reports.ReportParameter>();

                    lsParameters.Add(new COR_Reports.ReportParameter("in_mandant", "0"));
                    lsParameters.Add(new COR_Reports.ReportParameter("proc", "administrator"));
                    lsParameters.Add(new COR_Reports.ReportParameter("in_sprache", in_sprache));
                    // lsParameters.Add(new Portal_Reports.ReportParameter("in_report_name", "UM_Umzugsmitteilung"));

                    // lsParameters.Add(new Portal_Reports.ReportParameter("in_stichtag", System.DateTime.Now.ToString("dd.MM.yyyy")));

                    // lsParameters.Add(new Portal_Reports.ReportParameter("def_pageformat", "Seite {0} von {1}"));
                    // lsParameters.Add(new Portal_Reports.ReportParameter("def_dateformat", "d.MM.yyyy"));

                    lsParameters.Add(new COR_Reports.ReportParameter("in_umzugsuid", in_ump_uid));
                    // lsParameters.Add(new COR_Reports.ReportParameter("datastart", "dateTimePickerStartRaport.Text"));
                    // lsParameters.Add(new COR_Reports.ReportParameter("dataStop", "dateTimePickerStopRaport.Text"));

                    viewer.SetParameters(lsParameters);
                    lsParameters.Clear();
                    lsParameters = null;

                    {
                        // Add data sources
                        COR_Reports.ReportDataSource rds = new COR_Reports.ReportDataSource();
                        rds.Name = "DATA_Umzugsmitteilung"; //This refers to the dataset name in the RDLC file
                        string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rds.Name);
                        strSQL = strSQL.Replace("@_in_umzugsuid", "'" + in_ump_uid.Replace("'", "''") + "'");
                        strSQL = strSQL.Replace("@_in_sprache", "'" + in_sprache.Replace("'", "''") + "'");
                        rds.Value = SQL.GetDataTable(strSQL);

                        strSQL = null;
                        viewer.DataSources.Add(rds);
                    }

                    {
                        COR_Reports.ReportDataSource rdsHeader = new COR_Reports.ReportDataSource();
                        rdsHeader.Name = "DATA_Umzugsheader"; //This refers to the dataset name in the RDLC file
                        string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rdsHeader.Name);
                        strSQL = strSQL.Replace("@_in_umzugsuid", "'" + in_ump_uid.Replace("'", "''") + "'");
                        rdsHeader.Value = SQL.GetDataTable(strSQL);
                        strSQL = null;
                        viewer.DataSources.Add(rdsHeader);
                    }

                    {
                        COR_Reports.ReportDataSource rdsTranslation = new COR_Reports.ReportDataSource();
                        rdsTranslation.Name = "DATA_Report_Translation"; //This refers to the dataset name in the RDLC file
                        string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rdsTranslation.Name);
                        strSQL = strSQL.Replace("@in_sprache", "'" + in_sprache.Replace("'", "''") + "'");
                        rdsTranslation.Value = SQL.GetDataTable(strSQL);
                        strSQL = null;
                        viewer.DataSources.Add(rdsTranslation);
                    }

                };

                baReport = COR_Reports.ReportTools.RenderReport(report, formatInfo, myFunc);
            }
            catch
            {
                // Basic_SQL.SQL.Log(ex);
                throw;
            }

            // If testing
            if (System.StringComparer.InvariantCultureIgnoreCase.Equals(System.Environment.UserDomainName, "COR"))
            {
                using (System.IO.FileStream fs = System.IO.File.Create(@"D:\" + System.IO.Path.GetFileNameWithoutExtension(report) + formatInfo.Extension))
                {
                    fs.Write(baReport, 0, baReport.Length);
                } // End Using fs
            }

            return baReport;
        }
Example #6
0
        // Pre: No value is NULL
        // Post: output report bytes
        public static byte[] GetUmzugsmitteilung(COR_Reports.ReportFormatInfo formatInfo, string in_ump_uid, string in_sprache)
        {
            string report = "UM_Umzugsmitteilung2.rdl";

            byte[] baReport = null;

            // if (string.IsNullOrEmpty(in_ump_uid)) in_ump_uid = "C38CB749-1EEC-4686-9BBA-F627B9C4E8EC";
            if (string.IsNullOrEmpty(in_sprache))
            {
                in_sprache = "DE";
            }


            // formatInfo = new Portal_Reports.ReportFormatInfo(ExportFormat.Word);


            try
            {
                COR_Reports.ReportTools.ReportDataCallback_t myFunc = delegate(COR_Reports.ReportViewer viewer, System.Xml.XmlDocument doc)
                {
                    // viewer["format"] = formatInfo.FormatName;
                    // viewer["extension"] = formatInfo.Extension;
                    // viewer["report"] = report;

                    //string extension = viewer["extension"];
                    ////////////////////////////

                    System.Collections.Generic.List <COR_Reports.ReportParameter> lsParameters =
                        new System.Collections.Generic.List <COR_Reports.ReportParameter>();


                    viewer.SetParameters(lsParameters);
                    lsParameters.Clear();
                    lsParameters = null;

                    {
                        // Add data sources
                        COR_Reports.ReportDataSource rds = new COR_Reports.ReportDataSource();
                        rds.Name = "DataSet1"; //This refers to the dataset name in the RDLC file
                        string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rds.Name);
                        rds.Value = SQL.GetDataTable(strSQL);

                        strSQL = null;
                        viewer.DataSources.Add(rds);
                    }
                };

                baReport = COR_Reports.ReportTools.RenderReport(report, formatInfo, myFunc);
            }
            catch
            {
                // Basic_SQL.SQL.Log(ex);
                throw;
            }


            // If testing
            if (System.StringComparer.InvariantCultureIgnoreCase.Equals(System.Environment.UserDomainName, "COR"))
            {
                using (System.IO.FileStream fs = System.IO.File.Create(@"D:\" + System.IO.Path.GetFileNameWithoutExtension(report) + formatInfo.Extension))
                {
                    fs.Write(baReport, 0, baReport.Length);
                } // End Using fs
            }

            return(baReport);
        } // End Sub GetFooterPDF
        // D:\reportviewerz\2005
        // Depends on TFS://COR-Library\COR_Reports\COR_Reports.csproj
        // Pre: No value is NULL
        // Post: output report bytes
        public static byte[] GetReport2(string report, COR_Reports.ReportFormatInfo formatInfo)
        {
            byte[] baReport = null;

            try
            {
                COR_Reports.ReportTools.ReportDataCallback_t myFunc = delegate(COR_Reports.ReportViewer viewer, System.Xml.XmlDocument doc)
                {
                    // Add data sources
                    COR_Reports.ReportDataSource rds = new COR_Reports.ReportDataSource();
                    rds.Name = "DataSet1"; //This refers to the dataset name in the RDLC file
                    string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rds.Name);

                    rds.Value = Basic_SQL.SQL.GetDataTable(strSQL);
                    strSQL = null;
                    viewer.DataSources.Add(rds);
                }; // End Sub ReportDataCallback_t

                baReport = COR_Reports.ReportTools.RenderReport(report, formatInfo, myFunc);

            }
            catch (System.Exception ex)
            {
                Basic_SQL.SQL.Log(ex);
                throw;
            }

            // If testing
            if (System.StringComparer.InvariantCultureIgnoreCase.Equals(System.Environment.UserDomainName, "COR"))
            {
                using (System.IO.FileStream fs = System.IO.File.Create(@"D:\" + System.IO.Path.GetFileNameWithoutExtension(report) + formatInfo.Extension))
                {
                    fs.Write(baReport, 0, baReport.Length);
                } // End Using fs
            }

            return baReport;
        }
Example #8
0
        // Pre: No value is NULL
        // Post: output report bytes
        public static byte[] GetUmzugsmitteilung(COR_Reports.ReportFormatInfo formatInfo, string in_ump_uid, string in_sprache)
        {
            string report = "UM_Umzugsmitteilung.rdl";

            byte[] baReport = null;

            // if (string.IsNullOrEmpty(in_ump_uid)) in_ump_uid = "C38CB749-1EEC-4686-9BBA-F627B9C4E8EC";
            if (string.IsNullOrEmpty(in_sprache))
            {
                in_sprache = "DE";
            }


            // formatInfo = new Portal_Reports.ReportFormatInfo(ExportFormat.Word);


            try
            {
                COR_Reports.ReportTools.ReportDataCallback_t myFunc = delegate(COR_Reports.ReportViewer viewer, System.Xml.XmlDocument doc)
                {
                    // viewer["format"] = formatInfo.FormatName;
                    // viewer["extension"] = formatInfo.Extension;
                    // viewer["report"] = report;

                    //string extension = viewer["extension"];
                    ////////////////////////////

                    System.Collections.Generic.List <COR_Reports.ReportParameter> lsParameters =
                        new System.Collections.Generic.List <COR_Reports.ReportParameter>();


                    lsParameters.Add(new COR_Reports.ReportParameter("in_mandant", "0"));
                    lsParameters.Add(new COR_Reports.ReportParameter("proc", "administrator"));
                    lsParameters.Add(new COR_Reports.ReportParameter("in_sprache", in_sprache));
                    // lsParameters.Add(new Portal_Reports.ReportParameter("in_report_name", "UM_Umzugsmitteilung"));

                    // lsParameters.Add(new Portal_Reports.ReportParameter("in_stichtag", System.DateTime.Now.ToString("dd.MM.yyyy")));

                    // lsParameters.Add(new Portal_Reports.ReportParameter("def_pageformat", "Seite {0} von {1}"));
                    // lsParameters.Add(new Portal_Reports.ReportParameter("def_dateformat", "d.MM.yyyy"));

                    lsParameters.Add(new COR_Reports.ReportParameter("in_umzugsuid", in_ump_uid));
                    // lsParameters.Add(new COR_Reports.ReportParameter("datastart", "dateTimePickerStartRaport.Text"));
                    // lsParameters.Add(new COR_Reports.ReportParameter("dataStop", "dateTimePickerStopRaport.Text"));

                    viewer.SetParameters(lsParameters);
                    lsParameters.Clear();
                    lsParameters = null;

                    {
                        // Add data sources
                        COR_Reports.ReportDataSource rds = new COR_Reports.ReportDataSource();
                        rds.Name = "DATA_Umzugsmitteilung"; //This refers to the dataset name in the RDLC file
                        string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rds.Name);
                        strSQL    = strSQL.Replace("@_in_umzugsuid", "'" + in_ump_uid.Replace("'", "''") + "'");
                        strSQL    = strSQL.Replace("@_in_sprache", "'" + in_sprache.Replace("'", "''") + "'");
                        rds.Value = SQL.GetDataTable(strSQL);

                        strSQL = null;
                        viewer.DataSources.Add(rds);
                    }

                    {
                        COR_Reports.ReportDataSource rdsHeader = new COR_Reports.ReportDataSource();
                        rdsHeader.Name = "DATA_Umzugsheader"; //This refers to the dataset name in the RDLC file
                        string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rdsHeader.Name);
                        strSQL          = strSQL.Replace("@_in_umzugsuid", "'" + in_ump_uid.Replace("'", "''") + "'");
                        rdsHeader.Value = SQL.GetDataTable(strSQL);
                        strSQL          = null;
                        viewer.DataSources.Add(rdsHeader);
                    }

                    {
                        COR_Reports.ReportDataSource rdsTranslation = new COR_Reports.ReportDataSource();
                        rdsTranslation.Name = "DATA_Report_Translation"; //This refers to the dataset name in the RDLC file
                        string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rdsTranslation.Name);
                        strSQL = strSQL.Replace("@in_sprache", "'" + in_sprache.Replace("'", "''") + "'");
                        rdsTranslation.Value = SQL.GetDataTable(strSQL);
                        strSQL = null;
                        viewer.DataSources.Add(rdsTranslation);
                    }
                };

                baReport = COR_Reports.ReportTools.RenderReport(report, formatInfo, myFunc);
            }
            catch
            {
                // Basic_SQL.SQL.Log(ex);
                throw;
            }


            // If testing
            if (System.StringComparer.InvariantCultureIgnoreCase.Equals(System.Environment.UserDomainName, "COR"))
            {
                using (System.IO.FileStream fs = System.IO.File.Create(@"D:\" + System.IO.Path.GetFileNameWithoutExtension(report) + formatInfo.Extension))
                {
                    fs.Write(baReport, 0, baReport.Length);
                } // End Using fs
            }

            return(baReport);
        } // End Sub GetFooterPDF
Example #9
0
        // Depends on TFS://COR-Library\COR_Reports\COR_Reports.csproj
        // COR_Legende.ReportFooterSTZH.GetFooterPDF
        //Public Shared Function GetFooter(report As String, formatInfo As COR_Reports.ReportFormatInfo, in_aperturedwg As String, in_stylizer As String, in_sprache As String, ByRef AdjustHeight As Boolean) As Byte()
        public static byte[] GetFooter(string report, COR_Reports.ReportFormatInfo formatInfo)
        {
            byte[] baReport = null;

            try
            {
                COR_Reports.ReportTools.ReportDataCallback_t cb = (COR_Reports.ReportViewer viewer, System.Xml.XmlDocument doc) =>
                {
                    //Dim lsParameters As New System.Collections.Generic.List(Of COR_Reports.ReportParameter)()



                    //lsParameters.Add(New COR_Reports.ReportParameter("in_aperturedwg", "G00020-OG02_0000"))
                    //lsParameters.Add(New COR_Reports.ReportParameter("in_stylizer", "REM Bodenbelag"))
                    //lsParameters.Add(New COR_Reports.ReportParameter("in_sprache", "DE"))

                    //If leg.IsBKB AndAlso False Then
                    //    lsParameters.Add(New COR_Reports.ReportParameter("proc", leg.UserInfo.BE_User))
                    //End If

                    //' lsParameters.Add(new COR_Reports.ReportParameter("datastart", "dateTimePickerStartRaport.Text"))
                    //' lsParameters.Add(new COR_Reports.ReportParameter("dataStop", "dateTimePickerStopRaport.Text"))

                    //viewer.SetParameters(lsParameters)
                    //lsParameters.Clear()
                    //lsParameters = Nothing


                    string sprache = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName.ToUpperInvariant();

                    // Add data sources
                    {
                        // This refers to the dataset name in the RDL/RDLC file
                        COR_Reports.ReportDataSource rdsDATA_Raum = new COR_Reports.ReportDataSource();
                        rdsDATA_Raum.Name = "DATA_Raum";
                        string strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rdsDATA_Raum.Name);
                        strSQL = strSQL.Replace("@in_sprache", "'" + sprache + "'");
                        System.Data.DataTable dt = GetDataTable(strSQL);
                        rdsDATA_Raum.Value = dt;
                        viewer.DataSources.Add(rdsDATA_Raum);


                        // This refers to the dataset name in the RDL/RDLC file
                        COR_Reports.ReportDataSource rdsDATA_Nutzungsart = new COR_Reports.ReportDataSource();
                        rdsDATA_Nutzungsart.Name = "DATA_Nutzungsart";
                        strSQL = COR_Reports.ReportTools.GetDataSetDefinition(doc, rdsDATA_Nutzungsart.Name);
                        strSQL = strSQL.Replace("@in_sprache", "'" + sprache + "'");
                        System.Data.DataTable dt2 = GetDataTable(strSQL);
                        rdsDATA_Nutzungsart.Value = dt2;
                        viewer.DataSources.Add(rdsDATA_Nutzungsart);
                    }
                };

                baReport = COR_Reports.ReportTools.RenderReport(report, formatInfo, cb);

                using (System.IO.FileStream fs = System.IO.File.Create("D:\\" + System.IO.Path.GetFileNameWithoutExtension(report) + formatInfo.Extension))
                {
                    fs.Write(baReport, 0, baReport.Length);
                } // End Using fs
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex);
            }

            return(baReport);
        } // GetFooter