|
charts dont display in client pc |
Posted by Jose Alvarez on Apr-13-2011 23:55 |
|
Hi!,
I'm testing Chartdirector in VB6 SP6, W7 home premium with 4Gb RAM and 500Gb HD; as development platform, when I run the project or the .exe in this PC, the charts display well, but if I generate a setup installer for another PC and install it, the program creates the .jpg images for each chart but dont display inside the program. I've change the location of .OCX and .DLLs trying to fix the problem with no success. Also tried to create a virtual application with the same results; can you enlightme please with info that helps me to avoid this error. I'll thank you in advance and I'll be looking forward to hearing from you.
Best regards
Jos |
Re: charts dont display in client pc |
Posted by Peter Kwan on Apr-14-2011 02:57 |
|
Hi Jose,
To diagnose the problem, is it possible to use the "vbHelloWorld" sample code that comes with "ChartDirector for ASP/COM/VB". It is in the directory "\\Program Files\\ChartDirector\\vbHelloWorld".
Please make a EXE with the above sample program, and create an installer using that EXE instead of your real EXE. Try to install this in another PC, and test if it still works. This can be used to determine if the installer is including the correct files and install them in the proper directories and regsiter them correctly. If it does not work in another PC, please email the installer to me for verification. My email is pkwan@advsofteng.net. Please also post in this forum after the email to notify me of the email (just in case I do not receive the email because executable files are often filtered out).
In brief, the installer should install "comchartdir.dll", "aspapi.dll" and "chartdir50.dll" in the same directory, and "ChartViewer.ocx" in [system32]. It should then register "comchartdir.dll", "aspapi.dll" and "ChartViewer.ocx" with the system.
Regards
Peter Kwan |
Re: charts dont display in client pc |
Posted by Jose Alvarez on Apr-14-2011 06:55 |
|
Thanks for you promptly response.
As you pointed, I made the example and ran in my friend's PC and the charts displayed well but if you run the project before mentionated, in the same PC, only the files with the charts are created but the component chartviewer don't display inside the application those charts previously created to be inserted in a grid. I forgot to mention that I ran the program depends.exe in order to know if some component fails to load, and the results show that these OCX and DLL's for some extraneous razon don't run.
This is very frustrating for me, I had a deadline and I fail to acomplish it, so please tell me why this happen. I'm attaching the rar file with project yo asked me to make, I hope this could help me. I've tried to move these components following the help manual with no success for the client pc.
I'll appreciate your help.
best regards and excuse my english. |
Re: charts dont display in client pc |
Posted by Peter Kwan on Apr-15-2011 01:07 |
|
Hi Jose,
From your message, I assume you mean that the vbHelloWorld example is installed successfully on your friend's PC and it runs normally. However, your own application is installed in your friend's PC but cannot display the chart.
In this case, I suspect the problem is not related to installation. There are many reason why the chart is not displayed. For example, may be your code does not put the chart in the ChartViewer for some reasons. You would need to trace your code in your friend's PC (or your client's PC) to confirm that your code in fact generates the chart and then put the chart in the ChartViewer.
To further confirmation that it is not a ChartDirector installation problem, please install your own software. It should not work according to you. Then copy the vbHelloWorld.exe to the same directory as your EXE and execute vbHelloWorld.exe. The vbHelloWorld.exe is now using the ChartDirector as installed by the installer of your own software. If vbHelloWorld.exe works, it means your installer has installed ChartDirector correctly. So the issue of your EXE should not be related to ChartDirector installation.
The "depends.exe" only checks DLLs that are linked in by the linker (usually for C or C++ programs). It is not useful for COM components or OCX which are not linked by the linker.
Normally, if your code uses the ChartViewer, but VB6 cannot find the ChartViewer, it would generate an error immediately and the program should end. You should not be able to run the program at all. Since there is no error, it is possible that VB6 can in fact find the ChartViewer.
To diagnose the problem, please try the followings:
(a) If you are using "On Error Goto XXX" or "On Error Resume Next" in your code, please comment out all these statements, otherwise you would not be able to see the real error.
(b) I am not sure how you display the chart. Usually it is something like:
Set ChartViewer1.Picture = c.makePicture()
If you are using the above code, please change it to:
MsgBox "Start Display Chart"
Dim data()
data = Array(85, 156, 179.5, 211, 123)
Dim labels()
labels = Array("Mon", "Tue", "Wed", "Thu", "Fri")
Dim test As Object
Set test = cd.XYChart(250, 250)
Call test.setPlotArea(30, 20, 200, 200)
Call test.addBarLayer(data)
Call test.xAxis().setLabels(labels)
Set ChartViewer1.Picture = test.makePicture()
MsgBox "End Display Chart"
With the above modification, the chart that is displayed should be a simple bar chart. Also, you should see the pop up message box "Start Display Chart" and "End Display Chart". If you do not see the pop up message box, it means your code is not being run at all.
(c) Since you have an EXE that works (the vbHelloWorld.exe) and an EXE that does not work (your own EXE), please try to modify the vbHelloWorld.exe by including your own code in it, until it does not work any more. This can help to identify which part of your code is causing it not to work.
Hope this can help.
Regards
Peter Kwan |
Re: charts dont display in client pc |
Posted by Jose Alvarez on Apr-15-2011 02:45 |
|
Peter.
Thank you very much for your promptly support, finnaly I discovered like you said that I have to include a dll in the package and now it works!, I appreciate your help and publicly congratulate you for the quality and speed you attend the users problems. Very good company and thank you very much again!. Sincerely!.
Jose Alvarez |
|