If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
erick-flores wrote:
Add a text box to the Valve group header. I add a text box to the fields under the Valve group header name: gskCount. But not in the "group header" When you say "Add a text box to the Valve group header" that for me is create/add a text box inside the group header, where right now the field is gsk_id. So I dont see how I can add a text box to the group header. So I add it under the fields under my group header. It did work when there is data under that group. I can see the textbox counting the data. But when there is no data an error will occur. "Run-time error '2427': You entered an expression that has no value." And it will highlight the "Cancel = (Me.gskCount = 0)" My code behind the OnFormat is: Private Sub GroupHeader6_Format(Cancel As Integer, FormatCount As Integer) Cancel = (Me.gskCount = 0) End Sub I am doing something wrong? It sounds like you did not put the gskCount text box in the group header that you want to count (GroupHeader6 ?). Adding the text box to the header section is the same as addin one to any other section. I don't understand why you are having trouble doing it. -- Marsh MVP [MS Access] |
#12
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
I cant get it to work...but thanks anyways Do you know any other way to do this? |
#13
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
erick-flores wrote:
I cant get it to work...but thanks anyways Do you know any other way to do this? That IS the way to do this. Maybe we should explore why it isn't working for you? Can't you just click on the text box button on the toolbox toolbar and then drag the outline of the text box in the header section? Isn't that what you did to add text boxes to the other sections? -- Marsh MVP [MS Access] |
#14
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
Marshall Barton wrote: erick-flores wrote: I cant get it to work...but thanks anyways Do you know any other way to do this? That IS the way to do this. Maybe we should explore why it isn't working for you? Can't you just click on the text box button on the toolbox toolbar and then drag the outline of the text box in the header section? Isn't that what you did to add text boxes to the other sections? Yes, and I complete understand what you mean BUT I dont see how to drag the textbox to the "header" like where right now says "cmp_id Header" It wont let me. I can put it UNDER the header section but not in the title that sasys "cmp_id" and has an arrow. Maybe I am not doing the right thing grouping? Sorry for my misunderstanding and thanks for your support, I am going crazy with this problem |
#15
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
This is what my report design looks like: ----------------------------------------------------------------------------------------------------------- ^cmp_id Header========================================== Tag Num: Description: Notes: ^stg_id Header=========================================== Description: Cyl Num: Notes: ^cyl_id Header=========================================== Description: cyl Num: Material: Components Material Part # ----------------------------------------------------------------------------------------------------------- ^cva_id Header=========================================== cva.Description cva.material cva.part# ^gsk_id Header==================================== -----(1)Here is where you want me to insert the texbox, right???? or gsk.Description gsk.material gsk.part# (2)txtgsk_Count:--------------Here? I tried (1) and it did not let me put a textbox in there, then I tried (2) and it worked when there is data for that group, it actually counts every record. But when there is no data I got the environment I already told you...the error message. So here is an outline of my report, it has more and more groups after the cyl_id. The principal groups a cmp_id, stg_id and cyl_id all three are shown every page. Then the cylinder can have multiple components. So my plan is create a group for each one, and display it if the cylinder has that component. Hope this can help a lil more, Thanks |
#16
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
-----------------------------------------------------------------------------------------------------------
^cmp_id Header========================================== Tag Num: Description: Notes: Also do you know how to change the arrow that points up in the group headers? Because I want the detail header for all my groups. (arrow point down) cmp_id Header================================ this is by default What I want: (arrow point up) cmp_id Header================================== So my report will look something like: ----------------------------------------------------------------------------------------------------------------top cmp_description (^)[--arrow point up] cmp_id Header============================== stg_description ^ stg_id Header============================================ = cyl_description ^ cyl_id Header============================================ = and so on... Do you know how to change that option for the group headers? |
#17
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
Forgot to add the last Group: Detail, so its clear
erick-flores wrote: ----------------------------------------------------------------------------------------------------------- ^cmp_id Header========================================== Tag Num: Description: Notes: Also do you know how to change the arrow that points up in the group headers? Because I want the detail header for all my groups. (arrow point down) cmp_id Header================================ this is by default What I want: (arrow point up) cmp_id Header================================== So my report will look something like: ----------------------------------------------------------------------------------------------------------------top cmp_description (^)[--arrow point up] cmp_id Header============================== stg_description ^ stg_id Header============================================ = cyl_description ^ cyl_id Header============================================ = and so on... ^ Detail============================================ ======= Do you know how to change that option for the group headers? |
#18
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
erick-flores wrote:
This is what my report design looks like: ----------------------------------------------------------------------------------------------------------- ^cmp_id Header========================================== Tag Num: Description: Notes: ^stg_id Header=========================================== Description: Cyl Num: Notes: ^cyl_id Header=========================================== Description: cyl Num: Material: Components Material Part # ----------------------------------------------------------------------------------------------------------- ^cva_id Header=========================================== cva.Description cva.material cva.part# ^gsk_id Header==================================== -----(1)Here is where you want me to insert the texbox, right???? or gsk.Description gsk.material gsk.part# (2)txtgsk_Count:--------------Here? I tried (1) and it did not let me put a textbox in there, then I tried (2) and it worked when there is data for that group, it actually counts every record. But when there is no data I got the environment I already told you...the error message. So here is an outline of my report, it has more and more groups after the cyl_id. The principal groups a cmp_id, stg_id and cyl_id all three are shown every page. Then the cylinder can have multiple components. So my plan is create a group for each one, and display it if the cylinder has that component. No, you can not place controls on the divider bar above the top of the section. Putting it in the section directly below the bar is the right place. I don't understand how a reference to the =Count(*) text box can produce that error. If there are no details in the group, then the value of the text box should be 0. You should not be getting some kind of non-existent value message. The only way I can think of getting that message is when you are referring to a control in a subreport that has no data or if the code is in the report's Open event instead of the group header section's Format event. Don't get carried away with too many groups. There is a limit of 10 grouping levels. -- Marsh MVP [MS Access] |
#19
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
Well I guess I am going to need some coding for my report. What I am trying to do is a replica of a FoxPro application. This application produces the same report that I am trying to create. This is what the groups headers looks like: ^ Page Header Tag Num Business Team ^ Group Header 1: cmp_id=================================== Description ^ Group Header 2: stg_id==================================== Description Components Material Part# ^ Groups Header 3: cyl_id=================================== Under this group are all the different components that the cylinders can have. They are all one on top of another, like you can see one line of data, but if you start moving the texbox you can see that there are 5 texbox one of top of another. So I guess that there is some code behind this group so I will print only if there is data behind a particular component ^ Group Header 4: bom.type1 + STR(bom.id1) Same thing for these group, but this group will show the components under the cylinder components. ^ Group Header 5: bom.type2 + STR(bom.id2) Here are the last components under the components from the cylinder components ^ Detail ^ Group Footer 5: bom.type2 + STR (bom.id2) ^ Group Footer 4: bom.type1 + STR (bom.id1) ^ Group Footer 3: cyl_id ^ Group Footer 2: stg_id ^ Group Footer 1: cmp_id ^ Pafe Footer I was trying to imitate this report in Access. But now that I know Access dont more than 10 groups, I guess I need to put some code behind my Groups (4,5 and Detail). Also if you notice all the arrows for the groups are pointing up. In Access is the other way, the arrows for the groups point down. Do you have any ideas of how to create some code for my groups in Access? So I can see my report the same as I see it in FoxPro? or perhaps another complete different way, that will produce the same/similar results? Thank you |
#20
|
|||
|
|||
How can I make a group not to show/display in a report if no data is under that group?
I got the answer about the arrows in the groups. Now, I know that does not matter. |
Thread Tools | |
Display Modes | |
|
|