No problem!
Create your own page counter as a "User Variable".
Assign Name: MyPageCounter
Field/Expression to Evaluate: <none>
Total Type: Count
Evaluate On: At the end of every page
You realize, this variable have to be reset each time the group break (New
Invoice) is triggering. So you have to insert the MyPageCounter variable beneath
the "Group Totals (New Invoice)" branch in the Dictionary. It will
work just as you need. And it's very easy to implement. Isn't it?
Believe me, it is possible to implement much more complex calculations using
a variety of "Evaluate On" and "Reset On" attributes of
FRB "User
Variables".
BTW, the "Reset On" attribute mentioned being setup implicitly when
you
insert a new variable by selecting an appropriate "Group Totals"/"Grand
Totals"/"Page Totals" branch in the Dictionary. This choice
in FRB is
equivalent to "RESET(breaklevel)" feature of the "normal"
Clarion reports.
But it is much more intuitively clear for end-user understanding, IMHO.
Go back
I hear that FRB will allow a report to be converted to a Word document. Is this correct?
Actually, each WMF page of a generated report is inserted as an image into a Word document using DDE. MsWord can be set into Preview mode with the appropriate DDE command. The export process is automatic and looks like the standard Clarion preview. After previewing you can save the report as a DOC file and send it via e-mail to any person. Each page can be modified by MsWord as embedded WMF image. You can simply change or delete any string or number in generated report if you want.
FRB can help you when you'd like to empower your end-user with report design capabilities. No matter if it is hand-coded or a template generated application. The FRB itself is a hand-coded project. The result of my project is the Report Builder Class library (RBC) - standalone DLL /local LIB. It is written using Clarion language only. There is an appropriate template set in the FRB package. It is intended to facilitate the use of my class library. If you want to use my classes manually – it’s no problem. Just do it.
The same report can give different hardcopy size at different printers. This is a common problem. FRB have a feature allowing you to adjust the actual size of the report controls, without changing the report layout itself. Look at [FominReportBuilder] section of your WIN.INI file. There are percent values to adjust the vertical and horizontal dimensions for each printer you have defined to you application. The effective step is 5%. So, you can manually write 90, 95, 100, 105, 110 or let your end-user change these values as I did in my example application.
There is appropriate functionality for the end-user to insert the FORM band into FRB report layout. Besides, you can do this as a developer of the application. To do this you have to
complete the following steps:
1) Somewhere in the RunTimeReport procedure data section, or even at the Global data section, define your own initial REPORT structure (using THOUS measurement) with FORM band. For example:
MyReport REPORT,AT(0,0),FONT('Arial',10,,),THOUS
FORM,AT(,,)
IMAGE(....
STRING('Put predefined company name here...')
END
END
2) At the "Before Open View" embed point insert code below:
SELF.Report &= MyReport
NOTE: this FORM will be active for each report created by the end-user for
this report type. This way you can create default forms with a company logo
or a watermark image background. This approach is well suitable for a "demo" watermark,
because end-user usually can edit any report layout but won't be able to change the watermark printed.
When you installed the product, you had to select the "Other" language
choice. In this case, all messages/prompts are retrieved from FRB_NLS.INI
file. If you do not want to reinstall the product - just open FRB.TPL and
FRBC.TPL files and edit the line
FRB::LibLanguage = 'Other'
Can I distributed FRB royalty free?
Yes. Having bought the FRB, you can distribute your application (EXE or EXE + DLLs) without any additional fees.
The "trailing text" feature of FRB 2.5 release will allow you to do this. This is a property of any BAND. Just enter a memo field name into the appropriate entry field of the "Band properties" window. The text will be printed after the band specified using the band width and font.
RPM works OK on Clarion Legacy. But not with ABC. Why?
To correct the FRB-RPM-ABC problem, do the following:
1. Copy file "rpm_stnd.tpw" to "rpm_frb.tpw"
2. Edit new file "rpm_frb.tpw" to change the extension name "rpm_STANDARD_RPT" -> "rpm_STANDARD_RPT_FRB" to avoid conflict with existing extension;
3. Insert a line below at the end of file RPM_ABC.TPL file
#INCLUDE('RPM_FRB.TPW')
4. Use the rpm_STANDARD_RPT_FRB extension template in the RunTimeReport procedure.
Is there a way to print mailing labels using a 2 or 3 across format?
To get "Label" style report you have to set the Detail width to less then the paper width (without margins) in twice .
YES. Do the following:
Place the following code in the EMBED "Before Open View"
IF SELF.Filter = ''
View{Prop:Filter} ='<your filter>'
ELSE
View{Prop:Filter} ='(<your filter>) AND ' &'('& CLIP(SELF.Filter) &')'
END
I have seen your demo however I would like to see how your system interfaces with Clarion.
Templates (both Legacy and ABC) are use to facilitate interaction with the Report Builder Class library . The RBC-library is the kernel of my product. Both Local and DLL variations of the library are available. You need only a few minutes to include the reporting capabilities into your application. Even if you are using these templates for the first time.
You can also download the freeware version of FRB CW2.0 to see how my system interfaces with Clarion. Of course, you must have CW2.0 installed on your computer to do this . This is an older version of FRB , but it can show you how the template work .
I recommend you to use CHOOSE(expression, value1, value2) function.
Are you using the align commands? Multiple Frames can be selected using Left mouse button while keeping Ctrl key pressed. After that, a PopUp menu with align commands is available via Mouse Right click.
It's already possible to embed any image into any frame. Just select the appropriate checkbox in the Frame properties window and specify the image file name. Image file name may be a constant file name or variable (with the preceding equal sign).
To do so with FRB you don't need to upgrade your app. If your end-user needs a new reports or wants to customize an existing report. Just run Report Formatter and play. All new reports will appear in the ReportManager list and will be available for printing or changing. Even if the report (RPT file) was received by e-mail, to make it "visible" to ReportManaget just place report file into the appropriate directory.
After the embed 'Before printing report detail' all the Details will be processed consecutively. You don't know what RPT file will be processed and how many DETAIL lines will be created when you put code into this embed point. So, the best way to associate any code with the appropriate Detail is to use a user function. You can evaluate this function by including the function name with parameters into "Band expression" or into any Frame contents in appropriate Detail band.
It would be nice to have 'Before printing page header'
It would be nice to have 'Before printing page footer'
Actually, these two bands are printed at the same time - when the page break
event occurs. Both page header and page footer can show page total variables.
No embed points are available for this event. You can execute your own code
only by a user defined function at this event. Just create calculated field
in the run-time dictionary and set "Evaluate On: Each Page".
Is your template just a template extension?
This is NOT just template EXTENSION. It is an additional template set. Both "Legacy" and "ABC" are supported. There are two PROCEDURE templates in this set - "RunTimeReport" and "ReportManager" plus some supplementary EXTENSION and CODE templates. Bear in mind, the core of Fomin Report Builder is the (R)eport (B)uilder (C)lass library (RBC-library). This library is shipping as DLL/LIB module and FRB templates are including this library into your application project automatically.
Can I define which fields to be printed on my group header band at run-time (from within my code)?
Yes it is possible. You are able to examine and change dynamically the entire report layout or some BANDs or FRAMEs. First, look at the structure of a RPT file. This is a multi table TPS file and you are able to import file definitions into the clarion dictionary. After ThisReport.LoadPage method has been executed, all this information is placed in the memory and is accessible through ThisReport class. Look at Clarion5\LibSrc\frbclass.* files to explain the CLASS definitions. I have to warn you! It's not an easy task to manipulate the report layout from your code, but it is possible if you want.
I recommend another way. Just create a lot of report definitions so your users have a lot of examples to work from. It is quite easy using the "Save As..." menu command. Open an existing report, make few changes and save using a new file name.
Does the fomin report writer work with the Creative report writing tools?
Fomin Report Builder is run-time reporting tool. So, it is quite different from CPCS. Only CPCS Report Preview procedure can be used with FRB. The Appropriate template extension is available in the RunTimeReport procedure. This extension is placed in the FRB_CPCS.TPW module.
Fomin Report Builder end-user interface can be translated to whatever language you want. This feature is accomplished by using the FRB_NLS.INI file. This is a text file containing all of the messages/captions/prompts/e.t.c. To turn ON this feature you have to select "Other" language choice during the installation process. In this case the FRB_NLS.INI file with initial English messages will be installed at the WINDOWS directory. You can change/translate contents of this file by any text editor.
FRB can not to create dynamically, a window to collect all the variables needed. I would like to add this feature in the future. Now this task can be accomplished by your own functions (dialogs) attached to the RunTimeReport procedure. See the demo at <frb_demo.exe>
How to use an existing key to sort records?
If you want to use an existing key, just set a number of group breaks exactly the same as the key definition. The view engine will use this key automatically/internally. It is similar to any SQL server engine when the ORDER BY clause is the same (or similar) to an existing INDEX. You'll get "Sorting data" message overridden by "Processing data" instantly.
This is NOT a problem for FRB as well as for the standard Report procedure. RunTimeReport procedure uses standard
CheckOpen PROCEDURE !Legacy
FilesManager CLASS !ABC
to manage files just like the standard procedures doing. So, all usual tricks with file NAME are allowed.
Can you write your own calcs and functions besides the ones included with your product?
YES. You can write your own functions to be used by the end-user besides standard Clarion functions in the run-time dictionary.
"Internal Error! Premature Page Overflow" Can you tell me what this mean?
Usually this error may occure when the current printer page size is less then what was specified in the Report properties - Page layout.
"Application frame has no HVSCROLL attribute". This is a warning
message to the developer of the application. It means you ara missing the
vertical and/or gorisontal scroll bars in the application MDI frame window.
Usually this procedure is called as "Main". Open the window properties
of this procedure and enable vertical and horizontal scroll bars.
It means you did not make any fields available for your end-user. Come back into the RunTimeReport procedure properties and highlight the fields you want to make availamble for your end-users in reports.
Is there anyway we could offer to the user to make a report using a Queue instead a File?
Yes, it is possible.
First of all, you have to look through generatad code and available embed
points of the RunTimeReport procedure.
1. The run-time dictionary contents have to contain all the fields of your
QUEUE. To do so you have to build contents of ThisReport.LevelString variable
on your own, or use the file schematic (VIEW structure) similar to your QUEUE.
2. You have to BIND each field of your QUEUE with names used in run-time dictionary.
It is also possible to do using the NAME attribute and BIND(MyQueue) statement.
3. OpenFRBView ("Before Open View" embed):
SORT(MyQueue,SELF.Order)
4. NextFRBView ("Before Subsequent Record Retrieving"):
! Start of "Before Subsequent Record Retrieving"
! [Priority 5000]
LOOP
QueuePointer += 1
IF QueuePointer > RECORDS(MyQueue)
SELF.FetchErrorcode = 33 !Record not available
RETURN
END
GET(MyQueue,QueuePointer)
IF SELF.Filter
IF EVALUATE(SELF.Filter) = '1'
RETURN
END
ELSE
RETURN
END
END ! End of "Before Subsequent Record Retrieving"
© Copyright 1997-2022, Oleg Fomin