//--------------------------------------------------------------------//
        //                                                        F i e l d s //
        // Class variables.                                                   //
        //                                                                    //
        //--------------------------------------------------------------------//

        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // g e n e r a t e                                                    //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Generate the PDL Data report.                                      //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void generate(ReportCore.eRptFileFmt rptFileFmt,
                                    TextBox txtReply,
                                    ref String saveFilename)
        {
            Object stream = null;
            Object writer = null;

            Boolean OK = false;

            String saveFolder = null,
                   fileExt;

            ToolCommonFunctions.getFolderName(saveFilename,
                                              ref saveFolder);

            if (rptFileFmt == ReportCore.eRptFileFmt.html)
            {
                fileExt = "html";
            }
            else if (rptFileFmt == ReportCore.eRptFileFmt.xml)
            {
                fileExt = "xml";
            }
            else
            {
                fileExt = "txt";
            }

            saveFilename = saveFolder + "\\SR_Resp." + fileExt;

            OK = ReportCore.docOpen(rptFileFmt,
                                    ref saveFilename,
                                    ref stream,
                                    ref writer);
            if (OK)
            {
                ReportCore.docInitialise(rptFileFmt, writer, false, true,
                                         0, null,
                                         null, null);

                ReportCore.hddrTitle(writer, rptFileFmt, false,
                                     "*** Status Readback response data ***");

                reportBody(rptFileFmt, writer, txtReply);

                ReportCore.docFinalise(rptFileFmt, writer);

                ReportCore.docClose(rptFileFmt, stream, writer);
            }
        }
