Home > Net >  How to read RDF reports files
How to read RDF reports files

Time:12-30

I have over 500 RDF reports files and i need to collect all them in 1 folder, read and find some code. I need to find out if the report contains a certain code. Each report has its own ID, after which I have to get which report contains a specific code

CodePudding user response:

Well, if you installed Oracle Reports Builder (or Developer, depending on version), you'd be able to open those reports and easily see what they are doing.

Without it, as RDF files aren't actually text files, you can open them in any text editor (such as Notepad) and use its search capabilities to find what you want. That's most probably a SELECT statement.

How does it look like? Ugly; have a look at RDF excerpt (select begins at line #7):

>   0 ˙˙˙˙ Ć0808¨ Ä  ®   ®function IME_REPORTAValidTrigger return boolean is
    report varchar2(40);
begin
    srw.get_report_name(report);
    :IME_REPORTA:='Report: '||report;
  return (TRUE);
end;˙˙˙˙˙˙ Ë0808¨ É  ł   ł  SELECT id_asl,
         app_user,
         naziv
    FROM adresa_slanja
   WHERE id_asl = :par_id_asl"˙˙˙˙ É€6€J€R€b|(‚ †€Šŕ•(ž€˘ŕ­(¶€ş€ş(ş(ľ(ÂpĆpĆpĆpĆpĆĆ Ç  SQL*ReportWriter  REPORT  ERVÍše adresa_slanja TÚ    @ "   ERVxv)
  ¤ !  ERVxv
     ¤ !      5   @ 100g0b88 ˙˙ ŕŕ ˙˙˙˙ (00x"# $ &˙˙  

If you had JSP files instead (or along with RDFs), that would look prettier as JSPs are easily readable in a text editor.


However: as you said

I have to get which report contains a specific code

why wouldn't you just search through all those reports from your operating system? There are various tools that let you search through files (i.e. not only by their names, but their contents as well).

I use Agent Ransack (which is free for personal and commercial use): specify which files you want to search through (*.RDF), specify what you're looking for (e.g. "from adresa_slanja") and it'll return all files that contain that string.

CodePudding user response:

I have recently resolved this for myself. What I ended up doing to resolve the issue is: I created a python script which uses rwconverter to convert all reports to XML, from there I used regex to look for the line and then replace it. After that I used rwconverter to convert it back to RDF and that's it.

Beware: If you had problems with fonts, those fonts will disappear from reports.

  • Related