File Format - External program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fugazi84
    Visitor
    • Feb 2009
    • 5

    File Format - External program

    I'm trying to create a File Format for Oracle Reports comparaison.
    I'm using this external program :

    C:\DevSuiteHome_1\BIN\rwconverter.exe batch=yes source=%s dest=%t dtype=xmlfile overwrite=yes

    This converter create a .XML file of my reports, and I was hoping to compare the 2 xml files. The converter seems to work, because if I look at C:\Documents and Settings\dlaberge\Local Settings\Temp, my 2 xml file (create by my rwconverter) are there. The problem is that BC3 doesn't seems to compare my xml file, because he return nothing in the compare windows. It's like he is trying to compare 2 empty files.

    Anyone can help me!?

    Thanks
    Doum
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    Hello,

    If you run that from the comand line on the same files you were testing in BC, does your "%t" file populate as a plain text file? The temporary %t is what BC will try to open after the conversion runs.
    Aaron P Scooter Software

    Comment

    • fugazi84
      Visitor
      • Feb 2009
      • 5

      #3
      Yes, if i run it in command-line (dos-mode without BC), the %t is a XML file.
      If I run it inside BC, BC create the same 2 files in the /temp, but doesn't seems to open it.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16002

        #4
        Try to put your command into a .bat file, and then try setting the bat file as the external conversion process. Is it possible that the temp file is created and returned before populated with information (which gives it to BC), and then filled?


        Hopfully simply by putting it in a bat file, that should add the delay necessary, otherwise I found:
        to add a pause in to the .bat file:
        PING 1.1.1.1 -n 1 -w 30000 >NUL
        http://www.petri.co.il/forums/showthread.php?t=9584

        or
        ping -n 60 localhost
        Aaron P Scooter Software

        Comment

        • fugazi84
          Visitor
          • Feb 2009
          • 5

          #5
          I'va to put my command on a .bat file, but this doesn't change anythings.
          My .bat file look like this :
          C:\DevSuiteHome_1\BIN\rwconverter.exe batch=yes source=%1 dest=%2 dtype=xmlfile overwrite=yes
          ping -n 60 localhost

          In BC I wrote : c:\tmp\comparerdf.bat %s %t

          BC generate my two XML files (convert rdf to xml), but it doesn't show in BC.

          In my definition of file format, I put the Grammar for XML file.. it is ok?!

          Thank you

          Comment

          • Michael Bulgrien
            Carpal Tunnel
            • Oct 2007
            • 1772

            #6
            Have you verified that the paths you are passing as parameters are enclosed in quotation marks?

            For example, if you use these commands in the batch file, do the paths show up correctly with the path enclosed in quotation marks?

            @Echo %1
            @Echo %2
            @Pause
            BC v4.0.7 build 19761
            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

            Comment

            • Aaron
              Team Scooter
              • Oct 2007
              • 16002

              #7
              Hello,

              I'd recommend trying Michael's suggestion to make sure Paths are properly passed. Otherwise, it looks like it is setup ok. Are there extra command line parameters you can pass rwconverter.exe that may help if it is returning "done" status before actually outputting to the file? Is there a free version to download/run with that conversion process here? It looks like it is included as part of the Oracle Reports suite.

              What do you mean by "put the Grammar for XML file"? If you mean adding new Grammer elements that are the same as the XML file format's, that is fine. The conversion process should return a plain text file that BC will then open. The Grammer Elements are then applied to the text file and can define sections of text as Important, Unimportant, syntax coloring, etc.
              Aaron P Scooter Software

              Comment

              • fugazi84
                Visitor
                • Feb 2009
                • 5

                #8
                First of all, thank you for the support.

                I have tried the Michael solution, but since BC cannot provide an output, I have to execute my .bat by hand, so the files (parameters) aren't passed by BC. But, I have notice that the paths aren't enclosed in quotation marks.
                See:
                C:\tmp>comparerdf.bat c:\tmp\ac5001.rdf c:\tmp\ac5002.rdf
                c:\tmp\ac5001.rdf
                c:\tmp\ac5002.rdf

                But, I don't think that's the problem, because if I look in the \temp, I see the 2 file created by the converter and with a name give by BC.
                See:
                BC3214.xml
                BC3213.xml
                BC3214.tmp
                BC3213.tmp

                If I choose this 2 XML and compare it with BC, it does exactly what I am waiting for. BUT, it doesn't work directly in BC. BC seem to compare nothing after the conversion. It's like if he forget that he must compare BC3214.xml and BC3213.xml...

                For the rwconverter, it's part of the oracle suite. It's not "standalone" and need some dll that I don't know.

                By the way, how can I know what files (the path and name) BC really compare when an external program is set for a file format!? Any debug accessible!?

                For the grammar, it's exactly what you describe.
                Thanks alots..

                p.s. Sorry for my english, because it's not my primary language.

                Comment

                • Lutz
                  Veteran
                  • Oct 2007
                  • 356

                  #9
                  Originally posted by fugazi84
                  But, I don't think that's the problem, because if I look in the \temp, I see the 2 file created by the converter and with a name give by BC.
                  See:
                  BC3214.xml
                  BC3213.xml
                  BC3214.tmp
                  BC3213.tmp
                  ...
                  By the way, how can I know what files (the path and name) BC really compare when an external program is set for a file format!? Any debug accessible!?
                  BC ever opens the %t .tmp files given by the conversion call, so in your case it opens BC3214.tmp and BC3213.tmp for the comparision.

                  Assuming that rwconverter.exe created BC3214.xml and BC3213.xml, BC will show the empty .tmp files.
                  rwconverter.exe should create the .tmp file given by BC but not an .xml file. If this is not possible, you have to rename the .xml file to the .tmp file in your .bat file.

                  Comment

                  • fugazi84
                    Visitor
                    • Feb 2009
                    • 5

                    #10
                    Thanks ALOT!!!

                    It's work now.
                    this is my .bat file if it can help someone.

                    Code:
                     
                    rwconverter.exe batch=yes source=%1 dest=%2 dtype=xmlfile overwrite=yes
                    cd %~p2
                    del %~2
                    ren %~n2.xml %~n2.tmp

                    Comment

                    • Milla
                      Visitor
                      • May 2014
                      • 6

                      #11
                      I've expanded fugazi84's solution so that it works with Oracle Reports, Libraries, Forms, Menus, and Object Libraries. These were tested against Oracle Developer Suite 10g.

                      rwconverter.exe and frmf2xml.bat must be on your path for these to work.

                      Can these File Formats be added to the download page?

                      Comment

                      • Aaron
                        Team Scooter
                        • Oct 2007
                        • 16002

                        #12
                        Thanks. We'll review this one as well.
                        Aaron P Scooter Software

                        Comment

                        Working...