Can I change the report viewer ?

Can I change the report viewer ?

Postby Milan Mehta » Mon Mar 12, 2007 3:39 pm

Dear All,

One of my client is an old one and he finds it difficult to make out the report in our Report preview dialog. He wants to view the report in slightly bigger size (bigger than 1 and smaller than 2) and with a cursor like line which show which is the current line. He tend to mix two lines when report is horizontally long.

In nut shell, is there any alternate viewer I can use only in this case.

TIA

Milanl
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby James Bott » Mon Mar 12, 2007 3:56 pm

Milan,

To provide a different magnification you can modify the RPREVIEW.PRG file.

To get a highlight is more difficult. One way would be to print the report to a file, create a temp dbf with a single wide field, then read the report file and post one line to each record of the browse. Finally browse the temp.dbf with a browser with the cell lines turned off.

I don't know what your report looks like but if it is simple list, I would just create a browse instead of generating a report. Let the user just browse the data they want to see. You might be able to just set an index and scope on an existing DBF or create a temp dbf if you must.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Can I change the report viewer ?

Postby Enrico Maria Giordano » Mon Mar 12, 2007 4:19 pm

Milan Mehta wrote:[...] and with a cursor like line which show which is the current line. He tend to mix two lines when report is horizontally long.


Can't you just activate lSeparator (or similar) to draw horizontal lines separating the report lines?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Otto » Mon Mar 12, 2007 6:18 pm

For a hair cross you should try:
rpreview.prg
oMeta1:bMMoved:={|y,x,flags| oMeta1:line (y,0,y,500) }
But there is some extra work to save/restore the screen.
Otto

rpreview.prg
oMeta1:bMMoved:={|y,x,flags| oMeta1:line (y,0,y,500) }


oMeta1 := TMetaFile():New( 0, 0, 0, 0,;
aFiles[1],;
oWnd,;
CLR_BLACK,;
CLR_WHITE,;
oDevice:nHorzRes(),;
oDevice:nVertRes() )

oMeta1:oCursor := oCursor
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Postby Otto » Tue Mar 13, 2007 9:53 am

Hello,

HairCross Cursor is working:

Insert

oMeta1:bMMoved:={|y,x,flags|hairCross(oMeta1,y,x) }

in FUNCTION RPreview( oDevice ) in rpreview.prg.

func hairCross(oMeta1,y,x)
nCount:=nCount+1
IF nCount > 5
nCount:=0
oMeta1:refresh()
sysrefresh()
oMeta1:line (0,x,1800,x)
oMeta1:line (y,0,y,1500)
ENDIF
return nil




But could someone please tell me how to save and restore a part of the canvas / screen.


oMeta1:bMMoved:={|y,x,flags| hairCross(y,x, oMeta1)}


Dim ScreenSave

func hairCross(x,y, oMeta1)

restore = ScreenSave

ScreenSave = save part of the screen where you draw the new line

oMeta1:line (y,0,y,500)

return nil

Otto
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Re: Can I change the report viewer ?

Postby Maurilio Viana » Tue Mar 13, 2007 1:16 pm

Milan,

An interesting feature we found in Crystal Report were you can navigate in the report page like a browse.
Many months ago I tryed to adapt it to RPreview but without success :-(
If anybody know how...
But I think Otto's idea very good.

Regards
Maurilio
User avatar
Maurilio Viana
 
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

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