Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 27 FEB 1998 05:20:45PM Don Pederson wrote:

I've been trying to develop some reports using Reporter and have run into several problems:

1) Fields that have output conversions don't get converted before being printed. for example: boolian conversions don't appear as "Yes" or "No" they are printed as 1 or 0. If I list the same table using Rlist, they appear correctly.

The same problem occurs with user defined conversions.

2) When printing the report, it seems that it gets confused and starts displaying the field data in the wrong places, resulting in a messed up report.

Does anyone have advice on how to remedy these problems?

On a slightly different note, but related to ouputing reports:

How can you change the font in the middle of a lin using the printer.dll functions. I've tried everything, but either get the text following the font change on the next line, or it overprints the existing line. For example, how would you out put something like this:

Information last updated: (where the text in is bold)


At 05 MAR 1998 08:35AM Cameron Revelation wrote:

Don,

1) Fields that have output conversions don't get converted before being printed. for example: boolian conversions don't appear as "Yes" or "No" they are printed as 1 or 0. If I list the same table using Rlist, they appear correctly. The same problem occurs with user defined conversions.

I am very ignorant of how to do things in the Reporter, so . The only way I could figure out how to do this was to go to "Tools, Calculated Fields" menu item and create a BASIC+ calculated field which formatted the data in the manner I wanted. I know that the formats specified in the dictionary are supported in the Reporter … but it is as non-obvious to me as it is to you how to get it to use them. I've forwarded the question to those who can answer it.

2) When printing the report, it seems that it gets confused and starts displaying the field data in the wrong places, resulting in a messed up report.

Your description is hard to work from ;-) Are there any more specifics? If it is a reproducible problem and you can send the report and the dict/data file (so we can reproduce it here) we can figure out what is happening and fix it if it is a problem.

How can you change the font in the middle of a lin using the printer.dll functions. I've tried everything, but either get the text following the font change on the next line, or it overprints the existing line.

I believe that I have heard of this before. Can you post a small snippet of code that shows the problem?

Also, in 3.5, we are including an evaluation copy of a popular OI printing utility called OIPI.

Cameron Purdy

[email protected]


At 05 MAR 1998 03:13PM Don Pederson wrote:

Cameron, Thanks for the input. At least I know now that my problems with Reporter aren't unique. I'll wait to hear from those who know :)

Regarding the problem with changing fonts in the middle of a line with the printer dll functions: I have 3.5 and considered OIPI or whatever it's called, but seem to remember that it costs around $250 if you decide to use it after evaluation, so decided not to bother with it.

Here is a piece of code I was testing with, but without success:

function PRINT_TEST(hwnd)

* Declare functions to be used

declare function Print_Init, PrintSetMargins, Print_SetFont, Print_SetHeader, Print_Text, PrintLineFeed, PrintNewPage, Print_End

declare function Get_Property, Utility, CHANGE_FONT

* VARIABLES

TOPMARG =1

LEFTMARG=1

BOTMARG=1

RIGHTMARG=1

FW_BOLD=700

FW_NORMAL=400

TEXTLEN=80

JOBTITLE=PRINT TEST'

@mv="

status=print_init(0,JOBTITLE,hwnd)

* Enable end user to select font at runtime from the font menu *

FontStruct=utility("CHOOSEFONT", @Window)

status=Print_SetFont(FontStruct)

* Set the margins *

status=PrintSetMargins(TOPMARG, LEFTMARG, BOTMARG, RIGHTMARG)

* Set the print header *

header=TEST PRINT':space(40):'Page \PAGE'

status=Print_SetHeader(header)

* Print the report info. *

*STATUS=PrintLineFeed(0)

status=Print_Text('LINE #1: ')

GOSUB BOLD

GOSUB UNLINE

STATUS=PrintLineFeed(0)

status=Print_Text('Answer #1')

gosub NORMAL

GOSUB NOUNLINE

STATUS=PrintLineFeed(1)

status=Print_Text('Next Line #2: ')

GOSUB BOLD

GOSUB UNLINE

status=Print_Text('Next answer #2')

GOSUB NOUNLINE

GOSUB NORMAL

*Insert page break *

status=PrintNewPage()

status=Print_End()

return status

* End of main program

* Added subroutines

* subroutine to switch to bold

BOLD:

status=PrintLineFeed(0)

FontStruct=FW_BOLD

status=Print_SetFont(FontStruct)

RETURN

* subroutine to switch to normal

NORMAL:

status=PrintLineFeed(0)

FontStruct=FW_NORMAL

status=Print_SetFont(FontStruct)

RETURN

* SUBROUTINE TO SWITCH TO UNDERLINE

UNLINE:

status=PrintLineFeed(0)

FontStruct=1

status=Print_SetFont(FontStruct)

return

* SUBROUTINE TO SWITCH TO NO UNDERLINE

NOUNLINE:

FontStruct=0

status=Print_SetFont(FontStruct)

return

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/e02954bde6ff2ac4852565b8007ac00d.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1