Telerik Forums
Reporting Forum
2 answers
234 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
126 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
235 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
217 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
87 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
538 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
62 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
211 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
1 answer
122 views
Hi

We are developing a SL application using MVVM and WCF RIA Services and Entity Framework. We want to display reports using Telerik Report Viewer. The navigation follows as:

User selects the report criteria in xaml page(i.e client end) 
On click of Generate Report button, it will navigate to the page containing ReportViewer control.
The Report Viewer is containing the report uri and Report Name.
We have the logic for getting the data in a domain service in the same application.
And we have the method signature like below

public ICollection<UpdateFrequencySummaryReport> GetUpdateFrequencySummaryReport(DateTime? startDate, DateTime? endDate, bool isFixedView, string[] viewIds, int[] facilityIds, int[] regionIds, string[] viewServiceIds, string[] viewServiceStatusIds, string[] viewServiceStatusReasonIds);

It is taking so many parameters including (nullable types and arrays of ints and strings). Please let me know or provide me an example that how should i send the data through ReportParameters? Is there any other way other than report parameter? 

Thanks in advance
Ravindra
Steve
Telerik team
 answered on 30 Jun 2011
1 answer
130 views
Hi

Please let me know if it is possible to assign data to SubReport's DataSource which is lieing on a Mater Report in the detail section. Please provide me the solution as it has come as a very urgent requirement and as only one day left for dead line.

Am very much grateful to you in advance.
Ravindra
Steve
Telerik team
 answered on 30 Jun 2011
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?