grafs and filters

T

Ticotion

Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 
D

Duane Hookom

A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.
 
T

Ticotion

Hi Duane

I tried your suggestion but I do not get the result I want. For instand if I
choose department 1 from week 1 until 5 (using the code shown below) I get 5
graphs, one from each week. What I want is a graph that only show week 1 to 5
(on the x-axis)for the department picked.

I guess this is fairly easy but just can't get it to work.

Hope you can help me

Thanks
Ticotion


Duane Hookom said:
A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.

--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 
T

Ticotion

Hi again

Sorry I think my probem basicly is that in the master child property of the
report I can only set one link. Is it not posible to set several links, like
[department], [Year], [Week no.]?

thanks for your help

Ticotion

Ticotion said:
Hi Duane

I tried your suggestion but I do not get the result I want. For instand if I
choose department 1 from week 1 until 5 (using the code shown below) I get 5
graphs, one from each week. What I want is a graph that only show week 1 to 5
(on the x-axis)for the department picked.

I guess this is fairly easy but just can't get it to work.

Hope you can help me

Thanks
Ticotion


Duane Hookom said:
A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.

--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 
T

Ticotion

Hi Again

I think i'm a bit to fast here. I figured out the problem below, but now I
get a 5 charts that contains one week each. How do I get access to group all
weeks som I only get one graph?
Could it be the select statement I use?

SELECT qry_generelOEE.week, qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE GROUP BY qry_generelOEE.week, qry_generelOEE.OEE,
qry_generelOEE.[target OEE];

Any help would be greatly appreciated

Ticotion

Ticotion said:
Hi again

Sorry I think my probem basicly is that in the master child property of the
report I can only set one link. Is it not posible to set several links, like
[department], [Year], [Week no.]?

thanks for your help

Ticotion

Ticotion said:
Hi Duane

I tried your suggestion but I do not get the result I want. For instand if I
choose department 1 from week 1 until 5 (using the code shown below) I get 5
graphs, one from each week. What I want is a graph that only show week 1 to 5
(on the x-axis)for the department picked.

I guess this is fairly easy but just can't get it to work.

Hope you can help me

Thanks
Ticotion


Duane Hookom said:
A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.

--
Duane Hookom
Microsoft Access MVP


:

Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 
D

Duane Hookom

When I read that someone is getting 5 graphs when they want only one with 5
lines or points, it usually suggests there is too much detail in the report's
record source.

--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi Again

I think i'm a bit to fast here. I figured out the problem below, but now I
get a 5 charts that contains one week each. How do I get access to group all
weeks som I only get one graph?
Could it be the select statement I use?

SELECT qry_generelOEE.week, qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE GROUP BY qry_generelOEE.week, qry_generelOEE.OEE,
qry_generelOEE.[target OEE];

Any help would be greatly appreciated

Ticotion

Ticotion said:
Hi again

Sorry I think my probem basicly is that in the master child property of the
report I can only set one link. Is it not posible to set several links, like
[department], [Year], [Week no.]?

thanks for your help

Ticotion

Ticotion said:
Hi Duane

I tried your suggestion but I do not get the result I want. For instand if I
choose department 1 from week 1 until 5 (using the code shown below) I get 5
graphs, one from each week. What I want is a graph that only show week 1 to 5
(on the x-axis)for the department picked.

I guess this is fairly easy but just can't get it to work.

Hope you can help me

Thanks
Ticotion


:

A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.

--
Duane Hookom
Microsoft Access MVP


:

Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 
T

Ticotion

Hi Duane

I can see your point but as I see it I only have the detail that i need. I
use the following sql as the report's record source.

SELECT qry_generelOEEdpt, qry_generelOEEyearnb, qry_generelOEE.weeknb,
qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE

I then use the following for graph record source

SELECT qry_generelOEE.weeknb, qry_generelOEE.OEE, qry_generelOEE.[target OEE]

I then connects the two by linking master and child on [Dpt];[Yearnb];[weeknb]

I've placed the graph in the detail section and have year and department in
the section above.

I think this should work but it doesn't. I still get one graph for each week
with the result for that week. If I remove the [weeknb] from the link I get
the correct graph, but it contains all weeks (not only the interval the user
have selected) and I still have the graph x amount times, depenting on
interval the user have selected.

