How to set the first continuous combobox invisible in Access 2007? - ms-access

I'm trying to add an OR feature in the Continuous Filter Form and as you can see the first combobox shows up which I don't want it to show. Ideally, it should show only when the user wants the second row search option not in the first row filter. I have only OR in the combobox. Thanks for your help and let me know if you need any clarification!

Continuous form controls are all or nothing. If it's visible, it's visible in all rows, if invisible, it's invisible in all rows. There's nothing you can do about that.
You have four options (in order of complexity):
First Option:
The "On Current" event of the form happens when a user moves from one row to another inside the continuous form. you can add an IF statement to that event that disables the first box if the user has moved to the first row.
Second Option:
Have a fixed amount of filter boxes, and don't let the user pass the limit
Third Option:
Have a fixed amount of filter boxes, but make a "forward" and "back" buttons that will change what data the filter boxes link to, effectively making a 'custom' continuous form
Fourth Option:
Dynamically create the textboxes programatically (not recommended)

Set the default 'Visible' property to 'No' and then Reset it to 'Yes' when a second criteria is selected. This will populate the whole column though, just so you know.

Related

SSRS expression based on visibility of a textbox or column

Is it possible to inspect the visibility (Collapsed/Expanded) of a textbox in SSRS and use this in an expression?
For example :
=iif(Fields!column1 Is Visible,"Use this label","Use this other label")
What I want to accomplish to have the initial value of a column header display some text, when user clicks a particular value the details row are displayed (this is a Tablix), and then the header would change to something else (E.g. initial report state is to hide detail rows and only show Tablix member totals so column displays "... total", when user expands to view details column header changes to "... number".
In MS Access through VBA I could inspect the visible property and create code based on this. Till now haven't found a similar way of doing this in SSRS 2016.
Tried setting expressions for visibility as well as setting expressions for changing value of a textbox.
=IIF(Fields!accountnum.Value IS NOTHING OR Fields!accountnum.Value = TRUE,"Station #", "Station Count")
No error messages. My results should be to change header (textbox) value based on whether detail rows are collapsed (hidden) or expanded (visible).
To answer your first question:
Well of course this is possible, just not they way you want to do it. Here is a smimple example. Lets say your visibilty criteria is the following expression:
'Visibility expression
=IIF(Fields!Category.Value = "Visible", False, True)
Now you dont check on the visibilty with the Is Visible criteria, you just use the same expression again. Like this:
=IIF(
IIF(Fields!Category.Value = "Visible",
Fale,
True) = True,
"This one is not visible",
"This one is visible")
To answer you problem:
They way you want to do it, it is not possible. But you can do this with a workaround.
Add a user defined parameter to your report with two options:
Display details
Hide details
Then add two tablixes to your report. One tablix without the details and one tablix with the details you want to show.
Then go to the first tablix Tablix Properties > Visibility and add the following expression:
=IIF(Parameters!VisibilityParameter.Value = "Display details", True, False)
And the expression for the other tablix visibility:
=IIF(Parameters!VisibilityParameter.Value = "Hide details", True, False)
Now based on the parameter result the talbix with or without the details will be displayed.
You can do this, maybe it won't look too elegant but I'll show you what I did and you can see if it's useful.
Note: Using this method, you can't change the actual column header directly as it's out of scope so this may not meet requirements but you may be able to adapt it. I just thought it was a nice challenge ! :)
First I got some sample data (WideWorldImports sample database) that just gave me a CountryID, CountryName and Continent.
Once you have your data, add a table, drag CountryName into the first column and remove the remaining two columns.
Then right-click the Details row group and do Add Group => Parent Group Choose Continent as the Group By field and check the Add Group Header option.
The table design should look like this, nice and simple.
Next we will set the toggle on the detail rows. Right-Click the "Details" row group and chose "Group Properties". On visibility, click 'Hide' and check the "Display Can be toggled by the report item" to Continent.
We should now have a report that expands and collapses as expected.
Next vertically expand the 'blank cell' just above the countryname as we'll need a bit of room to work with. Make it about 4 times the normal height, we'll change it back later so the size is not important.
In the blank cell, right-click and do Insert => Rectangle.
In this rectangle, right-click and do Insert => TextBox. Double click the text box and type your "collapsed state" column header caption. In my example I just used "Collapsed Header".
Repeat and add another textbox (It must be within the rectangle again). Set this text box to your "expanded state" caption. In this example I just used "Expanded Header".
Next, right click the "Collapsed header" textbox, then properties then set the visibility to Show and the toggle item to Continent.
Repeat for your "Expanded Header" but this time set visibilty to Hide, like this..
Finally, position both text boxes at location 0,0 so they overlap and shrink the cell back down to it's original size.
The final design will look something like this...
When we first run the report we see this.
If we expand a node, we get this.
I do not think this is possible in SSRS. You could change column header text depending on your condition, For Ex: IF (A) then Header A else Header B. But you wish to change Column Header based on some clicks (expand / collapse) on report and this is not possible. I mean we need some data to set condition not clicks.
But maybe someone with more Experience on SSRS would throw some more insight.
This is what InScope() is for. See here for more information

