I developed a module that creates a songbook on-the-fly. Based on the song_id it loads the verses of that song in the next many2many field. Sometimes, a song does not have verses and in that case the field is not visible.
<page string="Liturgy Morning">
<field name="liturgy_morning_line">
<form string="Liturgy Morning Lines">
<group>
<group>
<field name="song_id"/>
</group>
</group>
</form>
<tree string="Liturgy Morning Lines" editable="bottom">
<field name="sequence" widget="handle"/>
<field name="song_id" options="{'no_quick_create':True,'no_create_edit':True}"/>
<field name="has_songverses" invisible="1"/>
<field name="songverse_ids" widget="many2many_tags" options="{'no_quick_create':True, 'no_create_edit': True}" domain="[('song_id', '=', song_id)]" attrs="{'invisible':[('has_songverses','=',False)]}"/>
</tree>
</field>
</page>
Note the "attrs="{'invisible':[('has_songverses','=',False)]}"" in the code. The model has a field 'has_songverses' which checkes if a song has verses or not. In case the song has no verses the field is invisible.
My issue is as follows: in case a song has verses the many2many field with song verses is loaded outside the form (see attached screenshot). IMAGE:
many2many field with song verses is loaded outside the form
If I click again in the form the field is correctly rendered inside the form.
Does anyone have a solution for this issue?
Thanks in advance!
I'm using SSRS reports in SharePoint 2010. I need to get my report to generate information in between the StartDate and StopDate. Currently it only gives me what was entered on the exact stop date. Where do I put the >= and how? I've tried putting it in the filter, but I get an error that says I can't mix fields and parameters. I have parameters so the user can enter the dates and I have Start_Date and Stop_Date fields.
I apologize in advance. I'm a newbie to SSRS Reporting.
<FieldRef Name="Drug_x0020_Name" />
<FieldRef Name="Inmate_x0020_Last_x0020_Name" />
<FieldRef Name="Start_x0020_Date" />
<FieldRef Name="Stop_x0020_Date" />
<FieldRef Name="ID" />
<FieldRef Name="DiscontinuedDate" />
<FieldRef Name="Prescription_x0020_Type" />
<FieldRef Name="Created" />
<FieldRef Name="InmateID" />
<FieldRef Name="Inmate_x0020_First_x0020_Name" />
<FieldRef Name="Ordered_x0020_Date" />
<FieldRef Name="DrugClassification" />
Thanks in advance!
Tara
Here is what a filter should look like in the designer. I don't use Report Builder, but it should have something similar as far as a tablix properties dialog. Of course, the expression field and parameter names will be different for you. Usually a Between filter is inclusive of the beginning and end date, so this may give similar results to what you are getting now. You can always remove the second part of the filter if you want to get everything after the start date.
If you want to overwrite the Filter right in the RDL, here is what that looks like based on the image above. I have changed the names to match what you have posted in the comments.
<Filters>
<Filter>
<FilterExpression>=Fields!Start_Date.Value</FilterExpression>
<Operator>GreaterThanOrEqual</Operator>
<FilterValues>
<FilterValue>=Parameters!StartDate.Value</FilterValue>
</FilterValues>
</Filter>
<Filter>
<FilterExpression>=Fields!Start_Date.Value</FilterExpression>
<Operator>LessThanOrEqual</Operator>
<FilterValues>
<FilterValue>=Parameters!StopDate.Value</FilterValue>
</FilterValues>
</Filter>
</Filters>
Editing RDL directly is not the best way to go about this, but you can do it. Just be careful, is all.
Good luck!
I received an .accdb file and my task is to hide the "Home" tab on the ribbon in Access 2013. The only thing left should be the "Add-ins" tab with already present custom buttons.
I have received some advice suggesting that there might be a custom ribbon that could be edited to accomplish this. However, I have no idea where to find it and start editing. Can it be done somewhere in the design mode, or should I use Visual Studio? Can the Custom UI Editor hack an existing XML structure of an accdb?
Thanks for any input.
As a general rule, you will find the ribbon customizations in a table called USYSRibbons.
The xml to hide home, and much everything in the ribbon would thus look like:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<officeMenu>
<!-- First we hide all the items displayed by default -->
<control idMso="FileNewDatabase" visible="false"/>
<control idMso="SourceControlCreateDatabaseFromProject" visible="false"/>
<control idMso="FileOpenDatabase" visible="false"/>
<control idMso="FileSave" visible="false"/>
<control idMso="ConvertDatabaseFormat" visible="false"/>
<control idMso="FileSaveAsMenuAccess" visible="false"/>
<control idMso="FileManageMenu" visible="false"/>
<control idMso="FileSendAsAttachment" visible="false"/>
<control idMso="MenuPublish" visible="false"/>
<control idMso="FileServerMenu" visible="false"/>
<control idMso="FileCloseDatabase" visible="false"/>
<control idMso="FileExit"
getVisible="HideExit"
getEnabled="EnableExit" />
<!-- Now let's show a single Print Command -->
<control idMso="FilePrintMenu" visible="false"/>
</officeMenu>
</ribbon>
</customUI>
There is no built in editor for custom ribbons (but as noted, you can right click on ribbons and customize them).
Open the database, go to "File" in the upper left corner, then click options.
Go to the tab "Customize Ribbon", there you can deselect the main tabs.
I am using a spring bean with flow scope which has a primesfaces's StreamedContent field and the image does not show up. Any ideas on how to make this work with flow scope? It works fine when it is a managed bean with request scope and also when it is a spring bean with session/prototype/singleton scope.
Below is some sample code:
flow:
<input name="springBean" required="false"/>
<view-state id="testFlow">
<transition on="post" to="testFlow" />
</view-state>
xhtml file:
<ui:define name="body">
<h:form>
<p:graphicImage value="#{springBean.barcode}" cache="false"/>
<br />
<h:outputText value="This is a test flow" />
<br />
Message From Spring = #{springBean.text}<br />
<h:inputText value="#{springBean.text}" style="width:200px" />
<h:commandButton action="post" value="Update" />
</h:form>
</ui:define>
application context:
<import resource="flowConfig.xml" />
<bean name="springBean" class="swfproject.MessageHolder" scope="flow">
<property name="text" value="This was defined in Spring" />
</bean>
The only way I have found so far is to extend GraphicImage component and make it store binary content in the Session. See How to make Primefaces graphicImage work with Spring Web Flow
I have noticed that even though when you disable the “Use Access Special Keys”, disable the “Display Navigation Pane”, and disable the ribbon menus, you can easily access the “Access Options” go to the current Database area, and re-enable all these options.
Is there a way to completely hide the “Current Database” option in Access 2007 and 2010?
In MS Access 2007 and MS Access 2010, rather than setting options to control a user's access to the application, it is possible to control the contents of the "Backstage". All images and instructions apply to Access 2010, but 2007 is not very different. Read Customize the Ribbon first.
Backstage
First, right-click the Navigation Bar at the top of the Navigation Pane, and then click Navigation Options on the shortcut menu. In the Navigation Options dialog box, under Display Options, select the Show System Objects check box, and then click OK. This will allow you to see the table you create. Note that is applies to all databases, so you may wish to switch it back off when you are finished.
Next, under Options, choose Client Settings and scroll down to General. You will see Show add-in user interface errors, make sure it is selected.
You will need a table called USysRibbons:
Create Table USysRibbons (ID Counter Primary Key,
RibbonName Text(255),RibbonXml Memo)
You might like to add a unique index to RibbonName, otherwise you could end up with more than one ribbon with the same name.
You will need some XML, you can just cut and paste into the newly created table.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<!-- Ribbon XML -->
</ribbon>
<backstage>
<button idMso="FileSave" visible="false"/>
<button idMso="SaveObjectAs" visible="false"/>
<button idMso="FileSaveAsCurrentFileFormat" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileCloseDatabase" visible="false"/>
<tab idMso ="TabInfo" visible="false"/>
<tab idMso ="TabRecent" visible="false"/>
<tab idMso ="TabNew" visible="false"/>
<tab idMso ="TabPrint" visible="false"/>
<tab idMso ="TabShare" visible="false"/>
<tab idMso ="TabHelp" visible="false"/>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileExit" visible="false"/>
</backstage>
</customUI>
Set the Ribbon Name to say, "BackstageCustom". It should be fairly obvious which line relates to which part of the Backstage.
You now have to close and reopen the database (Compact & Repair is probably the quickest way to do this, but make sure you have a backup before you use this method). There will be a lot of opening and closing in this.
You can now go to Options->Current Database and scroll down to Ribbon and Toolbar Options, select the newly created ribbon under Ribbon Name. When you close Options, you will get a warning that you must close and open the database for the changes to take effect.
When you do, you will no longer be able to see Options on the backstage, nor will you see much except a list of recent databases. Look at the XML above, you can see that everything is set to false.
I reckon the easiest way out of the situation is to open the USysRibbons table and change this line:
<button idMso="ApplicationOptionsDialog" visible="false"/>
to
<button idMso="ApplicationOptionsDialog" visible="true"/>
Open and close again, and remove the ribbon from Ribbon Name, under Options. Open and close and you are back to where you started, more or less.
To add to Fionnuala's excellent answer, Access 2013 has different options in the FILE menu so the XML needs to be slightly modified. Follow the answer exactly but replace the XML with this, which hides the Options menu and leaves Print and Exit.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<!-- Ribbon XML -->
</ribbon>
<backstage>
<button idMso="ApplicationOptionsDialog" visible="false"/>
</backstage>
</customUI>
All,
I've spent a lot of time ... on a lot of websites ...
Here's XML that will:
Disable QAT
Disable "Database Options"
Disable "Save As"
Disable "Close" (so you can programmatically control what happens)
Enable only the "Home" TAB ... I actually rebuilt it from scratch
This code pretty much "exactly" looks like the standard "HOME" tab in MS Access 2013.
You can use this to really lock down your app ... in combination with some good code to disable special keys at startup, etc.
Here ya go:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
<!-- Ribbon XML -->
<tabs>
<tab id="dbCustomHome" label="HOME" visible="true">
<group id="dbViews" label="Views">
<control idMso="ViewsSwitchToDefaultView" size="large" label="View" enabled="true"/>
</group>
<group id="dbClipboard" label="Clipboard">
<control idMso="PasteSpecial" size="large" label="Paste" enabled="true"/>
<control idMso="Cut" label="Cut" enabled="true"/>
<control idMso="Copy" label="Copy" enabled="true"/>
<control idMso="FormatPainter" label="Format Painter" enabled="true"/>
</group>
<group id="dbSortFilter" label="Sort and Filter">
<control idMso="FiltersMenu" size="large" label="Filter" enabled="true"/>
<control idMso="SortUp" label="Ascending" enabled="true"/>
<control idMso="SortDown" label="Descending" enabled="true"/>
<control idMso="SortRemoveAllSorts" label="Remove Sort" enabled="true"/>
<control idMso="SortSelectionMenu" label="Selection" enabled="true"/>
<control idMso="FilterAdvancedMenu" label="Advanced" enabled="true"/>
<control idMso="FilterToggleFilter" label="Toggle Filter" enabled="true"/>
</group>
<group id="dbRecords" label="Records">
<control idMso="DataRefreshAll" size="large" label="Refresh All" enabled="true"/>
<control idMso="GoToNewRecord" label="New" enabled="true"/>
<control idMso="RecordsSaveRecord" label="Save" enabled="true"/>
<control idMso="Delete" label="Delete" enabled="true"/>
<control idMso="RecordsTotals" label="Totals" enabled="true"/>
<control idMso="SpellingAccess" label="Spelling" enabled="true"/>
<control idMso="RecordsMoreRecordsMenu" label="More" enabled="true"/>
</group>
<group id="dbFind" label="Find">
<control idMso="FindDialog" size="large" label="Find" enabled="true"/>
<control idMso="ReplaceDialog" label="Replace" enabled="true"/>
<control idMso="GoToMenuAccess" label="Go To" enabled="true"/>
<control idMso="SelectMenuAccess" label="Select" enabled="true"/>
</group>
<group id="dbTextFormat" label="Text Formatting" centerVertically="true">
<box id="TopBx">
<control idMso="Font" enabled="true"/>
<control idMso="FontSize" enabled="true"/>
<buttonGroup id="buttonGroup_TopRow">
<control idMso="Bullets" enabled="true"/>
<control idMso="Numbering" enabled="true"/>
<separator id="separator1" />
<control idMso="IndentIncrease" enabled="true"/>
<control idMso="IndentDecrease" enabled="true"/>
<separator id="separator2" />
<control idMso="AlignLeftToRightMenu" enabled="true"/>
</buttonGroup>
</box>
<box id="BottomBx">
<buttonGroup id="buttonGroup_BottomRow">
<control idMso="Bold" enabled="true"/>
<control idMso="Italic" enabled="true"/>
<control idMso="Underline" enabled="true"/>
<separator id="separator3" />
<control idMso="FontColorPicker" enabled="true"/>
<control idMso="TextHighlightColorPicker" enabled="true"/>
<control idMso="FontFillBackColorPicker" enabled="true"/>
<separator id="separator4" />
<control idMso="AlignLeft" enabled="true"/>
<control idMso="AlignCenter" enabled="true"/>
<control idMso="AlignRight" enabled="true"/>
<separator id="separator5" />
<control idMso="DatasheetGridlinesMenu" enabled="true"/>
<separator id="separator6" />
<control idMso="FontAlternateFillBackColorPicker" enabled="true"/>
</buttonGroup>
</box>
</group>
</tab>
</tabs>
</ribbon>
<backstage>
<tab idMso="TabSave" visible="false" > </tab>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileCloseDatabase" visible="false"/>
</backstage>
</customUI>
Because there remains a backdoor entrance to the access options by using [Quick Access Toolbar] - [Customization], an other simple solution using the same way as Fionnuala could be:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<commands>
<command idMso="ApplicationOptionsDialog" enabled="false"/>
</commands>