Please help, as I'm starting to get grey hair over this problem:)

Ticotion
Can you see what i'm doing wrong?



Duane Hookom said:
When I read that someone is getting 5 graphs when they want only one with 5
lines or points, it usually suggests there is too much detail in the report's
record source.

--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi Again

I think i'm a bit to fast here. I figured out the problem below, but now I
get a 5 charts that contains one week each. How do I get access to group all
weeks som I only get one graph?
Could it be the select statement I use?

SELECT qry_generelOEE.week, qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE GROUP BY qry_generelOEE.week, qry_generelOEE.OEE,
qry_generelOEE.[target OEE];

Any help would be greatly appreciated

Ticotion

Ticotion said:
Hi again

Sorry I think my probem basicly is that in the master child property of the
report I can only set one link. Is it not posible to set several links, like
[department], [Year], [Week no.]?

thanks for your help

Ticotion

:

Hi Duane

I tried your suggestion but I do not get the result I want. For instand if I
choose department 1 from week 1 until 5 (using the code shown below) I get 5
graphs, one from each week. What I want is a graph that only show week 1 to 5
(on the x-axis)for the department picked.

I guess this is fairly easy but just can't get it to work.

Hope you can help me

Thanks
Ticotion


:

A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.

--
Duane Hookom
Microsoft Access MVP


:

Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 
D

Duane Hookom

Remove the weeks from the report's record source. If you get too many weeks
in the chart then set a criteria in your chart's Row Source to limit the
results.
--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi Duane

I can see your point but as I see it I only have the detail that i need. I
use the following sql as the report's record source.

SELECT qry_generelOEEdpt, qry_generelOEEyearnb, qry_generelOEE.weeknb,
qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE

I then use the following for graph record source

SELECT qry_generelOEE.weeknb, qry_generelOEE.OEE, qry_generelOEE.[target OEE]

I then connects the two by linking master and child on [Dpt];[Yearnb];[weeknb]

I've placed the graph in the detail section and have year and department in
the section above.

I think this should work but it doesn't. I still get one graph for each week
with the result for that week. If I remove the [weeknb] from the link I get
the correct graph, but it contains all weeks (not only the interval the user
have selected) and I still have the graph x amount times, depenting on
interval the user have selected.

Please help, as I'm starting to get grey hair over this problem:)

Ticotion
Can you see what i'm doing wrong?



Duane Hookom said:
When I read that someone is getting 5 graphs when they want only one with 5
lines or points, it usually suggests there is too much detail in the report's
record source.

--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi Again

I think i'm a bit to fast here. I figured out the problem below, but now I
get a 5 charts that contains one week each. How do I get access to group all
weeks som I only get one graph?
Could it be the select statement I use?

SELECT qry_generelOEE.week, qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE GROUP BY qry_generelOEE.week, qry_generelOEE.OEE,
qry_generelOEE.[target OEE];

Any help would be greatly appreciated

Ticotion

:

Hi again

Sorry I think my probem basicly is that in the master child property of the
report I can only set one link. Is it not posible to set several links, like
[department], [Year], [Week no.]?

thanks for your help

Ticotion

:

Hi Duane

I tried your suggestion but I do not get the result I want. For instand if I
choose department 1 from week 1 until 5 (using the code shown below) I get 5
graphs, one from each week. What I want is a graph that only show week 1 to 5
(on the x-axis)for the department picked.

I guess this is fairly easy but just can't get it to work.

Hope you can help me

Thanks
Ticotion


:

A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.

--
Duane Hookom
Microsoft Access MVP


:

Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 
T

Ticotion

Hi Duana

I've removed the weeks from the report record source, and limit the chart's
record source by adding a where statement to the chart row source.

This seems to work. Now it is only details that are missing

1. After I've done the above I had to move the graph to the report header
before I only got one graph. If the graph was placed in the detail section I
still got multible charts. With the graph in the report header I get one
graph and multiple blank pages. Have you got any Idea why?

2. How do you limit the chart row source when opening the graph report with
the following code?

Private Sub Kommandoknap20_Click()

