QRP file information
QRP file information
Is there a tool available which can list the fonts used by a QRP report template? Or, is there any documentation available for the QRP file format?
We recently set up a new server which produces 300+ reports nightly and a font used by one report (one that we've noticed so far) was not available. Windows or Gupta substituted something close but not close enough.
I would like to find out what fonts are specified by the QRP files in order to make sure they are available on our production system.
Thanks,
Pat
We recently set up a new server which produces 300+ reports nightly and a font used by one report (one that we've noticed so far) was not available. Windows or Gupta substituted something close but not close enough.
I would like to find out what fonts are specified by the QRP files in order to make sure they are available on our production system.
Thanks,
Pat
Re: QRP file information
Hi Pat: You have basically asked:
However, my QRP happens to use "MS Sans Serif" and "Times New Roman" as I found out and I was able to find this in 2 different ways:
1 -- (time-consuming for a large report!) but I see I can click each input item, background text, etc. field in my small report and the drop-down list of fonts in RB's toolbar show the font used.
2 -- I like using a hex editor-type tool like this one: http://www.hexedit.com/
and when I opened this QRP of mine with 2 fonts with Hex Edit, I scrolled down to the bottom of the file and see what appears to be a list -- with an empty space between each listing -- of the font used for (I assume) a particular field item. I've attached an image showing an example of both fonts which are used for my test ws_custs.qrp report. I know these are the only ones as it's a small report and I verified this with my #1 method above for this report.
Granted, neither way is very elegant and I expected RB to have a way to list the fonts used, but didn't find one.
That's a good question and I'm surprised -- unless I missed something in looking at one of my reports -- that there isn't a better way. There's no tool that I know that can analyze a QRP file, except ReportBuilder itself. And I looked in RB for my sample QRP to see if there's a place where RB lists the fonts used for that report, and I couldn't find a place.How to list the fonts used in a QRP file
However, my QRP happens to use "MS Sans Serif" and "Times New Roman" as I found out and I was able to find this in 2 different ways:
1 -- (time-consuming for a large report!) but I see I can click each input item, background text, etc. field in my small report and the drop-down list of fonts in RB's toolbar show the font used.
2 -- I like using a hex editor-type tool like this one: http://www.hexedit.com/
and when I opened this QRP of mine with 2 fonts with Hex Edit, I scrolled down to the bottom of the file and see what appears to be a list -- with an empty space between each listing -- of the font used for (I assume) a particular field item. I've attached an image showing an example of both fonts which are used for my test ws_custs.qrp report. I know these are the only ones as it's a small report and I verified this with my #1 method above for this report.
Granted, neither way is very elegant and I expected RB to have a way to list the fonts used, but didn't find one.
You do not have the required permissions to view the files attached to this post.
Jeff Luther @ PC Design
Palm Springs, California
Palm Springs, California
Re: QRP file information
Hi Pat,
you could use QuickReport (File Include: qckrpt.apl), use the cReport...-ClassLibrary and go over all ReportFields and get the font of each (cReportField.GetFont()).
Regards Thomas
you could use QuickReport (File Include: qckrpt.apl), use the cReport...-ClassLibrary and go over all ReportFields and get the font of each (cReportField.GetFont()).
Regards Thomas
Re: QRP file information
I figured this problem would be useful enough that we could do with something similar to check consistency of our own QRP files, so I've put together a LINQPad Command-Line Script that does its best to extract what look like strings from either ASCII or Unicode Report Builder QRP files (tested with Report Builder 4.2 and TD 6.2).
Instructions for use:
First, install LINQPad and add it to your path if you haven't already done so. From a cmd prompt you should be able to type "lprun" and see the help:
Now, edit ignoreList.txt and ensure it contains only the font values (and other variable names) you wish to ignore.
Now, finally, run the script again, referencing the ignore file to use and --verbose 1 so that the output informs you which files contain the errant fonts:
Hope this helps!
Instructions for use:
First, install LINQPad and add it to your path if you haven't already done so. From a cmd prompt you should be able to type "lprun" and see the help:
Then extract QRPFonts.linq from the attached archive to the current folder and use from the command line as follows:Usage: lprun [<options>] <scriptfile> [<script-args>]
...
Code: Select all
lprun qrpfonts.linq --help
Parameter help:
--folder path_to_folder: Specify base folder to recursively check for *.QRP files
--ignoreFile path_to_ignore_file: Specify a file containing a list of values to ignore, one on each line
--verbosity 2: Specify a verbosity level from 0 to 2:
0 = just match text (no file names)
1 = file heading when matches + match
2 = file headings + skipped summary + pos/match
Code: Select all
lprun qrpfonts.linq --folder c:\temp\QRPFiles --verbosity 0 > ignoreList.txt
Note that ignoreList.txt will likely also contain some references to report form variables. There's not a lot we can do about that without understanding the report file format better. But by leaving those variable names in the ignore list, we can ensure they won't be flagged up.Times New Roman
Courier New
nTaxValue
strCustomerLine1
etc...
Now, finally, run the script again, referencing the ignore file to use and --verbose 1 so that the output informs you which files contain the errant fonts:
Code: Select all
lprun qrpfonts.linq --folder c:\temp\QRPFiles --ignoreFile ignoreList.txt --verbosity 1 --ignore
For automation, you could redirect console output to a file and ensure that the file is usually empty by checking the file size.Found matches in ASCII report file: c:\temp\QRPFiles\ReportWithBadFont.qrp
Curlz MT
Hope this helps!
You do not have the required permissions to view the files attached to this post.
Re: QRP file information
Thanks Jeff for looking.
I don't suppose we could see the doc for the QRP format? I imagine I could get myself in all sorts of trouble with that...
Pat
I don't suppose we could see the doc for the QRP format? I imagine I could get myself in all sorts of trouble with that...
Pat
Re: QRP file information
Yet another thing I never knew we could do in TD! Very nice.frevelundfey wrote:you could use QuickReport (File Include: qckrpt.apl), use the cReport...-ClassLibrary and go over all ReportFields and get the font of each (cReportField.GetFont()).
Re: QRP file information
Pat, you asked to:
I don't work at Gupta any longer and thus don't have access to the specification or 'doc' as you call it for RB and its QRP files. Not sure I'd ever seen the doc, either, and I started with the original Gupta Tech. back in 1988.see the doc for the QRP format
Jeff Luther @ PC Design
Palm Springs, California
Palm Springs, California
Re: QRP file information
Thomas had a good suggestion in his reply to this thread:
I only scratched the surface of what's possible to find out about in a QRP, so depending on what Pat means by "doc" in his question:
I got to thinking about that and decided to figure out how to do it. Sure enough, using the sample QRP included in the attached zip file, and understanding a bit about RB, the QCKRPT.APL's set of classes, and how the report's hierarchy of groups, blocks, lines and fields is organized, I put together a sample test showing how to list the fonts + font sizes used in a QRP. Tested in 5.2 only, but the code shows how to 'dig down' into the details of a QRP file.you could use QuickReport (File Include: qckrpt.apl)...
I only scratched the surface of what's possible to find out about in a QRP, so depending on what Pat means by "doc" in his question:
he might be able to modify this appl. to see those doc details for a given report that he had asked about.I don't suppose we could see the doc for the QRP format?
You do not have the required permissions to view the files attached to this post.
Jeff Luther @ PC Design
Palm Springs, California
Palm Springs, California
Re: QRP file information
Thank you all for all of the suggestions. I'm sure I have exactly what I need now! I never looked at QCKRPT.APL, thanks Thomas and also Jeff for the great demo app.
Pat
Pat
Re: QRP file information
You're welcome, Pat. Glad to help!
Jeff Luther @ PC Design
Palm Springs, California
Palm Springs, California
Who is online
Users browsing this forum: [Ccbot] and 0 guests