Make a Border Appear on only the Last Row of a Tablix in Visual Studio - visual-studio-2012

I have a Tablix table object that is grouped by column invoiceNumber. The number of rows in the table is not static. I want a bottom border only on the very last row of the table (so no borders between the middle rows.)
On the last cell I have a custom function in the Border property:
=IIF(ROWNUMBER("invoiceNumber") = COUNT(Fields!invoiceTotal.Value, "invoiceNumber"), "Solid", "None")
<TablixCell>
<CellContents>
<Textbox Name="Textbox41">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!invoiceTotal.Value</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>=IIF(ROWNUMBER("invoiceNumber") = COUNT(Fields!invoiceTotal.Value, "invoiceNumber"), "Solid", "None")</Style>
</Border>
<TopBorder>
<Style>None</Style>
</TopBorder>
<BottomBorder>
<Style>None</Style>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
But the system still puts a border under every cell. Should I place the function somewhere else?
Thank you!

Related

Windows 10 Universal app flyout, how to remove scrollbars?

I've got a Flyout view with a TextBlock in it. The text block has more than one line's amount of text and I'd like it to wrap to the next line like it usually does, but when used in a Flyout it scrolls off the screen... How do you disable the scroll view in a Flyout?
Flyout XAML:
...
<AppBarButton.Flyout>
<Flyout Placement="Full">
<local:MyView/>
</Flyout>
</AppBarButton.Flyout>
...
My View XAML:
<UserControl ...>
<Grid>
...
<TextBlock Text="Loading..." Style="{ThemeResource SubtitleTextBlockStyle}" Margin="10,0,10,20" Grid.Row="1" TextWrapping="Wrap"/>
</Grid>
</UserControl>
It comes out like this:
To set properties of Flyout like width or scrollbar's visibility, we need to customize the style of FlyoutPresenter. Here is how I do it:
<Flyout Placement="Full" >
<Flyout.FlyoutPresenterStyle>
<Style TargetType="FlyoutPresenter">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"></Setter>
</Style>
</Flyout.FlyoutPresenterStyle>
<Grid>
<TextBlock Text="This is an informational flyout. Click outside to dismiss.xxxjfdalisfsadpfuaspdfoia" Grid.Row="1" TextWrapping="Wrap"/>
</Grid>
</Flyout>
Directly copy the into your Flyout element will meet your requirement.
You can
1) make a maxwidth to your flyout
or
2) try this :
<Flyout Placement="full" >
<Grid ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
........
</Grid>
</Flyout>
best of luck !

how to take value of tapped column/bar of winrt xaml column series chart using c#

how to take value of tapped column/bar of winrt xaml column series chart.
i want to open other chart using the value of each bar..
my code is:
<Charting:Chart x:Name="chart" Title="My Performance" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0" Width="895" Height="548" Foreground="Black" FontSize="10" >
<Charting:ColumnSeries x:Name="mychart" Padding="10" BorderThickness="5" BorderBrush="#FF233083" Background="Yellow" IndependentValuePath="TestCode" DependentValuePath="Percentage" IsSelectionEnabled="True" Margin="0,0,0,4" Tapped="mychart_Tapped" >
i didn't get values from selecteditem thanks........

How to make an auto expand div / span, like a table?

So, this is what I want:
<span>Field 1</span><span>Field 2</span><span>Field 3</span><br />
<span>Content A1</span><span>Content B1</span><span>Content C1</span><br />
<span>Content A2</span><span>Content B2</span><span>Content C2</span><br />
<span>Content A3</span><span>Content B3</span><span>Content C3</span><br />
Now I want that Field1 has that width as the biggest Constant A1 / Constant A2 / Constant A3 have. In other words, each column auto expand to the maximum width of content. Just like in tables. Is it doable?
you can use this css :
span{
display: table-cell;
}
http://www.w3schools.com/cssref/pr_class_display.asp

How do specify a width percentage in JavaFX 2 using FXML?

I am looking for a way to say set a maxWidth size to 80% in FXML.
Much like in web development.
<VBox fx:id="testVB" prefWidth="600">
But this does not:
<VBox fx:id="testVB" prefWidth="80%">
I know that in Straight JavaFX2 non-fxml you can create insets? What is the best way to do this outside of code in FMXL?
Thanks!
Riley
I'm not sure you can. You need to use the GridPane layout component. In this component, you can specify rows and columns constraints, and in these constraints you can specify a width as a percentage. For example:
<GridPane>
<children>
<TitledPane text="testGridPane" GridPane.columnIndex="0" GridPane.rowIndex="0" />
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="80.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="20.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
</GridPane>
This code defines a GridPane with a first column with a width of 80%. The TitledPane is set in the first cell of the first column of this GridPane, and can (because you need to be sure that the width constraints of the TitledPane match your needs) occupy 80% of the width of the GridPane.
Please note that I removed all information not relevant to your question. By the way, Oracle's Scene Builder tool is very useful to define complex FXML layout.
It seems like many answers have already been provided and they should work. However, there is a way to set percentages:
<fx:define>
<Screen fx:factory="getPrimary" fx:id="screen" />
</fx:define>
This would help you detect the dimensions of the current screen, the application is being displayed on. Now that we have the display dimensions, we can play with it in FXML as follows:
<HBox fx:id="hroot" prefHeight="${screen.visualBounds.height}" prefWidth="${screen.visualBounds.width}"> Your FXML elements inside the root... </HBox>
Note that I use visualBounds, since this would get me the available space on the screen, since I don't want an overlap with the taskbar in Windows for example. For fullscreen applications, you would just use 'bounds'.
Now, to come to your point of using percentages, you can actually play with the value of the prefheight and prefWidth. You can put calculations inside the ${}.
Optionally:
If you want to have all your elements use relative sizes, just refer to them, using their ID and width or height property, and make your calculation.
<VBox fx:id="VBSidebar" prefWidth="${hroot.width*0.15}" prefHeight="${hroot.height}"> more elements.. </VBox>
Hope this helps!
You can simulate it - basic example that simulates 50% for two cols in an HBox. You can add dummy panes to get thirds, etc.
HBox {
VBox {
static hgrow : "ALWAYS",
Label {
text : "Privacy",
alignment : "CENTER",
styleClass : ["h2", "heading"]
}
},
VBox {
static hgrow : "ALWAYS",
Label {
text : "Messages",
alignment : "CENTER",
styleClass : ["h2", "heading"]
},
Label {text:""}
}
}

Alternating row color for JasperReports

I want to get color to alternate for the rows in a JasperReports subreport. I have all rows with the same background color but I want it to alternate. Can this be done?
Yes you can set up a style inside the JRXML file like this:
<style name="Zebra" mode="Transparent">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 1]]></conditionExpression>
<style backcolor="#CAC5BB"/>
</conditionalStyle>
</style>
and add it to your report elements like this:
<reportElement style="Zebra" mode="Opaque" x="1" y="1" width="554" height="20"/>
You cannot add conditional styles to style template files (e.g., .jrtx files).
If you are not using "styles", you can have a static text field (with no text) or a rectangle with the background color that you need, overlapping the textfield with data and set the printWhenExpression to $V{report_COUNT}%2 == 1 OR $V{report_COUNT}%2 == 0

Resources