Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 01 APR 2006 01:24:51AM Bill Guis wrote:

I want to print a simple report from a pushbutton. This is the CLICK event code entered in the Event Editor:

DECLARE FUNCTION OR_VIEW

CMD=LIST IMPORT_DATA BY OFC BY PTY BY CAND BY RPT_DATE "

CMD := "QKEY JUSTLEN 'R3' DONE JUSTLEN 'L1' OFC JUSTLEN 'L8' PTY JUSTLEN 'L4' CAND JUSTLEN 'L18' RPT_DATE JUSTLEN 'R10'"

CMD := "RPT JUSTLEN 'L13' PROC_FILE JUSTLEN 'L28' IMPT_DATE JUSTLEN 'R10' RECS_WRITTEN JUSTLEN 'R10'"

CMD := "TOTAL TOTAL_AMT ID-SUPP"

CALL MSG('ABOUT TO CALL REPORT')

* X=OR_VIEW('IMPORT_DATA_REPORT','')

X=OR_VIEW("",CMD)

CALL MSG('OR_VIEW RETURNS: ':X)

RETURN 0

This presents a report on screen that is OK except for the horrible courier font, but when printed, the headings and columns don't line up, it is an unuseable mess. (The justlens are useless and were added to try to get it to work. They didn't cause the problem.) The commented-out attempt to use OR_VIEW using the name of a report (same in substance) created with Report Builder instead of the text of the Rlist command does nothing at all. No error message, nothing. In both cases, the two msg calls appear, so the code is executing, and the variable x returns as null.

When the report is printed from Report Builder, it comes out just fine. Ditto if the Rlist command is pasted into a TCL command line.

I think I'm missing something pretty basic here, but any help would be appreciated. There ought to be an easy way to do this.

Bill


At 01 APR 2006 01:46AM dbakke@srpcs.com's Don Bakke wrote:

Bill,

Try using the Run_Report subroutine to print your Report Builder reports or your ad-hoc LIST statements. This will give you the results you want.

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 03 APR 2006 01:11AM Bill Guis wrote:

Don,

Thanks, you are entirely right.

Bill

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/1a5088e158b16cdf85257143001dbdca.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1