How to modify the formatting options for a single <keyword> in a syntax highliting definition for GEdit? - syntax-highlighting

I made the following language definition for GEdit, an XML dialect aimed to keep the log of measurements. I made it as a modification of the DocBook language definition.
File: lcs.lang
<?xml version='1.0' encoding='utf-8'?>
<language id="lcs" _name="LCs" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">application/lcs+xml</property>
<property name="globs">*.lcs</property>
<property name="block-comment-start"><!--</property>
<property name="block-comment-end">--></property>
</metadata>
<styles>
<style id="header-elements" _name="Header Elements" map-to="def:keyword"/>
<style id="formatting-elements" _name="Formatting Elements" map-to="def:keyword"/>
<style id="structural-elements" _name="Structural Elements" map-to="def:keyword"/>
</styles>
<definitions>
<context id="header-elements" once-only="true" style-ref="header-elements">
<keyword>mt</keyword>
<keyword>la</keyword>
<keyword>ti</keyword>
<keyword>sd</keyword>
<keyword>cd</keyword>
</context>
<context id="formatting-elements" once-only="true" style-ref="formatting-elements">
<keyword>p</keyword>
<keyword>b</keyword>
<keyword>i</keyword>
<keyword>br</keyword>
<keyword>X</keyword>
<keyword>ol</keyword>
<keyword>ul</keyword>
<keyword>li</keyword>
<keyword>h1</keyword>
<keyword>h2</keyword>
<keyword>h3</keyword>
</context>
<context id="structural-elements" once-only="true" style-ref="structural-elements">
<keyword>lcs</keyword>
<keyword>cc</keyword>
<keyword>ls</keyword>
<keyword>le</keyword>
<keyword>da</keyword>
<keyword>un</keyword>
<keyword>re</keyword>
<keyword>co</keyword>
<keyword>ex</keyword>
<keyword>no</keyword>
</context>
<context id="lcs-tags">
<include>
<context ref="header-elements"/>
<context ref="formatting-elements"/>
<context ref="structural-elements"/>
<context ref="xml:element-name" original="true"/>
</include>
</context>
<replace id="xml:element-name" ref="lcs-tags"/>
<context id="lcs">
<include>
<context ref="xml:xml"/>
</include>
</context>
</definitions>
</language>
As you can see, there's a context named formatting-elements.
Then I made a syntax highlighting definition, as a modification of a well-known public file.
File: militargreen.xml
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme id="militargreen" _name="MilitarGreen" version="1.0">
<author>Joe Bordello</author>
<_description>Good for XML/PHP at night</_description>
<color name="White" value="#FFFFFF"/>
<color name="BrightGrey" value="#DDDDDD"/>
<color name="Grey" value="#BBBBBB"/>
<color name="Black" value="#000000"/>
<color name="PetrolGrey" value="#669988"/>
<color name="GreenBlack" value="#223322"/>
<color name="GreenGrey" value="#334433"/>
<color name="Green" value="#99EE00"/>
<color name="GreenYellow" value="#CCFF88"/>
<color name="Yellow" value="#FFFF00"/>
<color name="DarkYellow" value="#EEEE66"/>
<color name="Orange" value="#FFCC00"/>
<color name="Blue" value="#99CCFF"/>
<color name="Red" value="#DD2200"/>
<color name="LightRed" value="#EE5533"/>
<color name="BrightRed" value="#EE7766"/>
<color name="Purple" value="#EE99FF"/>
<color name="DeepPurple" value="#DD66EE"/>
<color name="unknown" value="#FF88FF"/>
<style name="text" foreground="White" background="GreenBlack"/>
<style name="selection" foreground="Black" background="Orange"/>
<style name="cursor" foreground="White"/>
<style name="current-line" background="Black"/>
<style name="line-numbers" foreground="Black" background="Grey"/>
<style name="right-margin" background="BrightGrey"/>
<style name="bracket-match" foreground="White" background="Red" bold="true"/>
<style name="search-match" foreground="Black" background="Blue"/>
<style name="def:comment" foreground="BrightGrey" background="GreenGrey" italic="true"/>
<style name="def:note" foreground="LightRed" bold="true" italic="false"/>
<style name="def:preprocessor" foreground="Purple"/>
<style name="def:error" foreground="Yellow" background="Red" bold="true"/>
<style name="def:underlined" underline="false"/>
<style name="def:decimal" foreground="Purple" bold="true"/>
<style name="def:floating-point" foreground="Purple" bold="true"/>
<style name="def:boolean" foreground="Purple" bold="true"/>
<style name="def:base-n-integer" foreground="Blue" bold="true"/>
<style name="def:string" foreground="Green"/>
<style name="def:special-char" foreground="BrightRed" bold="true"/>
<style name="def:identifier" foreground="Blue"/>
<style name="def:keyword" foreground="Orange" bold="true"/>
<style name="def:type" foreground="Orange"/>
<style name="def:statement" foreground="DarkYellow"/>
<style name="def:function" foreground="Blue"/>
<style name="def:shebang" foreground="BrightRed" bold="true"/>
<style name="def:builtin" foreground="Blue" italic="true"/>
<style name="def:constant" foreground="BrightRed" bold="true" italic="true"/>
<style name="def:special-constant" foreground="Blue" italic="true"/>
<style name="bracket-mismatch" background="unknown" italic="true"/>
<style name="def:doc-comment-element" background="unknown" italic="true"/>
<style name="def:complex" background="unknown" italic="true"/>
<style name="def:character" background="unknown" italic="true"/>
</style-scheme>
All it works as expected.
Now I want to modify the syntax definition so that the strings enclosed by the keywords of the "formatting-elements" context (but not the keywords themself) are formatted in a special way: for example: the statement
<b>phrase one</b>
in GEdit should appear <b>phrase one</b>, while the statement
<i>phrase two</i>
in GEdit should appear <i>phrase two</i>
How can I set up such a modifications?
Update
I have modified the files in the following way:
File: lcs.lang
<?xml version='1.0' encoding='utf-8'?>
<language id="lcs" _name="LCs" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">application/lcs+xml</property>
<property name="globs">*.lcs</property>
<property name="block-comment-start"><!--</property>
<property name="block-comment-end">--></property>
</metadata>
<styles>
<style id="header-elements" _name="Header Elements" map-to="def:keyword"/>
<style id="formatting-elements" _name="Formatting Elements" map-to="def:keyword"/>
<style id="structural-elements" _name="Structural Elements" map-to="def:keyword"/>
<style id="italic-keyword" _name="Italic Keyword" map-to="def:keyword"/>
<style id="bold-keyword" _name="Bold Keyword" map-to="def:keyword"/>
<style id="dimmed-keyword" _name="Dimmed Keyword" map-to="def:keyword"/>
<style id="attrib-name" _name="Attribute Name" map-to="xml:attribute-name"/>
<style id="attrib-value" _name="Attribute Value" map-to="xml:attribute-value"/>
</styles>
<definitions>
<context id="header-elements" once-only="true" style-ref="header-elements">
<keyword>me</keyword>
<keyword>la</keyword>
<keyword>ti</keyword>
<keyword>sd</keyword>
<keyword>cd</keyword>
</context>
<context id="formatting-elements" once-only="true" style-ref="formatting-elements">
<keyword>b</keyword>
<keyword>i</keyword>
<keyword>X</keyword>
<keyword>p</keyword>
<keyword>br</keyword>
<keyword>ol</keyword>
<keyword>ul</keyword>
<keyword>li</keyword>
<keyword>h1</keyword>
<keyword>h2</keyword>
<keyword>h3</keyword>
</context>
<context id="italic-keyword" once-only="true" style-ref="italic-keyword">
<match><i>.*</i></match>
</context>
<context id="bold-keyword" once-only="true" style-ref="bold-keyword">
<match><b>.*</b></match>
</context>
<context id="dimmed-keyword" once-only="true" style-ref="dimmed-keyword">
<match><X>.*</X></match>
</context>
<context id="structural-elements" once-only="true" style-ref="structural-elements">
<keyword>lcs</keyword>
<keyword>co</keyword>
<keyword>le</keyword>
<keyword>le</keyword>
<keyword>da</keyword>
<keyword>un</keyword>
<keyword>re</keyword>
<keyword>co</keyword>
<keyword>ex</keyword>
<keyword>no</keyword>
</context>
<context id="lcs-tags">
<include>
<context ref="header-elements"/>
<context ref="formatting-elements"/>
<context ref="italic-keyword"/>
<context ref="bold-keyword"/>
<context ref="dimmed-keyword"/>
<context ref="structural-elements"/>
<context ref="xml:element-name" original="true"/>
<context ref="xml:attribute-name" original="true"/>
<context ref="xml:attribute-value" original="true"/>
</include>
</context>
<replace id="xml:element-name" ref="lcs-tags"/>
<context id="lcs">
<include>
<context ref="xml:xml"/>
</include>
</context>
</definitions>
</language>
In other words I've added the contexts:
<context id="italic-keyword" once-only="true" style-ref="italic-keyword">
<match><i>.*</i></match>
</context>
<context id="bold-keyword" once-only="true" style-ref="bold-keyword">
<match><b>.*</b></match>
</context>
<context id="dimmed-keyword" once-only="true" style-ref="dimmed-keyword">
<match><X>.*</X></match>
</context>
Then I've edited the syntax file in the following way:
File: militargreen.xml
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme id="militargreen" _name="MilitarGreen" version="1.0">
<author>Joe Bordello</author>
<_description>Good for XML/PHP at night</_description>
<color name="White" value="#FFFFFF"/> <!-- 255 255 255 -->
<color name="BrightGrey" value="#DDDDDD"/> <!-- 221 221 221 -->
<color name="Grey" value="#BBBBBB"/> <!-- 187 187 187 -->
<color name="Black" value="#000000"/> <!-- 0 0 0 -->
<color name="PetrolGrey" value="#669988"/> <!-- 102 153 136 -->
<color name="GreenBlack" value="#223322"/> <!-- 34 51 34 -->
<color name="GreenGrey" value="#334433"/> <!-- 51 68 51 -->
<color name="Green" value="#99EE00"/> <!-- 153 238 0 -->
<color name="GreenYellow" value="#CCFF88"/> <!-- 204 255 136 -->
<color name="Yellow" value="#FFFF00"/> <!-- 255 255 0 -->
<color name="DarkYellow" value="#EEEE66"/> <!-- 238 238 102 -->
<color name="Orange" value="#FFCC00"/> <!-- 255 204 0 -->
<color name="Blue" value="#99CCFF"/> <!-- 153 204 255 -->
<color name="Red" value="#DD2200"/> <!-- 221 34 0 -->
<color name="LightRed" value="#EE5533"/> <!-- 238 85 51 -->
<color name="BrightRed" value="#EE7766"/> <!-- 238 119 102 -->
<color name="Purple" value="#EE99FF"/> <!-- 238 153 255 -->
<color name="DeepPurple" value="#DD66EE"/> <!-- 221 102 238 -->
<color name="unknown" value="#FF88FF"/> <!-- 255 136 255 -->
<style name="text" foreground="White" background="GreenBlack"/>
<style name="selection" foreground="Black" background="Orange"/>
<style name="cursor" foreground="White"/>
<style name="current-line" background="Black"/>
<style name="line-numbers" foreground="Black" background="Grey"/>
<style name="right-margin" background="BrightGrey"/>
<style name="bracket-match" foreground="White" background="Red" bold="true"/>
<style name="search-match" foreground="Black" background="Blue"/>
<style name="def:comment" foreground="BrightGrey" background="GreenGrey" italic="true"/>
<style name="def:note" foreground="LightRed" bold="true" italic="false"/>
<style name="def:preprocessor" foreground="Purple"/>
<style name="def:error" foreground="Yellow" background="Red" bold="true"/>
<style name="def:underlined" underline="false"/>
<style name="def:decimal" foreground="Purple" bold="true"/>
<style name="def:floating-point" foreground="Purple" bold="true"/>
<style name="def:boolean" foreground="Purple" bold="true"/>
<style name="def:base-n-integer" foreground="Blue" bold="true"/>
<style name="def:string" foreground="Green"/>
<style name="def:special-char" foreground="BrightRed" bold="true"/>
<style name="def:identifier" foreground="Blue"/>
<style name="def:keyword" foreground="Orange" bold="true"/>
<!-- LCs specific -->
<style name="lcs:italic-keyword" foreground="Orange" italic="true"/>
<style name="lcs:bold-keyword" foreground="Orange" bold="true"/>
<style name="lcs:dimmed-keyword" foreground="Grey"/>
<style name="def:type" foreground="Orange"/>
<style name="def:statement" foreground="DarkYellow"/>
<style name="def:function" foreground="Blue"/>
<style name="def:shebang" foreground="BrightRed" bold="true"/>
<style name="def:builtin" foreground="Blue" italic="true"/>
<style name="def:constant" foreground="BrightRed" bold="true" italic="true"/>
<style name="def:special-constant" foreground="Blue" italic="true"/>
<style name="bracket-mismatch" background="unknown" italic="true"/>
<style name="def:doc-comment-element" background="unknown" italic="true"/>
<style name="def:complex" background="unknown" italic="true"/>
<style name="def:character" background="unknown" italic="true"/>
</style-scheme>
In other words I've added the style definitions
<!-- LCs specific -->
<style name="lcs:italic-keyword" foreground="Orange" italic="true"/>
<style name="lcs:bold-keyword" foreground="Orange" bold="true"/>
<style name="lcs:dimmed-keyword" foreground="Grey"/>
but it doesn't work.
Where can it be my fault?