Beispiel #2
0
        //--------------------------------------------------------------------//
        //                                                        F i e l d s //
        // Class variables.                                                   //
        //                                                                    //
        //--------------------------------------------------------------------//

        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // g e n e r a t e                                                    //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Generate the report.                                               //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void generate(
            ToolPrnAnalyse.eInfoType indxInfoType,
            ReportCore.eRptFileFmt rptFileFmt,
            DataTable table,
            String prnFilename,
            Int64 fileSize,
            Boolean flagOffsetHex,
            PrnParseOptions options)
        {
            Object stream = null;
            Object writer = null;

            Boolean OK = false;

            Int32 reportSize;

            String fileExt;
            String saveFilename = null;

            if (rptFileFmt == ReportCore.eRptFileFmt.html)
            {
                fileExt = "html";
            }
            else if (rptFileFmt == ReportCore.eRptFileFmt.xml)
            {
                fileExt = "xml";
            }
            else
            {
                fileExt = "txt";
            }

            if (indxInfoType == ToolPrnAnalyse.eInfoType.Analysis)
            {
                saveFilename = prnFilename + "_analysis." + fileExt;

                OK = ReportCore.docOpen(rptFileFmt,
                                        ref saveFilename,
                                        ref stream,
                                        ref writer);

                if (OK)
                {
                    Int32 ctClrMapRowTypes = PrnParseRowTypes.getCount();

                    Boolean useClr = options.FlagClrMapUseClr;

                    reportSize = table.Rows.Count;

                    if (useClr)
                    {
                        String[] rowClasses = new String[ctClrMapRowTypes];
                        String[] rowClrBack = new String[ctClrMapRowTypes];
                        String[] rowClrFore = new String[ctClrMapRowTypes];

                        getRowColourStyleData(options,
                                              ref rowClasses,
                                              ref rowClrBack,
                                              ref rowClrFore);

                        ReportCore.docInitialise(rptFileFmt, writer, true, false,
                                                 ctClrMapRowTypes, rowClasses,
                                                 rowClrBack, rowClrFore);
                    }
                    else
                    {
                        ReportCore.docInitialise(rptFileFmt, writer, true, false,
                                                 0, null,
                                                 null, null);
                    }

                    reportHeader(indxInfoType, rptFileFmt, writer,
                                 prnFilename, fileSize, reportSize);

                    reportBodyAnalysis(rptFileFmt, writer,
                                       table, flagOffsetHex);

                    ReportCore.docFinalise(rptFileFmt, writer);

                    ReportCore.docClose(rptFileFmt, stream, writer);
                }
            }
            else if (indxInfoType == ToolPrnAnalyse.eInfoType.Content)
            {
                saveFilename = prnFilename + "_content." + fileExt;

                OK = ReportCore.docOpen(rptFileFmt,
                                        ref saveFilename,
                                        ref stream,
                                        ref writer);
                if (OK)
                {
                    reportSize = table.Rows.Count;

                    ReportCore.docInitialise(rptFileFmt, writer, true, false,
                                             0, null,
                                             null, null);

                    reportHeader(indxInfoType, rptFileFmt, writer,
                                 prnFilename, fileSize, reportSize);

                    reportBodyContent(rptFileFmt, writer,
                                      table, flagOffsetHex);

                    ReportCore.docFinalise(rptFileFmt, writer);

                    ReportCore.docClose(rptFileFmt, stream, writer);
                }
            }
            else if (indxInfoType == ToolPrnAnalyse.eInfoType.Statistics)
            {
                saveFilename = prnFilename + "_statistics." + fileExt;

                OK = ReportCore.docOpen(rptFileFmt,
                                        ref saveFilename,
                                        ref stream,
                                        ref writer);
                if (OK)
                {
                    reportSize = table.Rows.Count;

                    ReportCore.docInitialise(rptFileFmt, writer, true, false,
                                             0, null,
                                             null, null);

                    reportHeader(indxInfoType, rptFileFmt, writer,
                                 prnFilename, fileSize, reportSize);

                    reportBodyStatistics(rptFileFmt, writer,
                                         table);

                    ReportCore.docFinalise(rptFileFmt, writer);

                    ReportCore.docClose(rptFileFmt, stream, writer);
                }
            }
        }
        //--------------------------------------------------------------------//
        //                                                        F i e l d s //
        // Class variables.                                                   //
        //                                                                    //
        //--------------------------------------------------------------------//

        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // g e n e r a t e                                                    //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Generate the report.                                               //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void generate(ReportCore.eRptFileFmt rptFileFmt,
                                    ReportCore.eRptChkMarks rptChkMarks,
                                    DataTable tableDonor,
                                    DataTable tableMapping,
                                    DataTable tableTarget,
                                    DataTable tableChars,
                                    String fontNameTTF,
                                    String fontFilenameTTF,
                                    String fontFilenamePCL)
        {
            Object stream = null;
            Object writer = null;

            Boolean OK = false;

            String fileExt;
            String saveFilename = null;

            if (rptFileFmt == ReportCore.eRptFileFmt.html)
            {
                fileExt = "html";
            }
            else if (rptFileFmt == ReportCore.eRptFileFmt.xml)
            {
                fileExt = "xml";
            }
            else
            {
                fileExt = "txt";
            }

            saveFilename = fontFilenamePCL + "_report." + fileExt;

            OK = ReportCore.docOpen(rptFileFmt,
                                    ref saveFilename,
                                    ref stream,
                                    ref writer);
            if (OK)
            {
                ReportCore.docInitialise(rptFileFmt, writer, true, false,
                                         0, null,
                                         null, null);

                reportHddr(rptFileFmt, writer,
                           fontNameTTF, fontFilenameTTF, fontFilenamePCL);

                reportHddrSub(rptFileFmt, writer, "Donor font details");

                reportBodyStd(rptFileFmt, rptChkMarks, writer, tableDonor);

                reportHddrSub(rptFileFmt, writer, "Mapping details");

                reportBodyStd(rptFileFmt, rptChkMarks, writer, tableMapping);

                reportHddrSub(rptFileFmt, writer, "Target font details");

                reportBodyStd(rptFileFmt, rptChkMarks, writer, tableTarget);

                reportHddrSub(rptFileFmt, writer, "Generated character details");

                reportBodyChars(rptFileFmt, rptChkMarks, writer, tableChars);

                ReportCore.docFinalise(rptFileFmt, writer);

                ReportCore.docClose(rptFileFmt, stream, writer);
            }
        }
