Telerik Forums
Reporting Forum
3 answers
302 views
Hi,

im starting to use Telerik Reporting Chart, but i cannot find the onclick event on any of chart items. In documentation of Ajax Chart i've found:  "Use the RadChart OnClick event to handle server postbacks caused by clicking on areas of the chart.".  I would like to get any click event made on different chart bars to redirect to a page with details info and everything has to be done in-code.

Below you see my test code for chart configuration:

 

 Report report = new Report();

 DetailSection detail = new DetailSection();

 Telerik.Reporting.Chart progchart = new Telerik.Reporting.Chart();

 progchart.BitmapResolution = 96F;

progchart.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;

 progchart.Location =
new Telerik.Reporting.Drawing.PointU
(new Telerik.Reporting.Drawing.Unit(0.3, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))),
new Telerik.Reporting.Drawing.Unit(1.8, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))));

 progchart.Name = "progchart1";

 progchart.PlotArea.EmptySeriesMessage.Appearance.Visible = true;

 progchart.PlotArea.EmptySeriesMessage.Visible = true;

 progchart.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(9.6, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))), new Telerik.Reporting.Drawing.Unit(6.1, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))));

 // Create a ChartSeries and assign its name and chart type

 ChartSeries chartSeries = new ChartSeries();

 chartSeries.Name = "Sales";

 chartSeries.Type = ChartSeriesType.Bar;

 // add new items to the series,

 // passing a value and a label string

 chartSeries.AddItem(120, "Internet");

 chartSeries.AddItem(140, "Retail");

 chartSeries.AddItem(35, "Wholesale");

 progchart.Series.Add(chartSeries);

 // add the Chart to the page.

 detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { progchart });

 report.Items.Add(detail);

 BR,
Grzegorz Smoliński
Steve
Telerik team
 answered on 04 Jul 2011
0 answers
76 views
Hello,


I Need to help to pass data on sub report..

Actaully I have tour table , Customer table , Invoice table and payment table, I need to create the Invoice contain the payment table, and In My payment table everythign is based on Invoice id...

So now i need to generate the Multiple cusotmer invoice in the Report... This report is sales Invoice contain the one payment section also...

So currently i am getting invoice report for Multiple customer, but i cannot access the payment details in it.....Please help us to retrive the payment details..

Here is the UI scenario:

User, Select Tour, and Customer , based on this In my Rad Grid, Multiple Invoice are displayed, and then Click on Print ALL, this Print all open the telerik report contain all the Inovice as in the grid , but now i cannot Reterive the payment details in my payment section...becoz i donot know how to pass Invocie id in The payment sub report????

Invoice report is my main report, and with in this i am using Payment details as a sub report..

FYI : Whehn i generate the report for only single Invocie...its reterive the payment details...

Regards
samir
Samir Patel
Top achievements
Rank 1
 asked on 02 Jul 2011
2 answers
276 views
Hi,

I'm using Reporting v Q3 2010.  I have a solution which contains a web project and a separate projectect for my Telerik reports.  So when I deploy my site, the Telerik reports are built in to a dll that sits in my site's /bin folder.  This is fine, and all works very well, except that one of my reports uses an external stylesheet which is not being picked up when I run the report in the production environment.

I've tried the three methods of referencing the external stylesheet from this report, but only the absolute method works, and I can't really use that in a production environment.  If I use 'Relative' mode, it seems to be expecting to find the stylesheet xml file in a path relative to the root of the Reports project I created.  But of course I'm not deploying the project, just the dll created from it.  Similarly, using the 'Resource' mode, it seems to be expecting to find the xml file in a Resources folder within the Reports project, not the website.

I've tried placing the xml file in just about every location I can think of (even creating a folder structure in my website to reflect the one in my development environment), and switching between Relative and Resource modes when adding the style sheet to my report.  But nothing works, and the report is always rendered without the styles from the stylesheet.  All of the documentation I can find on this site seems to expect that my reports are part of the same project as the website itself, but that's not my scenario.

Please can someone explain how to reference an external stylesheet from a report when that report will be built into a dll and deployed in a website's /bin folder.

Thanks!
Michael
Top achievements
Rank 1
 answered on 01 Jul 2011
2 answers
144 views
   private void btnInHDGTGT_Click(object sender, RoutedEventArgs e)
        {
                //this is create ReportBook
                ReportBook book = new ReportBook();


                //create ReportViewer add to control Wpf of WinReport.xaml
                WinReport WinReport = new WinReport();

                //foreach in grvOrder get order (master) => orderDetails
                foreach (Order order in grvOrder.Items)
                {
                    //Create list orderDetails
                    List<OrderDetail> listOrderDetails = new List<OrderDetail>();
                    foreach (OrderDetail OrderDetail in order.OrderDetails)
                    {
                        //add all orderdetails to listOrderDetails
                        listOrderDetails.Add(OrderDetail);
                    }

                    //this is a template of report RptOrderGTGTDemo.cs ==> container information orderDetails show report
                    RptOrderGTGTDemo RptOrderGTGT = new RptOrderGTGTDemo();
                  
                    //add source to report item
                    RptOrderGTGT.Report.DataSource = listOrderDetails;
                    
                    //add multiple report item to reportbook
                    book.Reports.Add(RptOrderGTGT);
                }
               
            //out of foreach add report to ReportViewer
                WinReport.rptReport.Report = book;
                WinReport.ShowDialog();
            }
