I'm using 2014.1 Reporting component and have a question: I have standard colors in resource dictionary's for the WPF project. I'd like some of the colors to be reflected in the reports too. We're keeping standard settings in resource dictionaries, with the following as 1 excerpt
<SolidColorBrush x:Key="WindowBackgroundColor" Color="#FF1D1103" />
With the properties of an object on the report, is there a way I can reference a resource dictionary staticresource value? So far, I haven't seen a way that's built in.
Thanks
Hello jrelyea,
The only things you can reference from inside a report are the properties provided by the datasource and the report parameters. You have the ability to bind properties such as Background and Foreground to the datasource/parameters so you can control them from the outside. But it's not possible to directly access resources inside a resource dictionary. You'd have to create a set of report parameters that would control the colors and bind to them using the DataBinding option in the properties window (there will be a plus button next to Background that you can click to expand more settings, DataBinding is there). Then before your report loads, set the parameters in report viewer. http://help.infragistics.com/doc/Reporting/2014.1/CLR4.0/?page=How_to_Work_with_Parameters.html
That sounds great!!! Thanks- I'll follow your suggestions. So far, the report designer works really well.
Hi jrelyea,
I'm glad you're liking it! Just let me know if you have any further questions on this matter.
Does Infragistics have it documented anywhere that when using an Ojbect Data Source, the class that is used can not have a parameterized constructor?
I have a class with a public method returning IEnumerabke, as your help files show. Add the following as the only Constructor and the class will show no public methods to pic from. As soon as I remove the parameter in the signature the public method is listed again in the Data Source Configuration Wizard. This is 100% reproducible.
Breaks the wizard:
public Class2(string Whatever)
{
//there is no code while troubleshooting
}
Does not break the wizard:
public Class2()
Shortened class:
public class Class2
//insert either constructor above
public IEnumerable blahblahblah()
//populate a collection for the report
//this method only shows up with a parameterless constructor.
//it never shows up when the constructor has a parameter.
While I don't think it's mentioned in the documentation, one of our Reporting engineers explains this here: http://www.infragistics.com/community/forums/t/69895.aspx