h4d3s wrote:I want to generate an asp.net 2.0 report by using a previously generated data table or a given sql statement.
I added to a web form the following controls : sqldatasource, a stiwebviewer and a stireportweb.
I configuered the sqldatasource, made a report in the designer and then in the page_load I called the regdata method and tried to
assign the reportweb object to the Report property of the webviewer. Here I got an error : the cannot cast stireportweb to stireport.
Please try to use the following:
Code: Select all
StiWebViewer1.Report = StiReportWeb1.GetReport();
h4d3s wrote:Is there a possibility to generate a chart for each group in a "group by" ?
If you have an SQL - based data, then you may add a master query for
your data (to provide 1 master row for each group.) Then you need to
create a relation between this master DataSource and the detail
DataSource (result - your data without grouping).
After that you need to create a Master-Detail report. Example of
creating such reports is in the Demo.exe Application which is provided
with the standard delivery. Report name is Master-Detail.
On the DataBand which will be the master you need to put your chart.
For the DataBand which will be the detail you have to set ResetDataSource property to true.
Also you may use "Data from other DataSource" DataSource instead of
the SQL-based DataSource which I was talking above. In that case you have to
set Report.CacheAllData property to true. In the DataSource of this
type you may to group Data as you need and do not use SQL statements for this.
If you need any help, please fill free to contact us (sample project
or *.mrt report will be greatly appreciated from your side and helps to understand each other better). You may send it to

for analysis.
Thank you.