If Me.checkbox5 = -1 Then

DoCmd.OpenReport "Rpt_dptOEEgraph", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " & Me.combo9
& " And [weeknb] <= " & Me.combo11 & " And [dpt] = """ & Me.combo16 & """", ,
acWindowNormal

Else

DoCmd.OpenReport "Rpt_dptOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.Kombinationsboks5 & " And [yearnb] <= "
& Me.combo9 & " And [weeknb] <= " & Me.combo11 & " And [dpt] = """ &
Me.combo16 & """", , acWindowNormal

End If

End Sub

Once again thank you for all your help

Ticotion

Duane Hookom said:
Remove the weeks from the report's record source. If you get too many weeks
in the chart then set a criteria in your chart's Row Source to limit the
results.
--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi Duane

I can see your point but as I see it I only have the detail that i need. I
use the following sql as the report's record source.

SELECT qry_generelOEEdpt, qry_generelOEEyearnb, qry_generelOEE.weeknb,
qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE

I then use the following for graph record source

SELECT qry_generelOEE.weeknb, qry_generelOEE.OEE, qry_generelOEE.[target OEE]

I then connects the two by linking master and child on [Dpt];[Yearnb];[weeknb]

I've placed the graph in the detail section and have year and department in
the section above.

I think this should work but it doesn't. I still get one graph for each week
with the result for that week. If I remove the [weeknb] from the link I get
the correct graph, but it contains all weeks (not only the interval the user
have selected) and I still have the graph x amount times, depenting on
interval the user have selected.

Please help, as I'm starting to get grey hair over this problem:)

Ticotion
Can you see what i'm doing wrong?



Duane Hookom said:
When I read that someone is getting 5 graphs when they want only one with 5
lines or points, it usually suggests there is too much detail in the report's
record source.

--
Duane Hookom
Microsoft Access MVP


:

Hi Again

I think i'm a bit to fast here. I figured out the problem below, but now I
get a 5 charts that contains one week each. How do I get access to group all
weeks som I only get one graph?
Could it be the select statement I use?

SELECT qry_generelOEE.week, qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE GROUP BY qry_generelOEE.week, qry_generelOEE.OEE,
qry_generelOEE.[target OEE];

Any help would be greatly appreciated

Ticotion

:

Hi again

Sorry I think my probem basicly is that in the master child property of the
report I can only set one link. Is it not posible to set several links, like
[department], [Year], [Week no.]?

thanks for your help

Ticotion

:

Hi Duane

I tried your suggestion but I do not get the result I want. For instand if I
choose department 1 from week 1 until 5 (using the code shown below) I get 5
graphs, one from each week. What I want is a graph that only show week 1 to 5
(on the x-axis)for the department picked.

I guess this is fairly easy but just can't get it to work.

Hope you can help me

Thanks
Ticotion


:

A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.

--
Duane Hookom
Microsoft Access MVP


:

Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 
D

Duane Hookom

If you only ever want a single chart on your report then don't include any
record source for the report.

It looks like you are attempting to display a chart based on a date range
and dpt. I would have a couple date text boxes that get filled with dates
based on the selections in the combo boxes. Then your chart where clause
might look something like:

[DateNb] Between Forms!frmDates!txtStart & Forms!frmDates!txtEnd AND [dpt] =
Forms!frmDates!cboDpt

--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi Duana

I've removed the weeks from the report record source, and limit the chart's
record source by adding a where statement to the chart row source.

This seems to work. Now it is only details that are missing

1. After I've done the above I had to move the graph to the report header
before I only got one graph. If the graph was placed in the detail section I
still got multible charts. With the graph in the report header I get one
graph and multiple blank pages. Have you got any Idea why?

2. How do you limit the chart row source when opening the graph report with
the following code?

Private Sub Kommandoknap20_Click()

If Me.checkbox5 = -1 Then

DoCmd.OpenReport "Rpt_dptOEEgraph", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " & Me.combo9
& " And [weeknb] <= " & Me.combo11 & " And [dpt] = """ & Me.combo16 & """", ,
acWindowNormal

Else

DoCmd.OpenReport "Rpt_dptOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.Kombinationsboks5 & " And [yearnb] <= "
& Me.combo9 & " And [weeknb] <= " & Me.combo11 & " And [dpt] = """ &
Me.combo16 & """", , acWindowNormal

End If

End Sub

Once again thank you for all your help

Ticotion

Duane Hookom said:
Remove the weeks from the report's record source. If you get too many weeks
in the chart then set a criteria in your chart's Row Source to limit the
results.
--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi Duane

I can see your point but as I see it I only have the detail that i need. I
use the following sql as the report's record source.

SELECT qry_generelOEEdpt, qry_generelOEEyearnb, qry_generelOEE.weeknb,
qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE

I then use the following for graph record source

SELECT qry_generelOEE.weeknb, qry_generelOEE.OEE, qry_generelOEE.[target OEE]

I then connects the two by linking master and child on [Dpt];[Yearnb];[weeknb]

I've placed the graph in the detail section and have year and department in
the section above.

I think this should work but it doesn't. I still get one graph for each week
with the result for that week. If I remove the [weeknb] from the link I get
the correct graph, but it contains all weeks (not only the interval the user
have selected) and I still have the graph x amount times, depenting on
interval the user have selected.

Please help, as I'm starting to get grey hair over this problem:)

Ticotion
Can you see what i'm doing wrong?



:

When I read that someone is getting 5 graphs when they want only one with 5
lines or points, it usually suggests there is too much detail in the report's
record source.

--
Duane Hookom
Microsoft Access MVP


:

Hi Again

I think i'm a bit to fast here. I figured out the problem below, but now I
get a 5 charts that contains one week each. How do I get access to group all
weeks som I only get one graph?
Could it be the select statement I use?

SELECT qry_generelOEE.week, qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE GROUP BY qry_generelOEE.week, qry_generelOEE.OEE,
qry_generelOEE.[target OEE];

Any help would be greatly appreciated

Ticotion

:

Hi again

Sorry I think my probem basicly is that in the master child property of the
report I can only set one link. Is it not posible to set several links, like
[department], [Year], [Week no.]?

thanks for your help

Ticotion

:

Hi Duane

I tried your suggestion but I do not get the result I want. For instand if I
choose department 1 from week 1 until 5 (using the code shown below) I get 5
graphs, one from each week. What I want is a graph that only show week 1 to 5
(on the x-axis)for the department picked.

I guess this is fairly easy but just can't get it to work.

Hope you can help me

Thanks
Ticotion


:

A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.

--
Duane Hookom
Microsoft Access MVP


:

Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 
T

Ticotion

Hi Duane

That worked. thank you very much. Only one small thing left

I'm trying to make a chart that now should contain all departments (for a
total overview). I use the following SQL string as the chart row source

TRANSFORM Sum(qry_generelOEE.OEE) AS SumAfOEE
SELECT qry_generelOEE.Weeknb
FROM qry_generelOEE
WHERE (((qry_generelOEE.Weeknb) Between [Forms]![Frm_Fac]![Combo5] And
[Forms]![Frm_Fac]![Combo11]))
GROUP BY qry_generelOEE.Weeknb
PIVOT qry_generelOEE.Dpt;

I get the following error that it is to complex to run. What I'm I doing
wrong?

Ticotion


Duane Hookom said:
If you only ever want a single chart on your report then don't include any
record source for the report.

It looks like you are attempting to display a chart based on a date range
and dpt. I would have a couple date text boxes that get filled with dates
based on the selections in the combo boxes. Then your chart where clause
might look something like:

[DateNb] Between Forms!frmDates!txtStart & Forms!frmDates!txtEnd AND [dpt] =
Forms!frmDates!cboDpt

--
Duane Hookom
Microsoft Access MVP


Ticotion said:
Hi Duana

I've removed the weeks from the report record source, and limit the chart's
record source by adding a where statement to the chart row source.

This seems to work. Now it is only details that are missing

1. After I've done the above I had to move the graph to the report header
before I only got one graph. If the graph was placed in the detail section I
still got multible charts. With the graph in the report header I get one
graph and multiple blank pages. Have you got any Idea why?

2. How do you limit the chart row source when opening the graph report with
the following code?

Private Sub Kommandoknap20_Click()

If Me.checkbox5 = -1 Then

DoCmd.OpenReport "Rpt_dptOEEgraph", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " & Me.combo9
& " And [weeknb] <= " & Me.combo11 & " And [dpt] = """ & Me.combo16 & """", ,
acWindowNormal

Else

DoCmd.OpenReport "Rpt_dptOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.Kombinationsboks5 & " And [yearnb] <= "
& Me.combo9 & " And [weeknb] <= " & Me.combo11 & " And [dpt] = """ &
Me.combo16 & """", , acWindowNormal

End If

End Sub

Once again thank you for all your help

Ticotion

Duane Hookom said:
Remove the weeks from the report's record source. If you get too many weeks
in the chart then set a criteria in your chart's Row Source to limit the
results.
--
Duane Hookom
Microsoft Access MVP


:

Hi Duane

I can see your point but as I see it I only have the detail that i need. I
use the following sql as the report's record source.

SELECT qry_generelOEEdpt, qry_generelOEEyearnb, qry_generelOEE.weeknb,
qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE

I then use the following for graph record source

SELECT qry_generelOEE.weeknb, qry_generelOEE.OEE, qry_generelOEE.[target OEE]

I then connects the two by linking master and child on [Dpt];[Yearnb];[weeknb]

I've placed the graph in the detail section and have year and department in
the section above.

I think this should work but it doesn't. I still get one graph for each week
with the result for that week. If I remove the [weeknb] from the link I get
the correct graph, but it contains all weeks (not only the interval the user
have selected) and I still have the graph x amount times, depenting on
interval the user have selected.

Please help, as I'm starting to get grey hair over this problem:)

Ticotion
Can you see what i'm doing wrong?



:

When I read that someone is getting 5 graphs when they want only one with 5
lines or points, it usually suggests there is too much detail in the report's
record source.

--
Duane Hookom
Microsoft Access MVP


:

Hi Again

I think i'm a bit to fast here. I figured out the problem below, but now I
get a 5 charts that contains one week each. How do I get access to group all
weeks som I only get one graph?
Could it be the select statement I use?

SELECT qry_generelOEE.week, qry_generelOEE.OEE, qry_generelOEE.[target OEE]
FROM qry_generelOEE GROUP BY qry_generelOEE.week, qry_generelOEE.OEE,
qry_generelOEE.[target OEE];

Any help would be greatly appreciated

Ticotion

:

Hi again

Sorry I think my probem basicly is that in the master child property of the
report I can only set one link. Is it not posible to set several links, like
[department], [Year], [Week no.]?

thanks for your help

Ticotion

:

Hi Duane

I tried your suggestion but I do not get the result I want. For instand if I
choose department 1 from week 1 until 5 (using the code shown below) I get 5
graphs, one from each week. What I want is a graph that only show week 1 to 5
(on the x-axis)for the department picked.

I guess this is fairly easy but just can't get it to work.

Hope you can help me

Thanks
Ticotion


:

A graph will have its own Row Source which doesn't consider the filter on the
report. You can use the Link Master/Child properties of the graph control to
filter the graph based on a value (or values) in the report.

You may need to add criteria directly to the graph Row Source.

--
Duane Hookom
Microsoft Access MVP


:

Hi

I have a form which filters a report on department, year and week no. If a
user checks a check box the code referres to another report that should
contain the graf view of the data. But I can not get the report to show the
correct data in the grafs.

What happens is that the grafh is not filtered correctly, so it shows the
full data range. How can this be done?

The following data is used in the graf

Department yearnb weeknb OEE OEEtarget

I use the following command to open the report filtered.

Private Sub Kommandoknap20_Click()

If Me.check25 = -1 Then

DoCmd.OpenReport "Rpt_departOEEgrafh", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

Else

DoCmd.OpenReport "Rpt_departOEE", acPreview, , "[yearnb] >=" &
Me.combo7 & " And [weeknb] >= " & Me.combo5 & " And [yearnb] <= " &
Me.combo9& " And [weeknb] <= " & Me.combo11& " And [depart] = """ &
Me.combo16& """", , acWindowNormal

End If

End Sub



Can anyone help me?

Ticotion
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top