Problem creating subreport for Javabeans datasource in iReport 3.7.0 - javabeans

I am using iReport 3.7.0. The subreport wizard screen do not show my any Javabean class to select. Please let me know if anybody has encountered this problem and got a solution.
Creation of PersonDatasource:
Source code for the Javabeans avialable at
http://www.brucephillips.name/jasperreports/examplesource.zip
Thanks
Nayn

I created report separatly and added that as a subreport in the main report. I had to tweek the jrxml a little bit and DONE. Subreport with Javabeans works fine now.
<subreport>
<reportElement x="100" y="20" width="355" height="20"/>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{phones})]]>
</dataSourceExpression>
<subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "report_sub.jasper"]]>
</subreportExpression>
</subreport>

Related

WinUI HyperlinkButton is not displayed underlined

I am using the WinUI technology.
I would like to display a HyperlinkButton in my XAML.
The problem is that the HyperlinkButton is not displayed underlined.
But according to this documentation this should be the case / the default behavior: MSDN - HyperlinkButton Class
Here is what I have:
<HyperlinkButton Content="Example" Click="HyperlinkButton_Click" />
Neither I have any style that would affect how the button is displayed nor did I change a template.
What am I missing?
Thank you.
UPDATE
The problem exists in version 1.0.1 (march 2022) of Windows App SDK as well as in version 1.0.0 (november 2021), see windows-app-sdk/downloads
The template of the HyperlinkButton has changed in later versions of the Windows App SDK (1.0.0+) but apparently the documentation hasn't been updated.
You should still be able to use a Hyperlink element to get an underlined link though:
<TextBlock>
<Hyperlink Click="Hyperlink_Click">Example</Hyperlink>
</TextBlock>
HyperlinkButton missing underlined text is almost confirmed a bug.
As a workaround to add underline on the button text string, you can try the following way to display something with TextDecorations property as "Underline".
<HyperlinkButton Click="HyperlinkButton_Click">
<TextBlock Text="www.microsoft.com" TextDecorations="Underline" />
</HyperlinkButton>
Edit:
Finally, according to the issue,
The documentation needs updating to reflect the updated design for
HyperlinkButton first introduced in WinUI 2.6, see the WinUI Figma
toolkit for more info.

How do I customize the content and location of a tooltip using Syncfusion in Xamarin?

I'm setting up a stacking column chart in XAML using Syncfusion for Xamarin in Visual Studio 2017. I've tried adding custom text according to the example here, but I run into an exception when the tooltip is activated. Here's the code I'm using:
<chart:SfChart.Series>
<chart:StackingColumnSeries EnableTooltip="True"
Width="0.5"
ItemsSource="{Binding TankLevels}"
XBindingPath="Name" YBindingPath="Level1">
<chart:StackingColumnSeries.TooltipTemplate>
<DataTemplate>
<StackLayout>
<Label Text="test"></Label>
</StackLayout>
</DataTemplate>
</chart:StackingColumnSeries.TooltipTemplate>
<chart:BarSeries.ColorModel>
<chart:ChartColorModel Palette="Custom" CustomBrushes="{Binding WaterColor}">
</chart:ChartColorModel>
</chart:BarSeries.ColorModel>
</chart:StackingColumnSeries>
I have analyzed your code snippet and prepared a sample based on it, and the sample can be downloaded from the link below.
Sample: 215585
I am afraid I was not able to reproduce the reported issue, it is working fine. Can you please provide more information like a stack trace on the exception?
Thanks,
Michael
Note: I work for Syncfusion
The issue was that I was using an outdated version of Syncfusion's Xamarin Controls. I didn't have any more issues after updating to the newest version.

Conditional XAML causes XBF generator error

I am trying to set the Icon property of MenuFlyoutItem on the UWP. As this is only available in contract version 4, I wanted to use conditional XAML statements in form of the IsApiContractPresent statement. Doing this, I came up with this code:
<MenuFlyout>
<MenuFlyoutItem Text="Open">
<contract4Present:MenuFlyoutItem.Icon>
<FontIcon Glyph=""/>
</contract4Present:MenuFlyoutItem.Icon>
</MenuFlyoutItem>
</MenuFlyout>
and added this line in the definition of my page:
xmlns:contract4Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
Sadly, Visual Studio is now not able to compile the project anymore, with this error message:
The XAML Binary Format (XBF) generator reported syntax error '0x09C4' : Property Not Found
Strangely, the same errors comes up, when I use the minimal example given in the documentation
<TextBlock contract5NotPresent:Text="Hello, World"
contract5Present:Text="Hello, Fall Creators Update"/>
How can I solve this error? Or is this even a bug of Visual Studio?
Apparently, this functions is only available for Minimum Build versions > 15063. Otherwise, you must use version adaptive code, and not XAML.

