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
Can I change the report viewer ?
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
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
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
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Can I change the report viewer ?
Can't you just activate lSeparator (or similar) to draw horizontal lines separating the report lines?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.
EMG
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
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
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
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
- Maurilio Viana
- Posts: 252
- Joined: Tue Oct 25, 2005 2:48 pm
- Location: Garça/Garza/Heron City - Brazil
- Contact:
Re: Can I change the report viewer ?
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
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