----------------------
an error : System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.ReportViewer.Wpf.ReportViewerModel.Print()
   at Telerik.ReportViewer.Wpf.ReportViewerModel.PrintReportCommandImpl.Execute(Object parameter)
   at Telerik.ReportViewer.Wpf.ReportViewerModel.Command.System.Windows.Input.ICommand.Execute(Object parameter)
thanks!
         
Peter
Top achievements
Rank 1
 answered on 01 Jul 2011
1 answer
298 views
Hi,

I am using table in which I have Items, quantity and price. I have set the datasource of my table using stored procedure. My tables resides in the detail section. After that I placed a textbox control in the report footer section to calculate the total quantity. By using the following expression.
=Sum(Fields.Quantity). But total doesn't appear in the report.

Expalanation in Steps:

1) Table is placed in a detail section (bind with a stored procedure)
2) Textbox in a report footer section to display total. (not appearing  in the report) =Sum(Fields.Quantity)


Items Quantity Price Total

ItemA 2            10       20
ItemB 3              5        15
5 (It is a textbox in a report footer section but it's not displaying the total quantity and appears blank in a report)



Hristo
Telerik team
 answered on 01 Jul 2011
2 answers
279 views
I have a report that has a ReportHeader section that has a couple of fields that I set in code - that aren't populated from a DataSource.

That is, in the designer I put aTextBox in the ReportHeader section, and leave it's value blank.

I'm displaying the report on a web page, using the standard Telerik ReportViewer.  The Website is not running with InProc session.

I set the value in onNeedDataSource() to a value I extract from Session[].  (We simply can't run production websites with InProc session state, so these values and the parameters for the queries that populate the DataSources are passed through Session[].)

The report runs fine.  The fields populate correctly, the detail section populates correctly, and the tables in the ReportFooter that have separate DataSources populate correctly.

But when I print, the fields that are set in code are blank.  Same if I export, or even if I simply hit the refresh button in the ReportViewer.

The fields that are being populated from DataSources are set correctly, these fields that are populated directly are left blank.  When I put a breakpoint in onNeedDataSource(), I see that it is not called, when the report refreshes.  It's like the report is working from remembered data, and that the only data it remembers is what is in a DataSource.

Any ideas as to how I can make this work?  Without going to InProc session state - that's simply not a workable solution.

Jeff
Top achievements
Rank 1
 answered on 01 Jul 2011
1 answer
144 views
We just upgraded to Q1 2011.  Most of our reports are running just fine, we switched out the old reporting dlls with the new ones.  This is a winforms project.  When we open a form and click the report button, the report shows up just fine.  When we click the print button the report viewer toolbar, an error is thrown saying NullReferenceException was unhandled         Object reference not set to an instance of an object.  But when we're debugging, there is no source available, just the error.  We can't figure out why it is just these 2 reports that aren't working when all the other ones are.  Any ideas?
Steve
Telerik team
 answered on 01 Jul 2011
1 answer
622 views
Hi Folks,
I have written a pixel precise (image overlay) report using Reporting Q1 2011 trial. So far so good. After reading the documentation, I decided to create a calculated field for a barcode control. I took an existing field and added some other characters to it. My report is very simple (structure wise) it has a Detail and a report Footer. The field that is using the calculated field is in the Detail section and it will render well in Preview mode (the field is assigned a value from a business object). BUT... when the application is rendered programmaticaly, it fails with "The expression contains object 'BarcodeValue' that is not defined in the current context."

I don`t understand why it works in preview and not when .RenderReport is called.

Thanks

-John
Steve
Telerik team
 answered on 01 Jul 2011
1 answer
71 views
I have a report book being displayed using a silverlight application. The reports generates fine, but when I try to expand my group using the action button nothing happens. if I preview the report under VS, it woks just fine.

I do have a the report viewer in a Radwindow. Does that make a difference ?

Hector
Steve
Telerik team
 answered on 01 Jul 2011
3 answers
235 views
I am trying to use a web service provided by a third party as a datasource in a Telerik Report.  Anyone have a clue how to do that?

So far I have tried attaching it to an objectDatasource and wrote the following code behind (where ODRC_DATA_SERVICE is the web service reference added to the project and getCurrentMedications("A473813") is the method in the Web Service that returns the data.)  BUt so far I've got nuthin'  Tyhe designed can't detect the data source and the report preview, bets the correct number of rows that the service returns, but does not display any data.

Thanks in advance,

Rick Riedel

private

 

 

void GetCuurMedRpt_NeedDataSource(object sender, EventArgs e)

 

{

 

 

//try

 

 

 

//{

 

 

 

ODRC_DATA_SERVICE ws = new ODRC_DATA_SERVICE();

 

Telerik.Reporting.Processing.

 

Report report = (Telerik.Reporting.Processing.Report)sender;

 

report.DataSource = ws.getCurrentMedications(

 

"A473813");

 

 

 

 

//}

 

 

 

//catch { }

 

 

 

//finally { }

 

}

 

 

private void GetCuurMedRpt_ItemDataBound(object sender, EventArgs e)

 

{

textBox1.Value =

 

"=Field.RXF_ORD_DATE";

 

textBox2.Value =

 

"=Field.DRG_NAME";

 

textBox3.Value =

 

"=Field.RXF_RX_NUMBER";

 

}

Steve
Telerik team
 answered on 01 Jul 2011
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?