Telerik Forums
Reporting Forum
2 answers
103 views

 

hi!  I have create chart using xml data...I have use below code in chart need datasource event... I have get the output as pichart with salesorpurchasedesc column...But Now I want the output piechart with labels as itemlineamount data but this data in percentage format...and each salesorpurchase desc data left side of the pie chart that referring each itemline amount data..please help me...

chart needdatasource event
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.DataYColumn =

"ItemLineAmount";

 

series.DataLabelsColumn =

"SalesOrPurchaseDesc";

 

series.Appearance.ShowLabelConnectors =

true;

 

 

JCChart.Series.Add(series);

 

procChart.DataSource = ds.Tables[

"BillItemLine"].DefaultView;

 

JCChart.DefaultType = Telerik.Reporting.Charting.

ChartSeriesType.Pie;

Xmldata

 

<

NewDataSet>

 

<

BillItemLine>

 

<

ItemLineAmount>844.35</ItemLineAmount>

 

<

ItemLineItemRefListID>350000-1247582799</ItemLineItemRefListID>

 

<

EstimateKey>Plan 804-1:804-1-502</EstimateKey>

 

<

Plan>804-1</Plan>

 

<

HouseAddress>3341 West Avenue, Beaumont</HouseAddress>

 

<

EstimateLineAmount>6000</EstimateLineAmount>

 

<

Name>804-1-502</Name>

 

<

SalesOrPurchaseDesc>Foundation Labor</SalesOrPurchaseDesc>

 

</

BillItemLine>

 

<

BillItemLine>

 

<

ItemLineAmount>84.87</ItemLineAmount>

 

<

ItemLineItemRefListID>370000-1247585073</ItemLineItemRefListID>

 

<

EstimateKey>Plan 804-1:804-1-633</EstimateKey>

 

<

Plan>804-1</Plan>

 

<

HouseAddress>3341 West Avenue, Beaumont</HouseAddress>

 

<

EstimateLineAmount>300</EstimateLineAmount>

 

<

Name>804-1-633</Name>

 

<

SalesOrPurchaseDesc>Portalet</SalesOrPurchaseDesc>

 

</

BillItemLine>

 

 



Steve
Telerik team
 answered on 25 Sep 2009
1 answer
263 views

Hello Telerik team,

To achieve the number of records for a group footer or a Report footer we used =Count(‘fieldname’)

 

But I have a scenario where in I need to count only unique values for my number of records for both Group Footer and Report Footer.

 

For example:

I'm printing a report for leave applications

 

1 employee applied a 5 days leave in one transaction (The transaction was tag with an ID)

So I got 5 Rows with Same ID.

 

When I try to display a report it will always show me 5 records which is correct, but how do I count the unique ID? I dont want my number of record to be counted as 5 records instead I want the count of the unique ID.


Steve
Telerik team
 answered on 25 Sep 2009
2 answers
130 views
Hi

I am struggling at every step at the moment.  I have a report and a subreport and both preview they are in the same solution.  when i try to define the reportsource to  the subreport i get an error

type mysolution.mysubreport is not defined.

Please can someone shed light on where i am going wrong with this.

Many thanks

Al
Al
Top achievements
Rank 1
Iron
 answered on 24 Sep 2009
1 answer
209 views
Hi there,

I've been trying to remove a background image by setting conditional formatting rules, but I can't seem to do so. I've been able to replicate the behavior in Preview mode with a static report (with no data source) by following these steps:

1. Add a new report to the project. Select No Data Source and leave the defaults for the other options.

2. In the reportHeader section, shrink the Report1 text box.

3. Add an empty TextBox below the Report1 text box.

4. Right-click on the newly created text box and select Style.

5. Under Background, select any small mage for ImageData that would fit in the textbox.

6. Right-click outside the report's boundaries and select Report Parameters.

7. Create a parameter named "test" of type Boolean with value =False.

8. Right-click on the text box again, and select Conditional Formatting.

9. Create a new rule with the following specifications:

  • Expression: = Parameters.test
  • Operator: =
  • Value: =False
  • Style: Text Bold, 14pt; Background Beige, do not select a background image

10. Save and Preview the report. Notice how the textbox has a beige background but the image is still there.
Am I doing something wrong?

I'm using Q1 2009.

Thanks,
Mark
Steve
Telerik team
 answered on 24 Sep 2009
1 answer
129 views
Hi there,

I have the following group structure:

Group A - KeepTogether = true
    Group B - KeepTogether = false
        Group C - KeepTogether = false

Data for a given instance of Group A exceeds a single page. So if I'm viewing an instance of Group A data (which can contain several nested layers of Group B and C data), the data for all of the Group A data in that instance is present on a single page, which seems to be incorrect. Subsequent instances of Group A data occur on separate pages, which seems to be expected behavior.

As an example, I just produced a report with 3 instances of Group A data. In the viewer, this data is displayed as three long pages containing each instance of Group A data in its entirety. When I export to PDF, each instance of Group A data is split across 3-4 pages, for a total of 10 pages. The footer is replicated correctly with differing page numbers (1-10) on each page.

Also, curiously, if I were to print straight from the viewer by clicking the Print button, the viewer correctly supplies the default pages 1-10 in the "Pages" text box, and 10 pages are printed without changing any of the settings.

Any ideas what could be happening? It just seems a bit odd that 3 pages instead of 10 are shown in the viewer, but on paper and for exporting, the 10 pages are rendered as one would expect.

I'm using Q1 2009.

Thanks!
Steve
Telerik team
 answered on 24 Sep 2009
1 answer
51 views
I have a report where the result of the query returns 7 values: item1, item2, item3, item4, item5, item6, and item7

I want to display these results similar to the layout below:

item1    item3    item5 item7
item2    item4    item6

I know that this can be achieved by using a multicolumn scenario. Unfortunately, I have to use this on a subreport and alas! multicolumn reports do not seem to function properly when used in a subreport. Any other ideas? Thanks!


PJ
Steve
Telerik team
 answered on 24 Sep 2009
1 answer
126 views
Our client is looking to be able to resort a report based on clicking on a column header via our asp.net application.
Is there anyway to provide this functionality?
Steve
Telerik team
 answered on 24 Sep 2009
1 answer
186 views
I'm trying to figure out how to create a report with a sub-report where both are populated with data from code behind. I need some kind of example.....

How do I pass parameters from the report to the subreport?

(I'm using Linq as a data source)

  /Benny
Steve
Telerik team
 answered on 23 Sep 2009
1 answer
121 views
Did as much reading as I could from forums first @ this, however if it was answered in more detail I apologize in advance:

Is it possible to set the exact number of rows per page?

It seems this is all governed by the paper size and page settings, and I was able to even programmatically change the paper style, achieving various levels of # items per page / rows, but not the exact #.

But is it possible to, let's say, give the person viewing the report the ability to actually decide if he/she wants to print out 25 rows, 50 rows, or 100 rows per page using a filter at the top (obviously understanding the risks associated w/ printing so many items per page).

If not, what could be a good solution? Making a dropdownlist at the top filled with various paper sizes and let them pick?

Regards,
M i k e
Steve
Telerik team
 answered on 23 Sep 2009
2 answers
111 views
Hi
I have a report with a date and when it is translated to a Excel the date is a number.

14-02-2008 07:31:00 will be 39492,3131944444
and
09-07-2008 12:30:00 will be 39638,5208333333
pls. help my here.

OS info:
Win XP
Telerik version : Q2 2009
.NET : 3.5
Lang. DK

Janus S. Andersen

 
Janus Pedersen
Top achievements
Rank 2
 answered on 23 Sep 2009
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?