Display a Tablix on click of Image in ssrs.

We have one requirement in SSRS where we need to display the tablix on click of the Image. By default tablix will be hidden, when user clicks on the Image then we need to show the hidden tablix. Kindly suggest some solution if any. Thanks.
You can toggle the visibility of an object. Initially have the visibility property set to hidden, then use the toggleitem property to accomplish what you are looking for. Instructions are below
To hide static rows in a table, matrix, or list:
In report design view, click the table, matrix, or list to display
the row and column handles.
Right-click the row handle, and then click Row Visibility. The Row Visibility dialog box opens.
To set the visibility, follow steps 3 and 4 in the first procedure.
To hide static columns in a table, matrix, or list
In Design view, select the table, matrix, or list to display the row and column handles.
Right-click the column handle, and then click Column Visibility.
In the Column Visibility dialog box, follow steps 3 and 4 in the first procedure.
Then use the ToggleItem property of the table. Select the table, locate the property in the Properties window and specify the name of the textbox. If you now render the report you'll notice a little + icon in front of the testingBox content.
To find out what your textbox is called first select that and look at the bold part in top of the Properties window. To change it you can use the Name property. It's advisable to give it a clear name so you can easily locate it.

How to assign value of hidden parameter to another parameter in ssrs?

I have one parameter which contains list of employers in dropdown. Depending upon employer selection i want to auto populate a textbox with certain data. To do this i have taken one more dropdown parameter which gets populated with data on employer selection and which in turn populates the textbox with data. Now i want to hide this intermediate dropdown. How do i do that?
Go to the parameter properties. In the General section at the bottom is the parameter visibility options. Set it to Hidden. This will allow you to still use the parameter, but it will not show up at the top when you want to view the report.

Combo Box with State Abbreviations

I have a Combo box on my form in Access 03. I need help on coding the combo box so that when a user hits T (for example), it will jump to the first state that starts with a T, and if T is hit again it will move to the next state that starts with a T and so for, for any letter. Also should the row source type be a Value List or Table/Query? Thanks.
No need to code my friend just set the rowsoruce to your query and then set the “Auto Expand” property to “Yes” and access will take care of it for you
For what it's worth, listboxes DO behave the way you suggest. If you're really set on this, you might use a textbox and listbox to "fake" a combo box. Of course, the reason it's called "combo box" is because it's a combination of two controls, a textbox and a list, so you'd be re-inventing the wheel, but you could then get the behavior you want.

Access 2007 - Display text fields in drop down list while bundling to an ID

in Access 2007 how can I display text fields in drop down list while bundling to an ID? not while selecting (we can do this by plying with the width field. but what I need after selecting?
Do we create a hidden field that stores the ID?
Your description of how a combo box works is correct. Keep in mind that while you're setting the first column and display length to zero, that means the combo box will then search by the second text column. The combo box will display by that second text column after you select a value. In fact in all cases for typing in a value, even partial matching as you type, a simple select of a value will ALL BE done by the displayed text column but in ALL CASES it will save the actual ID (the first column) into the table that the form is bound to.
So no additional coding or anything if need be done on your part to achieve the above goal and in fact this is pretty much the default as to how combo boxes work inside of ms access.
What makes the combo box is somewhat unique inside of Access is you can have more then 2 columns. And, in the combo box settins you can choose what column is to be selected and saved into the table. And, the combo box has both before update (with a cancel), and after update and also a Not in List event that fires in the case of a user tyring to type in a value that not in the list.
So, the Access combo box is quite flexible. The source for the list or members displayed in the combo box can be based on a table, on a query, or you can even type in a value list that is saved inside of the property sheet. And, another option is to fill the combo box is by using call backs (so, again quite a few ways to fill out the list of memebers for selectiogn).
So, keep in mind there is two aspects to the combo box. There's a so called row data source or how you feed the members that will display in the combo box. Then there is the underlying column (field) that you bind that control to when you select a value. That is in the case when the combo box is bound.
As mentioned, the bound column setting is another property in terms of inside the combo box, and you don't need to write any additional code to achieve that above goal in your question.
Albert Thank you for this excellent explanation.
I found out that the bound column has no effect. Acces take the first visible field and bound to it regardless of what you have in the bound column property.
All good thanks
Omar ( hostitwise.com)