Beispiel #4
0
        //--------------------------------------------------------------------//
        //                                                        F i e l d s //
        // Class variables.                                                   //
        //                                                                    //
        //--------------------------------------------------------------------//

        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // g e n e r a t e                                                    //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Generate the report.                                               //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void generate(ReportCore.eRptFileFmt rptFileFmt,
                                    String symSetFilename,
                                    UInt16 symSetNo,
                                    UInt16 [] symSetMap,
                                    UInt16 codeMin,
                                    UInt16 codeMax,
                                    UInt16 codeCt,
                                    UInt64 charCollReq,
                                    Boolean flagIgnoreC0,
                                    Boolean flagIgnoreC1,
                                    Boolean flagMapHex,
                                    PCLSymSetTypes.eIndex symSetType)
        {
            Object stream = null;
            Object writer = null;

            Boolean OK = false;

            String fileExt;
            String saveFilename = null;

            if (rptFileFmt == ReportCore.eRptFileFmt.html)
            {
                fileExt = "html";
            }
            else if (rptFileFmt == ReportCore.eRptFileFmt.xml)
            {
                fileExt = "xml";
            }
            else
            {
                fileExt = "txt";
            }

            saveFilename = symSetFilename + "_report." + fileExt;

            OK = ReportCore.docOpen(rptFileFmt,
                                    ref saveFilename,
                                    ref stream,
                                    ref writer);

            if (OK)
            {
                ReportCore.docInitialise(rptFileFmt, writer, true, false,
                                         0, null,
                                         null, null);

                reportHddr(rptFileFmt, writer, symSetFilename);

                reportBodyMain(rptFileFmt, writer, symSetNo,
                               codeMin, codeMax, codeCt, charCollReq,
                               flagIgnoreC0, flagIgnoreC1, flagMapHex,
                               symSetType);

                reportBodyMap(rptFileFmt, writer, symSetMap,
                              codeMin, codeMax,
                              flagIgnoreC0, flagIgnoreC1, flagMapHex);

                ReportCore.docFinalise(rptFileFmt, writer);

                ReportCore.docClose(rptFileFmt, stream, writer);
            }
        }
Beispiel #5
0
        //--------------------------------------------------------------------//
        //                                                        F i e l d s //
        // Class variables.                                                   //
        //                                                                    //
        //--------------------------------------------------------------------//

        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // g e n e r a t e                                                    //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Generate the report.                                               //
        //                                                                    //
        //--------------------------------------------------------------------//

        public static void generate(
            ReportCore.eRptFileFmt rptFileFmt,
            DataTable table,
            String prnFilename,
            String ovlFilename,
            Boolean flagOffsetHex,
            PrnParseOptions options)
        {
            Object stream = null;
            Object writer = null;

            Boolean OK = false;

            String fileExt;
            String saveFilename = null;

            if (rptFileFmt == ReportCore.eRptFileFmt.html)
            {
                fileExt = "html";
            }
            else if (rptFileFmt == ReportCore.eRptFileFmt.xml)
            {
                fileExt = "xml";
            }
            else
            {
                fileExt = "txt";
            }

            saveFilename = ovlFilename + "_report." + fileExt;

            OK = ReportCore.docOpen(rptFileFmt,
                                    ref saveFilename,
                                    ref stream,
                                    ref writer);

            if (OK)
            {
                Int32 ctClrMapRowTypes = PrnParseRowTypes.getCount();

                Boolean useClr = options.FlagClrMapUseClr;

                if (useClr)
                {
                    String[] rowClasses = new String[ctClrMapRowTypes];
                    String[] rowClrBack = new String[ctClrMapRowTypes];
                    String[] rowClrFore = new String[ctClrMapRowTypes];

                    getRowColourStyleData(options,
                                          ref rowClasses,
                                          ref rowClrBack,
                                          ref rowClrFore);

                    ReportCore.docInitialise(rptFileFmt, writer, true, false,
                                             ctClrMapRowTypes, rowClasses,
                                             rowClrBack, rowClrFore);
                }
                else
                {
                    ReportCore.docInitialise(rptFileFmt, writer, true, false,
                                             0, null,
                                             null, null);
                }

                reportHeader(rptFileFmt, writer,
                             prnFilename, ovlFilename);

                reportBody(rptFileFmt, writer,
                           table, flagOffsetHex);

                ReportCore.docFinalise(rptFileFmt, writer);

                ReportCore.docClose(rptFileFmt, stream, writer);
            }
        }