Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to create 3d bar chart
Message
From
11/05/2006 18:55:41
 
 
To
11/05/2006 18:49:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01118887
Message ID:
01121184
Views:
62
Cetin,

Thanks. As you see from my message header, I am using vfp8, sp1. So you are saying that it is something in the way owc generates the gif? I.e, that the problem is with the format of the gif file, not that the scale picture function doesn't work in vfp frx?
If so then I definitely have to give up on OWC, unless there is a workaround.



>Now that I read the thread your problem is different:) Good to know at least gifs doesn't crash. I don't the answer to that. With MSChart it's me giving the size as I see fit.
>Cetin
>
>>Cetin,
>>
>>Thanks! Knowing this I will now give it a whirl.
>>
>>PS - I am also having a problem with trying to print the gifs generated by the west-wind stuff - using oleboundcontrol/picture.
>>(See my Thread #1118997)
>>Not sure if I would have the same problem with a bmp as with a gif. In any event the scale picture function doesn't seem to be working right in the frx.
>>
>>
>>
>>>Yes at first look printing is a problem. Using dibapi32.dll (available for download from MS with source) it is easy. I save graphs as bmp, show on report using oleboundcontrol/picture with expression (filename), report and erase them. Multiple charting, saving to bmp is faster than creating a single chart with others that I tested. Report shows up instantly as if it doesn't contain any charts. ie: (parts of operation):
>>>
>>>
>>>Local oCharter
>>>oCharter=Createobject('charter')
>>>Select myReportCursor
>>>scan
>>>*oCharter.DrawChartFromCursor(..labelColumn,datacolumn params....)
>>>	oCharter.Copy2Clipboard()
>>>	lcGraphFile = Forcepath(Sys(2015)+".bmp", Sys(2023))
>>>	if ClipBoard2BMP(m.lcGraphFile)
>>>	  replace GraphFile with m.lcGraphFile
>>>        endif
>>>EndScan
>>>
>>>Procedure ClipBoard2BMP
>>>Lparameters tcFileName
>>>Local llResult,lcFileName
>>>*
>>>* Predefined Clipboard Formats
>>>*
>>>#Define CF_DIB              8
>>>
>>>Declare short IsClipboardFormatAvailable In win32api Integer cbformat
>>>Declare Integer GetClipboardData In win32api Integer uFormat
>>>Declare Integer OpenClipboard In win32Api Integer hWndNewOwner
>>>Declare Integer CloseClipboard In win32Api
>>>Declare Integer SaveDIB In DibAPI32.Dll Integer hBitmap, String @ cFileName
>>>Declare Integer GetSystemPalette In DibAPI32.Dll
>>>Declare Integer GetActiveWindow In win32Api
>>>
>>>lcFileName = Fullpath(Iif(Empty(m.tcFileName),;
>>>	PUTFILE("Save as Bitmap", 'FromClipBoard', "BMP"), ;
>>>	m.tcFileName))
>>>If !Empty(m.lcFileName) and ( IsClipboardFormatAvailable(CF_DIB) # 0 )
>>>	IF ( OpenClipboard(GetActiveWindow()) != 0 )
>>>		llResult = ( SaveDIB(GetClipboardData( CF_DIB ), @lcFileName) = 0)
>>>		CloseClipboard()
>>>	endif
>>>Endif
>>>Return m.llResult
>>>
>>>*Charter::Copy2Clipboard()
>>> Procedure Copy2Clipboard
>>>	With This.Chart
>>>		*!* Select Chart Part 1
>>>		.SelectPart(1,1,1,1,1) && VtChPartTypePlot, index1, index2, index3, index4)
>>>		*!*	Copy the chart to the clipboard in Windows Metafile format.
>>>		.EditCopy
>>>	Endwith
>>> Endproc
>>>
Cetin
>>>
>>>>Cetin,
>>>>
>>>>Hi. Yes, I was hoping for your opinion again. One of the things that came up was printing. I saw some posts indicating that printing was problematic with MSChart, then again, saw others indicating a resolution of that. Printing is a key factor.
>>>>
>>>>>David,
>>>>>Why are you CCing? Asking my opinion? If so I repeat MSChart.
>>>>>Cetin
>>>>>
>>>>>>Marcia,
>>>>>>
>>>>>>Thanks!
>>>>>>
>>>>>>I guess I'll end up trying all of these methods at some point.
>>>>>>
>>>>>>For starters though I've downloaded the west wind stuff and am testing it now. I've got my own sample data working. The class seems pretty straightforward to use.
>>>>>>
>>>>>>
>>>>>>>Since I know the VFP report writer reasonably well this method seems appealing. It seems like less of a learning curve than MSChart or MSGraph.
>>>>>>>
>>>>>>>Piece of cake to use MsGraph or Excel Automation to print in a report. You just use an oleBound Control in the report, just like the code sample. I do not know if there are still issues with images refreshing in reports - I know there used to be.
>>>>>>>
>>>>>>>One consideration, though, is that although they haven't asked for it yet, I'm anticipating that down the road the users might want 'their original spreadsheet back'. Meaning that they might want to play with the output on their own. If that's the case, then I'm thinking that in the long run I have to use OLE Automation anyway?
>>>>>>>
>>>>>>>Seems sensible to me.
>>>>>>>
>>>>>>>Your article was written in 2002. Are the options fundamentally the same now? Or are there other issues or new implementations to consider?
>>>>>>>
>>>>>>>Not that I know of....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform