Telerik Forums
Reporting Forum
2 answers
443 views
I just updated one of my smaller reporting projects, containing 32 reports, with the latest Q2 2012 code.  Several of the reports contain sub reports.  I am, as of Q2 2012, unable to directly set the data source property.

In prior versions of the code I would do something like:

List<BusinessObject> iData = new List<BusinessObject>;
List<BusinessObject2> iSubData = new List<BusinessObject2>;

Report r = new Report();
r.DataSource = iData;
SubReport sr = (SubReport)r.Items.Find("subreportname", true)[0];
if (sr != null) {
     sr.ReportSource.DataSource = iSubData;
}


Under Q2 it does not seem to be possible to directly set the datasource.  All the instructions say "InstanceReportSource" however I cannot see how to use this with a sub report.  Can someone tell me what I am missing?  The online docs seem to imply I must use a need datasource event.  That would require a complete redesign of my "generic" report logic.

SabatonRocks
Top achievements
Rank 1
 answered on 19 Jun 2012
3 answers
280 views

Folks, I am using Telerik Reporting Q1 2012 for Web (C#). I am new to Telerik Reporting.

Attached is screen shot of my Report Catalog. How do I change Report Name appearance order? I would like to see Report name appear in following order (Horizontal - Left to Right) not like how they appear in attached screen shot order.

1) Client Master Referrals 2) Client Master Intakes 3) Client Master No Show Cancellations

Right now when I create a new report, I do not know how to change the order appearance in Report Catalog.

Also I would like to know how to Change Report Name Label in Report Catalog. For Example: My actual name in Report #1 is ClientMasterReferrals.cs but I would like the label to be as Client Master Referrals or BHS Client Master Referrals. Quick question is can my report label be anything regardless of my actual report name or the Label name will always be inherited from actual report name?

Since I am beginner to Telerik Reporting, I just copied existing Telerik Report Catalog from Telerik Demo to my project but I am stuck with how to change the report name appearance order as well how to change the report name label.  

Any guidance will be appreciated.

Thanks

gc_0620



Steve
Telerik team
 answered on 19 Jun 2012
2 answers
147 views
I want the sql query in the sqldatasource of my report to be executed in two different ways

if (parameter =1)
{

}

else
{

}

How can i do this programmatically....ThankYou in advance
akpaga akpaga
Top achievements
Rank 1
 answered on 19 Jun 2012
3 answers
482 views

Hi,

I have a crosstab and would like to hide a Row Group depending on a Parameter value. I need to hide the complete Row, is this possible? And second I have the same problem with a column, depending on a parameter value I would like to collapse a column. I’ve tried setting the visibility’s which works everywhere on the report except in the crosstab. Can this be accomplished with a crosstab?

Thank you very much.

Wayne

Steve
Telerik team
 answered on 19 Jun 2012
0 answers
133 views
Hi

I have created my project using the Q1 Trial API's, but now that I have bought the Q2 2012 license, some of the code is not working.

EDIT: I have got it working, two things, you need to switch to the Telerik ReportXMLSerializer and use a IgnoreWhitespace setting in the XMLReader.

Example, before in Q1 2012:
string reportPath = Server.MapPath("./reports") + @"\reportClients.trdx";
using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(reportPath))
{
    System.Xml.Serialization.XmlSerializer xmlSerializer = new System.Xml.Serialization.XmlSerializer(typeof(Telerik.Reporting.Report));
  
    Telerik.Reporting.Report clientReport = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);
    Report report = new Report();
  
    clientReport.DataSource = report.GetClientReportData(businessTypeID, siteID);
    uxClientReport.Report = clientReport;
    uxClientReport.RefreshReport();
}
using the Telerik ReportXMLSerializer in Q2
System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings();
settings.IgnoreWhitespace = true;
using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(reportPath, settings))
{
    Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
 
    Telerik.Reporting.Report clientReport = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);
    Report report = new Report();
     
    clientReport.DataSource = report.GetClientReportData(businessTypeID, siteID);
 
    uxClientReport.ReportSource = clientReport;
    uxClientReport.RefreshReport();
}