Xcode - Storyboard views size and position modified when opening

I noticed something very annoying with Xcode: I have some storyboards for which certain views size & position are systematically updated when I open them. This is annoying especially when working with a team.
Here how I produce this behavior:
I pull the app from a git repository
Open an affected storyboard doing no modification at all
git diff already tells me differences like
$ git diff
...
- <rect key="frame" x="576.99999828648401" y="11" width="170" height="20"/>
+ <rect key="frame" x="577" y="11" width="170" height="20"/>
...
- <rect key="frame" x="518.99999921768904" y="7" width="228" height="30"/>
+ <rect key="frame" x="519" y="7" width="227.99999841338541" height="30"/>
Is this happening to anybody else ?
The question is:
Why is my storyboard getting modified when I'm only opening it, and how to prevent it ?
Notice:
I realized this seems to happen only on <rect /> contained into labels & textFields
Xcode saves the storyboard layout information in an XML file (.storyboard). So any changes on the storyboard will be reflecected in that XML. Especially if you work with teammates this information might change regularly. You can try it out by moving around some items (don't change anything else) and after that start a diff with your git repository. You should see again a change in the XML. You could ignore the storyboard file in your git checkout. But this wouldn't make much sense as your teammates may have added new items to the storyboard.
Maybe this helps as well: [Xcode changes unmodified storyboard and XIB files
If I understand the first answer correct other changes might also trigger a change on the storyboard XML file.
regards
Thomas
There is a bug with storyboards that nobody's looking into it seems.
Try to split the storyboards as much as possible to reduce the chances of merge conflict and ease its eventual resolution. It can also escalate if you are using Xcode on an external display with a different resolution.
This issue can only be reduced but never solved.

Can't access font resource in Silverlight class library

I have a reasonably large Silveright 3.0 project on the go, and I'm having issues accessing a couple of custom font resources from within one of the assemblies.
I've got a working test solution where I have added a custom font as a resource, and can access it fine from XAML using:
<TextBlock Text="Test" FontFamily="FontName.ttf#Font Name" />
The test solution consists of the TestProject.Application and the TestProject.Application.Web projects, with all the fun and games obviously in the TestProject.Application project
However, when I try this in my main solution, the fonts refuse to show in the correct type face (instead showing in the default font). There's no difference in the way the font has been added to project between the test solution and the main solution, and the XAML is identical.
However, there is a solution layout difference. In the main solution, as well as having a MainApp.Application and MainApp.Application.Web project, I also have a MainApp.Application.ViewModel project and a MainApp.Application.Views project, and the problem piece of XAML is the in the MainApp.Application.Views project (not the .Application project like the test solution).
I've tried putting the font into either the .Application or .Application.Views project, tried changing the Build Action to Content, Embedded Resource etc, all to no avail.
So, is there an issue accessing font resources from a child assembly that I don't know about, or has anyone successfully done this?
My long term need will be to have the valid custom fonts being stored as resources in a separate .Application.FontLibrary assembly that will be on-demand downloaded and cached, and the XAML controls in the .Application.Views project will need to reference this FontLibrary assembly to get the valid fonts. I've also tried xcreating this separate font library assembly, and I can't seem to get the fonts from the second assembly.
As some additional information, I've also tried the following font referencing approaches:
<TextBlock Text="Test" FontFamily="/FontName.ttf#Font Name" />
<TextBlock Text="Test" FontFamily="pack:application,,,/FontName.ttf#Font Name" />
<TextBlock Text="Test" FontFamily="pack:application,,,/MainApp.Application.Views;/FontName.ttf#Font Name" />
<TextBlock Text="Test" FontFamily="pack:application,,,/MainApp.Application.Views;component/FontName.ttf#Font Name" />
And a few similar variants with different assembly references/sub directories/random semi colons.
And so far nothing works... anyone struck this (and preferably solved it)?
This code works for me:
... FontFamily="/(DLL);Component/(DIR-optional)/(Font_file)#(Font_name)"/> ...