I have a report that has several SqlDataSources. Viewing the Report XML, the markup looks like the following:
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
Report
DataSourceName
=
"This is my report"
Width
=
"10.0000012715658in"
Name
=
"Detailed Report"
xmlns
=
"http://schemas.telerik.com/reporting/2012/4.2"
>
<
DataSources
>
<
SqlDataSource
QueryDesignerState
=
"null"
ConnectionString
=
"connection_string_here"
ProviderName
=
"System.Data.OracleClient"
SelectCommand
=
"select statement goes here"
Name
=
"a name goes here1"
>
<
Parameters
>
<
SqlDataSourceParameter
DbType
=
"String"
Name
=
"Work_Week"
/>
<
SqlDataSourceParameter
DbType
=
"String"
Name
=
"name"
/>
</
Parameters
>
</
SqlDataSource
>
<
SqlDataSource
QueryDesignerState
=
"null"
ConnectionString
=
"connection_string_here"
ProviderName
=
"System.Data.OracleClient"
SelectCommand
=
"select statement goes here"
Name
=
"a name goes here2"
/>
<
SqlDataSource
QueryDesignerState
=
"null"
ConnectionString
=
"connection_string_here"
ProviderName
=
"System.Data.OracleClient"
SelectCommand
=
"select statement goes here"
Name
=
"a name goes here3"
/>
</
DataSources
>
<
Items
>
</
Items
>
<
PageSettings
PaperKind
=
"Letter"
Landscape
=
"True"
ColumnCount
=
"1"
ColumnSpacing
=
"0in"
ContinuousPaper
=
"False"
>
</
PageSettings
>
<
StyleSheet
>
<
Filters
>
</
Filters
>
<
Sortings
>
</
Sortings
>
<
Groups
>
</
Groups
>
</
Report
>
The problem is when I am try to use this code to change the connection string, it only appears to change the string for the <Report> tag. The 3 SqlDataSources appear to be private members of the object when I look at it while debugging and those connection strings are not modified by the code. I need those modified by code. The only way I have found to do this is to treat the XML as regular XML and replace those node's attributes with the proper strings instead of using the Telerik class properties/methods. This doesn't seem right, so I assume there is a way to set these connection strings properly.
I have a report that gets created dynamically. The report houses a Line Graph. The number of Line Series for this Graph can only be determined at run-time. I am able to add the Line Series to the graph dynamically, however, all the values in the LineGraph are same. Can you tell me how can I create a series and set the 'Y' value of the LineSeries?
In case of Telerik Web UI LineSeries, I can create a CategorySeriesItem, assign it values and then add it to LineSeries. However, no such facility seem to exist for Telerik Reporting LineSeries.
Here is my Reporting Code after InitializeComponent().
foreach
(var obj
in
MyList)
{
Telerik.Reporting.LineSeries ls =
new
Telerik.Reporting.LineSeries();
ls.Name = obj.Name;
...
...
foreach
(var subObj
in
obj)
{
// How do I assign a series of values such as {100,105,109,..} to ls.Y ????
}
graph1.Series.Add(ls);
}
I want to inject an interface into my Report instance, using my IOC container.
This interface will be used by the report to get data,
ex:
IQueryHandler<GetMyReportQuery, IEnumerable<MyReportData>> _queryHandler = <injected instance>.
IEnumerable<MyReportData> data = _queryHandler.Handle(new GetMyReportQuery {
param1 = <param1 enterred by user>,
param2 = <param2 enterred by user>,
});
I've seen somewhere suggested to use a custom report resolver, and instantiate an InstanceReportSource within, but this is no use as parameters are not available in the custom report resolver.
I've seen also suggested to use an ObjectDataSource, but it doesn't work as it needs a parameter less constructor to instantiate the business object, which prevent me from injecting my dependencies in the constructor.
So I'm a bit clueless how are we supposed inject our dependencies with Telerik reporting.
Please advise, thanks.
Hi all gurus,
I'm using for the first time ASP.NET ReportViewer in a Web Application. Things work fine, but the visualization of the viewer is screwed up. I walked thru several complaints of the same flavour, and I see my web.config is set up correctly (if it were not, and I tried changing it, visualizazion of the report is not viewable on my reportviewer page). Actually, when I surf thru my Pc (Firefox and Chrome) things are worse than with my smartphone. Report is generated and viewed the right way, but buttons which are virtually unrecognizable (i.e. unfocused and much bigger than the right way).
Any clue? I'd be very grateful if someone could help me anyway.
Saverio Tedeschi
web.config relevant rows:
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Telerik.ReportViewer.WebForms, Version=7.2.13.1016, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE" />
<add assembly="Telerik.Reporting, Version=7.2.13.1016, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE" />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
</compilation>
...
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=7.2.13.1016, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode" />
</handlers>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
Hi,
I have relational data in State & City format. Using reports parameters I see these issues.
(1) I can not have parameter having "ALL" in state parameter as selection and based on that cities selected automatically.. if any coding needed I dont know and not interested.
(2) I can not have only single State selection as I must select filtered city or cities to send it to report filter to get data only for the city.. I do not want customer to select multiple states.. as of no use in my case
so here is what I am looking..
By default report launch will ALL data
(1) one parameter for state (combo box) where single selection will be done and based on it applied filter will work on the report data
(2) have two parameters for state (single selection combo box) and City (single selection combo box)..based on selected state.. all cities will be listed and user chooses single city and that will work on different filter ..
is this possible at all? I mean independent parameters working on report data using independent filters?
Regards
What determines the order when multiple items are docked inside a container?
For example, if I I have 3 items docked to the top of the container, how do I move one item below the other?