Related

How to set themes, styles, colors etc. in a Xamarin, Android project so they won't be affected by Dark/Light mode?

My theme/color settings...
App.xaml:
<Application.Resources>
<Color x:Key="PageBackgroundColor">#1F1F1F</Color>
<Style TargetType="Entry">
<Setter Property="HorizontalOptions" Value="Fill" />
<Setter Property="TextColor" Value="Whitesmoke" />
<Setter Property="PlaceholderColor" Value="Red" />
<Setter Property="HorizontalTextAlignment" Value="Center" />
</Style>
<Style TargetType="Label">
<Setter Property="TextColor" Value="WhiteSmoke" />
</Style>
<Style TargetType="TimePicker">
<Setter Property="TextColor" Value="WhiteSmoke" />
</Style>
<Style TargetType="Picker">
<Setter Property="TextColor" Value="WhiteSmoke" />
<Setter Property="TitleColor" Value="Red" />
</Style>
</Application.Resources>
styles.xml:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
<item name="colorAccent">#ff0000</item>
</style>
<style name="MainTheme.Base" parent="Theme.AppCompat.Light">
<item name="android:timePickerDialogTheme">#style/MyTimePickerDialogStyle</item>
</style>
<style name="MyTimePickerDialogStyle" parent="#style/ThemeOverlay.AppCompat.Dialog.Alert">
<item name="colorControlActivated">#FF0000</item>
<item name="colorAccent">#000000</item>
<item name="android:textColorPrimary">#000000</item>
<item name="android:textColorSecondary">#000000</item>
</style>
</resources>
MainPage.xaml:
<ContentPage ...
BackgroundColor="{DynamicResource PageBackgroundColor}"
...>
...
<Button ... TextColor="#F5F5F5" BackgroundColor="#007F00" ... />
...
<Label ... BackgroundColor="#F5F5F5" ... />
My App is meant to be on a dark background regardless of the selected Dark/Light mode. Dark/Light mode should not affect any colours.
No colour problems with Light mode on Android 10.
With Dark mode:
The button Green (#008000) becomes lime, which renders the white text colour unreadable, so I had to change the Button BackgroundColor property from Green (#008000) to #007F00, which surprisingly works fine although the difference between the two colours is minimal
The label WhiteSmoke (#F5F5F5) becomes dark
If I change the <Setter Property="TextColor" Value="WhiteSmoke" /> to <Setter Property="BackgroundColorColor" Value="WhiteSmoke" />, the change will be applied only for light theme
No problems with buttons that have BackgroundColor set to Red (#FF0000)
Why on Earth the Dark mode is affecting only certain colours? I guess there are some settings that can override the Dark mode. Any suggestions?
EDIT: Is there a way to deactivate Dark mode?
How to set themes, styles, colors etc. so they won't be affected by Dark/Light mode?
EDIT2: Screenshots...
Light mode:
Dark mode:
EDIT3: It affects images, too.
I tried with two almost identical images with the only difference a red & green background. The rest of the background is trasparent. The word 'swipe' and the arrow are of #F5F5F5 colour, while the circle around the 'A' is #FFFFFF. The images are fresh from Photoshop:
Screenshots while on White / Dark mode:
___
As you can see the Dark mode affects only one of the two images similarly to the hex colors I mentioned before.
According to document, you can Set the current user theme:
The theme used by the application can be set with the
Application.UserAppTheme property, which is of type OSAppTheme,
regardless of which system theme is currently operational:
Application.Current.UserAppTheme = OSAppTheme.Dark;
You can also set same color under light/dark mode:
<Label Text="This text is green in light mode, and green in dark mode."
TextColor="{AppThemeBinding Light=Green, Dark=Green}" />

PhoneGap Build with OneSignal not working

I'm using PhoneGap Build with OneSignal but it is not working. It shows only the first alert message.
Here is the code:
https://github.com/claudiosw/ZumitApp/
And you can download the app here:
https://build.phonegap.com/apps/2193000/builds
Also pasting the code here:
File config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.zumitapp" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>ZumitApp</name>
<description>Tenha Mais Resultados</description>
<author email="claudiosw#" href="http://zumitapp.com/App">Claudio Shigueo Watanabe</author>
<preference name="phonegap-version" value="cli-6.3.0" />
<feature name="http://api.phonegap.com/1.0/device" />
<preference name="orientation" value="portrait" /> <!-- all: default means both landscape and portrait are enabled -->
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.camera" />
<gap:plugin name="org.apache.cordova.media-capture" />
<gap:plugin name="org.apache.cordova.file" />
<gap:plugin name="org.apache.cordova.file-transfer" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:plugin name="org.apache.cordova.contacts" />
<gap:plugin name="org.apache.cordova.geolocation" />
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.vibration" />
<gap:plugin name="org.apache.cordova.network-information" />
<!--gap:plugin name="com.simplec.plugins.localnotification" /-->
<!--plugin name="com.onesignal.plugins.onesignal" spec="1.5.0" source="pgb" /-->
<!--plugin name="com.onesignal.plugins.onesignal" spec="1.9.0" source="pgb" /-->
<gap:plugin name="onesignal-cordova-plugin-pgb-compat" source="npm" />
<gap:plugin name="cordova-plugin-googleplayservices" source="npm" />
<gap:plugin name="cordova-plugin-android-support-v4" source="npm" />
<!--gap:plugin name="onesignal-cordova-plugin" source="npm" /-->
<!-- Recommend the newest cli but requires cli-5.1.1+ and gradle for Android. -->
<!-- If the below settings are not compatible with your project set the "PGB ANT" version above. -->
<!--preference name="android-build-tool" value="gradle" /-->
<icon src="icon.png" />
<icon src="res/icons/ios/Icon.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icons/ios/Icon#2x.png" gap:platform="ios" width="114" height="114" />
<icon src="res/icons/ios/Icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icons/ios/Icon-72#2x.png" gap:platform="ios" width="144" height="144" />
<icon src="res/icons/android/drawable-ldpi/Icon.png" gap:platform="android" gap:density="ldpi" />
<icon src="res/icons/android/drawable-mdpi/Icon.png" gap:platform="android" gap:density="mdpi" />
<icon src="res/icons/android/drawable-hdpi/Icon.png" gap:platform="android" gap:density="hdpi" />
<icon src="res/icons/android/drawable-xdpi/Icon.png" gap:platform="android" gap:density="xhdpi" />
<gap:splash src="ZumitApp_grande.jpg" />
<gap:splash src="res/screen/android/drawable-ldpi/splash.png" gap:platform="android" gap:density="ldpi" />
<gap:splash src="res/screen/android/drawable-mdpi/splash.png" gap:platform="android" gap:density="mdpi" />
<gap:splash src="res/screen/android/drawable-hdpi/splash.png" gap:platform="android" gap:density="hdpi" />
<gap:splash src="res/screen/android/drawable-xdpi/splash.png" gap:platform="android" gap:density="xhdpi" />
<gap:splash src="res/screen/ios/Default.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="res/screen/ios/Default#2x.png" gap:platform="ios" width="680" height="960" />
<gap:splash src="res/screen/ios/Deafult-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<preference name="stay-in-webview" value="true" />
<content src="index.html" />
<access origin="*" subdomains="true" />
<allow-navigation href="*" />
</widget>
File index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ZumitApp</title>
<script src="phonegap.js"></script>
<script src="jquery.min.js"></script>
<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
// Now safe to use the Codova API
// Enable to debug issues.
alert("teste0");
window.plugins.OneSignal.setLogLevel({logLevel: 4, visualLevel: 4});
alert("teste1");
var notificationOpenedCallback = function(jsonData) {
console.log('didReceiveRemoteNotificationCallBack: ' + JSON.stringify(jsonData));
};
alert("teste2");
window.plugins.OneSignal.init("22a70849-091e-4eca-8b5b-e7fc5821f95b",
{googleProjectNumber: "428050097085"},
notificationOpenedCallback);
alert("teste3");
// Show an alert box if a notification comes in when the user is in your app.
window.plugins.OneSignal.enableInAppAlertNotification(true);
//alert("teste4");
window.location="http://zumitapp.com/App";
//alert("teste5");
}
</script>
</head>
<body>
<header class="bar bar-nav">
<h1 class="title">Boas-vindas ao ZumitApp</h1>
</header>
<h2>Aguarde. Carregando...</h2>
</body>
</html>
I have tried to debug but it didn't worked out. Maybe it is because my smartphone is old (LG-P705) or the desktop (Windows Vista).
Thanks you very much!

SSRS: "Index was out of range" in VS2010 but not when report is deployed

I have a simple report that keeps throwing the "index was out of range" error when i try to preview the report in VS. when i deploy the report to SSRS, it works perfectly. I've thoroughly looked for an answer already but none of them seem to apply to my situation.
Error: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index.
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Textbox Name="textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sales Report</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontSize>20pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>SteelBlue</Color>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox1</rd:DefaultName>
<Height>0.36in</Height>
<Width>7.5in</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Tablix Name="Tablix1">
<TablixCorner>
<TablixCornerRows>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Textbox Name="Textbox5">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sales Person</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow>
</TablixCornerRows>
</TablixCorner>
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>1.35417in</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.25in</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox4">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=SUM(Fields!Amount.Value * Fields!ExchangeRate.Value)</Value>
<Style>
<Format>0.##</Format>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="Year">
<GroupExpressions>
<GroupExpression>=Fields!Year.Value</GroupExpression>
<GroupExpression>=Fields!Month.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!Year.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader>
<Size>0.28125in</Size>
<CellContents>
<Textbox Name="Year">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=MonthName(Fields!Month.Value, True) & " " & Fields!Year.Value</Value>
<Style>
<Format>0.##</Format>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Year</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="RowGroup">
<GroupExpressions>
<GroupExpression>=Fields!SalesPerson.Value</GroupExpression>
</GroupExpressions>
</Group>
<TablixHeader>
<Size>1.26042in</Size>
<CellContents>
<Textbox Name="SalesPerson">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!SalesPerson.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>SalesPerson</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>SalesLines</DataSetName>
<Top>0.42944in</Top>
<Height>0.53125in</Height>
<Width>2.61459in</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Tablix>
</ReportItems>
<Height>0.96069in</Height>
<Style />
</Body>
<Width>8in</Width>
<Page>
<PageHeight>8.5in</PageHeight>
<PageWidth>11in</PageWidth>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="Reporting">
<DataSourceReference>Reporting</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>aab21363-546f-4445-8789-9975de5d56bf</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="SalesLines">
<Query>
<DataSourceName>Reporting</DataSourceName>
<CommandText>SELECT SalesPerson, exchangeRate, Amount, Year(PostingDate) AS [Year], Month(PostingDate) AS [Month] FROM [dbo].[ReportingSalesLines]
WHERE PostingDate BETWEEN '2012-10-01' AND '2013-09-30'</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
<Fields>
<Field Name="ExchangeRate">
<DataField>exchangeRate</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="SalesPerson">
<DataField>SalesPerson</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Amount">
<DataField>Amount</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="Year">
<DataField>Year</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="Month">
<DataField>Month</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
<Language>en-US</Language>
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>7d9922c6-e37f-4826-b58e-bd8b9427da1c</rd:ReportID>
</Report>
I've seen this happen when a DataSet has changed its definition but the actual cached data stored by Visual Studio (i.e. the *.rdl.data file) still has data based on the old Dataset definition; this is in internal error caused by the mismatch between the data the report is expecting and what has been cached.
To resolve this, delete any *.rdl.data files from the report solution then try previewing again.
This is why the report works fine when deployed - the report is generating new data when run so there is no mismatch with any cached data.
A Rebuild Solution command in VS may also be required.
I have had this happen several times for different reasons but recently simply unchecking 'keep together on one page if possible' under the page break options for a very large tablix fixed it.
This happened with me as well and I ended up wasting few hours on it. Here is one of the really helpful links I found out. In my case problem disappeared when I restarted my PC
In case anyone else comes across this problem, I had the same problem, but a wider search of the internet suggested it may be a whitespace issue in the report design (I was getting the same problem with the report published to Sharepoint, which I believe doesn't cache the data to a .rdl.data file.
So the solution that appears to have worked for me is to just mess around with the whitespace. My report layout uses tables with nested tables, so I tidied up empty rows, fixed row heights, and closed up gaps between separate tables. I also reduced the sizes of the header and footer.
I'm still not sure exactly which of these actions cured it, but the general tidy-up and removal of unnecessary whitespace appeared to do the trick for me
Had the same problem, but none of the above fixed it for me.
The issue for me was caused by a parameter that was populated by a dataset and its default value wasn't correctly being set. The default was 'All' which in my case looked like this:
\[Sender Analytical Structure\].\[Business Unit Name\].&\[All\]

How do i display an image instead of text for a ? on an xml form for ODK collect?

Since odk collect uses utf-8, the language that i would like the questions of the form to be in would be displayed one character at a time vs. conjoined. instead of displaying text for the question, i want the question to display an image which will be on the question text formatted properly. Is there anyway this can be done, are there any good tutorials or information out there that can help me accomplish this?
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa">
<h:head>
<h:title>firstform</h:title>
<model>
<instance>
<data id="build_firstform_1375472795">
<meta>
<instanceID/>
</meta>
<field_name/>
<field_age/>
<field_location/>
</data>
</instance>
<itext>
<translation lang="eng">
<text id="/data/field_name:label">
<value>**<img src="Q1.png" >**</value>
</text>
<text id="/data/field_name:hint">
<value>What is your name (last, first)?</value>
</text>
the bolded code did not work.
<?xml version="1.0" encoding="UTF-8"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:jr="http://openrosa.org/javarosa" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><h:head xmlns="">
<h:title>images</h:title><model>
<instance>
<data id="1">
<some_text/>
<image_test/>
</data>
</instance>
<itext>
<translation lang="eng">
<text id="/data/image_test:label">
<value>picture test</value>
</text>
<text id="/data/image_test:a">
<value form="image">jr://images/p1.jpg</value>
</text>
<text id="/data/image_test:b">
<value form="image">jr://images/p2.jpg</value>
</text>
</translation>
</itext>
<bind nodeset="/data/image_test" type="select1"/>
</model>
</h:head>
<h:body xmlns="">
<select1 ref="/data/image_test">
<label ref="jr:itext('/data/image_test:label')"/>
<item>
<label ref="jr:itext('/data/image_test:a')"/>
<value>a</value>
</item>
<item>
<label ref="jr:itext('/data/image_test:b')"/>
<value>b</value>
</item>
<item>
<label ref="jr:itext('/data/image_test:c')"/>
<value>c</value>
</item>
</select1>
</h:body>
</h:html>

Netbeans separted TopComponent in editor mode ignores minimum size

In my Netbeans 7.11 application I have an additional separated topcomponent in an editor mode that does not respect the minimum size that I specified using the GUI-builder.
The option for "Respect Minimum Size When Resizing Windows" in the Window System tab of the branding is checked.
My .wsmode file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mode PUBLIC
"-//NetBeans//DTD Mode Properties 2.0//EN"
"http://www.netbeans.org/dtds/mode-properties2_0.dtd">
<mode version="2.0">
<name unique="myTopComponent" />
<kind type="view" />
<state type="separated" />
<constraints>
<path orientation="horizontal" number="0" weight="1" />
<path orientation="vertical" number="0" weight="1" />
</constraints>
<bounds x="150" y="150" width="1200" height="670" />
<frame state="0"/>
<empty-behavior permanent="true" />
</mode>
What am I doing wrong or what am I missing?

Resources