2 issues oBrw:report() and MsgInfo() etc

2 issues oBrw:report() and MsgInfo() etc

Postby hag » Thu Aug 28, 2008 6:55 pm

oBrw:report()

1. Trying to print a browse using oBrw:report() get an error message:
2. msgAlert(), msgInfo() etc not centered. How can I get them centered.

Thanks in advance.


Code: Select all  Expand view  RUN
Error description: Error BASE/1111  Argument error: LEN
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => LEN(0)
   Called from:  => TRCOLUMN:STABILIZE(0)
   Called from:  => (b)STABILIZE(0)
   Called from:  => AEVAL(0)
   Called from:  => TREPORT:STABILIZE(0)
   Called from:  => TREPORT:ACTIVATE(0)
   Called from:  => TXBROWSE:REPORT(4282)
   Called from: .\JBROWSE.PRG => TOEXITPRINT(6112)
   Called from: .\JBROWSE.PRG => (b)PLBROW(1342)
   Called from:  => TBUTTON:CLICK(0)
   Called from:  => TBUTTON:HANDLEEVENT(0)
   Called from: .\source\classes\WINDOW.PRG => _FWH(0)
   Called from:  => SENDMESSAGE(0)
   Called from:  => TDIALOG:COMMAND(0)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from:  => TDIALOG:HANDLEEVENT(0)
   Called from:  => DIALOGBOX(0)
   Called from:  => TDIALOG:ACTIVATE(0)
   Called from: .\JBROWSE.PRG => PLBROW(1567)
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby nageswaragunupudi » Sat Aug 30, 2008 2:00 pm

1. The browse should be active while report is being run.
2. bStrData, if not nil, should evaluate to a valid character expression. If bStrData is nil bEditValue should evaluate to a non-nil expression. ( Such problem should not arise if we do not directly code bStrData and use xbrowse command syntax only.)
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby hag » Sat Aug 30, 2008 5:29 pm

NageswaraRao:

Since i'm new to xbrowse. How would you convert this code:

Code: Select all  Expand view  RUN
ADD COLUMN to xBrowse oBrw ;
   DATA {|| if(gl->title == repli('-', 30), repli(' ' , 30), ;
   if(gl->title == repli('=', 30), repli(' ', 30), ;
   if(gl->account == "2053" .or. gl->account == "2514".or. gl->account == "2632", repli(' ', 30), ;
   if(gl->account == "2733", repli(' ', 30), ;
   if(gl->account == "2833" .or. gl->account == "2933", repli(' ', 30), ;
   if(gl->account == "2998" .or. gl->account == "3355", repli(' ', 30), ;
   if(gl->account == "3485" , repli(' ', 30), ;
   trans(eval(bty13), '999,999,999') ))))))) };
   SIZE 71  RIGHT  HEADER cOne  COLOR CLR_BLACK,CLR_WHITE       
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby nageswaragunupudi » Sun Aug 31, 2008 4:36 am

This code is equivalent to your code
Code: Select all  Expand view  RUN
ADD TO oBrw DATA ;
   If( gl->title = '-' .or. gl->title = '=' .or. ;
       gl->account $ '2053,2514,2632,2733,2833,2933,2998,3355,3485', ;
       0, Eval( bty13 ) ) ;
   PICTURE '@Z 999,999,999' ;
   SIZE 71 ;
   HEADER cone ;
   RIGHT ;       // not necessary. XBrowse automatically right justifies numerics
   COLOR CLR_BLACK,CLR_WHITE  // required only if different from browse colors
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby hag » Sun Aug 31, 2008 8:39 pm

Thank you for the code. it certainly is more efficient then what I've been using.
My original problem has not been solved. I get the following error message when I attempt to print using oBrw:report(). Antonios suggestion.

Code: Select all  Expand view  RUN
Error description: Error BASE/1111  Argument error: LEN
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => LEN(0)
   Called from:  => TRCOLUMN:STABILIZE(0)
   Called from:  => (b)STABILIZE(0)
   Called from:  => AEVAL(0)
   Called from:  => TREPORT:STABILIZE(0)
   Called from:  => TREPORT:ACTIVATE(0)
   Called from:  => TXBROWSE:REPORT(4282)
   Called from: .\JBROWSE.PRG => TOEXITPRINT(6112)
   Called from: .\JBROWSE.PRG => (b)PLBROW(1342)
   Called from:  => TBUTTON:CLICK(0)
   Called from:  => TBUTTON:HANDLEEVENT(0)
   Called from: .\source\classes\WINDOW.PRG => _FWH(0)
   Called from:  => SENDMESSAGE(0)
   Called from:  => TDIALOG:COMMAND(0)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from:  => TDIALOG:HANDLEEVENT(0)
   Called from:  => DIALOGBOX(0)
   Called from:  => TDIALOG:ACTIVATE(0)
   Called from: .\JBROWSE.PRG => PLBROW(1567)


In your post you said:
1. The browse should be active while report is being run.
2. bStrData, if not nil, should evaluate to a valid character expression. If bStrData is nil bEditValue should evaluate to a non-nil expression. ( Such problem should not arise if we do not directly code bStrData and use xbrowse command syntax only.)


Frankly I'm lost. All code has been change and still get error message.
Also could yo explain what you mean

1. The browse should be active while report is being run.



I the oBrw is active. Not closed until after the print which doesn't occur because of the error message.

Thanks for you help. It is greatly appreciated.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby nageswaragunupudi » Sun Aug 31, 2008 8:44 pm

Some columns of browse must be creating problems. Hope you know that you can hide any column at runtime by right clicking on header.

First hide all columns except the first column and run the report. If it works, unhide second column and run report. Like that unhide each column and run the report. You know which column definition is creating the problem. We shall then examine how that column is coded
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby hag » Sun Aug 31, 2008 8:51 pm

Removed all but one. Same error message. All columns coded using the code you sent.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby nageswaragunupudi » Mon Sep 01, 2008 4:27 am

Mr Hag

>
My original problem has not been solved. I get the following error message when I attempt to print using oBrw:report(). Antonios suggestion.
>

We get this error if cHeader of any column is NIL. Please assign some character value to all headers and then try again.

Mr Antonio is requested provide a suitable fix to avoid runtime error when any header is nil
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby hag » Mon Sep 01, 2008 2:32 pm

NageswaraRao:

Yes that was the problem. Had a cHeader nil.

Presently I'm checkin on how to control font size and number of pages to print. I'm printing in landscape with a 15 column browse which gives me a page to print to wide for page error.
And it seems to print 6 extra pages which are not needed. Haven't been able to find info yet.

TYHanks for the help. Its a real help.

Harvey
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby Antonio Linares » Mon Sep 01, 2008 5:51 pm

Rao,

Fixed, thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby hag » Mon Sep 01, 2008 11:45 pm

Using oBrw:report() which prints fine. But I can't find out how to set a font size and limit number of pages to print.

I'm printing in landscape with a 15 column browse which gives me a page "print to wide for page" error.

And it seems to print 6 extra pages which are not needed. Haven't been able to find info yet.

Need some help.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby RAMESHBABU » Tue Sep 02, 2008 3:35 pm

Mr.Antonio,

Can you please post here the fix, so that I can update my fwh 8.08 ?

Thanks,

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 48 guests