Jako
Top achievements
Rank 1
 asked on 19 Jun 2012
5 answers
281 views
hello,

I already passed using report but the template uses labels instead of tables.
I want to use tables in my report.

when i drop tables in design view but the table wizard don't fire.

i don't know why?

thanks for your help
PICKUP
Top achievements
Rank 2
 answered on 19 Jun 2012
1 answer
127 views
I have a subreport in my details section of my report and i am trying to hide the subreport when it does not contain any data 

Telerik.Reporting.Processing.SubReport subReport = (Telerik.Reporting.Processing.SubReport)sender;
            Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)subReport.InnerReport;
            subReport.Visible = subReport.ChildElements.Find("detail", true).Length > 0;

But the above code just hides the subreport and the space occupied by it still persists and there is that gap between my main report rows.....How can i get the space removed  when the subreport is not showing up?
Steve
Telerik team
 answered on 19 Jun 2012
6 answers
283 views
hi!
      I have write below code in chart need datasource event for displaying pie chart..In pie chart I have get the data from xml...In pie chart each legend items  labels present in the format of item1, item2,item3...but I want description column  from xml as a label of each legend item...And also I want exploded a single slice from pie chart....can anyone help me? thanks....


 

string fileName = @"D:\text\jccantera\jccantera\jcc.xml";

 

 

var reader = new StreamReader(fileName);

 

 

XmlSerializer serializer = new XmlSerializer(typeof(NewDataSet));

 

 

var report = (NewDataSet)serializer.Deserialize(reader);

 

Telerik.Reporting.Processing.

Chart procChart = (Telerik.Reporting.Processing.Chart)sender;

 

 

DataSet ds = report;

 

procChart.DataSource = ds.Tables[

"BillItemLine"];

 

 

ChartSeries series = new ChartSeries();

 

 

series.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels;

 

 

series.DataYColumn =

"ItemLineAmount";

 

 

series.Appearance.ShowLabelConnectors =

true;

 

 

series.DefaultLabelValue =

"#%";

 

 

 

series.Appearance.LabelAppearance.Distance =10;

series.Appearance.LabelAppearance.LabelConnectorStyle.Color = System.Drawing.

Color.CadetBlue;

 

series.Appearance.TextAppearance.TextProperties.Color = System.Drawing.

Color.Brown;

 

 

 

JCChart.Legend.Add(d);

 

JCChart.Series.Add(series);

 

procChart.DataSource = ds.Tables["BillItemLine"].DefaultView;

 

JCChart.DefaultType = Telerik.Reporting.Charting.

ChartSeriesType.Pie;

 

Branden
Top achievements
Rank 1
 answered on 18 Jun 2012
1 answer
68 views
Thanks  a  lot...

I   have  copyed   the    connection   string   from    the    "Report Project"    to    "WebSiteProject . The   code  as  following:

Web.Config:
   
     <connectionStrings>
    <add name="ReportingList.Properties.Settings.AdventureWorks"
            connectionString="Data Source=STARRYCHENG-PC\STARRYCHENG;Initial Catalog=AdventureWorks;User ID=sa;Password=123456"
            providerName="System.Data.SqlClient" />
  </connectionStrings>


App.Config:
 
<connectionStrings>
        <add name="ReportingList.Properties.Settings.AdventureWorks"
            connectionString="Data Source=STARRYCHENG-PC\STARRYCHENG;Initial Catalog=AdventureWorks;User ID=sa;Password=123456"
            providerName="System.Data.SqlClient" />
    </connectionStrings>

Question:
        Preview   in   the   "Report Project"    is  ok...

        
   
        Reporting  in  the   website  occurs  error...    
IvanY
Telerik team
 answered on 18 Jun 2012
1 answer
99 views
Hi.
I'm using the Report Service with SL.    How can Return specific reports to a combox.
I have STANDARD and ADHOC reports.   For one combo I want get the STANDARD for the other ADHOC.
Any ideas?
thanks in advance
Steve
Telerik team
 answered on 18 Jun 2012
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?