Try diffferent printer drivers or possibly add spaces to the end of a label
value.
--
Duane Hookom
Microsoft Access MVP
:
I tried to make chart larger and smaller, none seemed to help. My puzzle is
on some pages, full texts show up all right, while on some others, they
showed up with the last digit cut off. When I tried smaller font, on the
pages that has the texts' last digit cut off, all texts show up in 2E+05
format, while other pages that had no problem before, texts still show up all
right.
I have tried to change Times New Roman to Arial, it doesn't help either.
Do you have more ideas, please? Thanks.
--
Lydia Liu
Access/VB Programmer
:
I would try some resizing of the chart control as well as maybe changing the
font name and size.
--
Duane Hookom
Microsoft Access MVP
:
Duane,
I am sorry to cut in like this. but I have a display problem with my chart
and I want to post the question to you. Hopefully you won't mind.
It sounds like a simple problem: for the X axis, I have data in the format
of "200710". And I set text alignement to 90 degree. However on some pages,
the full text shows up all right, while on some other pages, the last digit
is cut of for the whole chart. I have no clude why it happens.
Could you please let me know if you have any idea?
Thanks.
Lydia Liu
Access/VB Programmer
:
I don't understand why you would open the queries unless they are action
queries. Also, I would not use these lines in this section of code:
txtEnd = Null
txtStart = Null
--
Duane Hookom
Microsoft Access MVP
:
I do not have code for closing the form. I do have code to close the two
queries after they are ran. Below is the code for the button I created to
exicute the comand. I probably have it incorrect since I am triggering two
different queries and once.
Private Sub CommandWeight_Click()
On Error GoTo Err_CommandWeight_Click
Dim stDocName As String
Dim strDocName As String
Dim strReport As String 'Name of report to open.
Dim strWhere As String 'Where condition for OpenReport.
stDocName = "weight"
strDocName = "weight2"
strReport = "rptWeight"
DoCmd.OpenQuery stDocName, acViewNormal, acAdd
DoCmd.OpenQuery strDocName, acViewNormal, acAdd
' Debug.Print strWhere 'For debugging purposes only.
DoCmd.OpenReport strReport, acViewPreview, , strWhere
DoCmd.Close acQuery, stDocName, acSaveNo
DoCmd.Close acQuery, strDocName, acSaveNo
txtEnd = Null
txtStart = Null
txtStart.SetFocus
Exit_CommandWeight_Click:
Exit Sub
:
It sounds like you are getting your criteria from controls on a form (the
correct method). I wonder if you might have code in the main report that
closes the form. If so, remove or change the code.
--
Duane Hookom
Microsoft Access MVP
:
No, I believe I am missing the Link Master / Child property. I tried using
the build button and I get an error - "cant build a link between unbound
forms". This is what is listed in the row source for the first chart -
graphControl:
SELECT [CBweight],Count(*) AS [Count] FROM [weight2] GROUP BY [CBweight];
Both of the other charts are set up like this and both are missing the
Master/Child properites.
Here is a summary of what is happenining though. If I enter the date range
in the form I set up and run the report, it shows the charts but does not
save or print the chart's information. If I toggle from design view to print
preview in my report it prompts for the "start date" and "end date" about
six times (unbound text boxes from the form). Then, if I try to print,
again, prompts for the date range multiple times and prints the charts like I
want.
I appreciate your time.
:
Are you certain your Row Source and Link Master Child are set up properly?
--
Duane Hookom
Microsoft Access MVP
:
I tried your code and could not get the charts to fill in when I print or
save. I don't know if it matters but the chart's border and label show up,
just not that actual graph. This is my code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
On Error Resume Next
Dim objGraph As Object
Set objGraph = Me!GraphControl.Object
objGraph.Refresh
DoEvents
Set objGraph = Me!GraphEvap.Object
objGraph.Refresh
DoEvents
Set objGraph = Me!GraphHardware.Object
objGraph.Refresh
DoEvents
Set objGraph = Nothing
End Sub
I really appreciate you sharing your knowledge with the rest of us.
:
You could use something like:
On Error Resume Next
Dim objGraph As Object
Set objGraph = Me!TheNameOfYourGraph.Object
objGraph.Refresh
DoEvents
Set objGraph = Me!TheNameOf2ndGraph.Object
objGraph.Refresh
DoEvents
Set objGraph = Me!TheNameOf3rdGraph.Object
objGraph.Refresh
DoEvents
Set objGraph = Nothing
--
Duane Hookom
Microsoft Access MVP
:
Hello, I believe you have provided a solution to my chart problem with the
code listed below, (Problem - the plotted data does not show in the chart
when printed, converted to pdf.file, or using snapshot)
I want to verify how to write the code when I have 3 different charts. Do I
create a new title for each object? ex: Dim objGraph. . . then a new Dim
objGraph1 . . . then another Dim objGraph2. . . and so on?
in the code you porvided below:
On Error Resume Next
Dim objGraph As Object
Set objGraph = Me!TheNameOfYourGraph.Object
objGraph.Refresh
DoEvents
Set objGraph = Nothing
I know enough to confuse myself and not enough to get it right. So, I
really appreciate any help.
:
I wouldn't consider a chart a typical report. Charts use an ActiveX control
that makes it special amoung it report brothers and sisters.
I have often seen chart data not displaying properly. ACG Soft has some tips
regarding requerying a chart control in reports at
http://www.groupacg.com/.
From their site:
1) Problem: When the report is previewed or printed, Graph doesn't display
the proper data from its record source, instead it displays either the data
from a prior record or the sample data in the Graph data sheet:
Solution:
Add the following Visual Basic code to the On Print event of the section of
the report that contains the Graph object.
On Error Resume Next
Dim objGraph As Object
Set objGraph = Me!TheNameOfYourGraph.Object
objGraph.Refresh
DoEvents
Set objGraph = Nothing
--
Duane Hookom
Microsoft Access MVP
:
The report is pretty basic, just a chart. Although, I've had this problem
before if I've copied a query, pasted and renamed, modified it then attached
it to a report that also had gone through the same process. Since then, I
tend to try and build each query from scratch. However, this query had a lot
of things in it so I thought I'd try and save some time.
Jesse
:
I've never experienced this. Is there anything you can tell us about your
report or is it typical.
--
Duane Hookom
Microsoft Access MVP
:
I've got a report that won't display the data correctly until I open and
close it 3 or 4 times. The query that feeds this report is pulling the
correct information, but there seems to be some sort of delay. Any ideas?
Thanks!