Telerik Forums
Reporting Forum
2 answers
93 views
There was recently a great blog on SL report viewer (btw, why was it removed?), which described a great feature of the report generator. It said, the report generator, generates XAML code on the server and then sends it to the client and that's how the client viewer displays a perfect output.

This has opened up a new idea in my head to use RADBook (another great product from SL team), in conjunction with the viewer. What I'd like to do, is to have those xaml pages render in the RADBook pages, allowing us to create and send a perfect report in a form of a book with front page.

How can we accomplish getting the xaml from report generator to RADBook, without the UI of the viewer?
Thanks!
..Ben
Ben Hayat
Top achievements
Rank 2
 answered on 30 Nov 2009
1 answer
189 views
Hi,

I'm generating a pie chart for 2 series on the one graph.  I need to label each series with its own sub heading.  The only way I could find to do this was to use overlapping textbox controls on top of the chart control. 
When I view the report in the ReportViewer, the textboxes move to the right of the chart so they no longer overlap.  I understand that this is a limitation of the html rendering in the control.  Is there a way to get this control to render an image instead? 

Many Thanks.

Tony
Steve
Telerik team
 answered on 30 Nov 2009
1 answer
1.3K+ views

There's a lot of examples centered around the WebForms reportviewer, and which use the ReportProcessor independently. But I've got some complex reports that I've extended which require programmatic manipulation to process, and it seems that there's no examples available for how to generate those through the ReportProcessor. And as I found, calling ExportReport() simply pops up the export dialog in the UI.

So here's a nice concept to have in your toolbox - it's simple, but it eluded me for a bit so I thought I'd share it.

Assuming you have a ReportViewer in a windows form (or a RadForm), and you've already rendered the report there, you can simply grab the report object from the report viewer and pass it to the ReportProcessor like this:

    private void SaveReport(string fileLocation) { 
      ReportProcessor reportProcessor = new ReportProcessor(); 
      //pass the reportViewer1's "Report" object to the RenderReport method 
      //populate the HashTable if you need to specify DeviceInfo properties, otherwise just pass an empty one like I've done here 
      RenderingResult renderingResult = reportProcessor.RenderReport("PDF", reportViewer1.Report, new Hashtable()); 
      //now just create a filestream and write the DocumentBytes array to it - flush and close, and your file is ready. 
      using (FileStream destinationFileStream = new FileStream(fileLocation, FileMode.Create, FileAccess.Write)) { 
        destinationFileStream.Write(renderingResult.DocumentBytes, 0, renderingResult.DocumentBytes.GetLength(0)); 
        destinationFileStream.Flush(); 
        destinationFileStream.Close(); 
      } 
    } 

There's a sample project attached, but that little routine is the basis of it.
Steve
Telerik team
 answered on 30 Nov 2009
2 answers
77 views
Hi there

I am dynamically adding crosstab tables and charts to a report and populating via the NeedDataSource event.  The problem I am having is setting the locations of these components.  For example I require the following:

CrossTab
Chart

Crosstab
Chart

...

So I have a table of results above the chart showing the table data.  The issue is the Crosstab height will change depending upon the amount of data, so I can't calculate and set the correct location of the chart at runtime.  I'm sure there is something simple I'm missing.  How can I get around this?

Thanks,

John
John McLean
Top achievements
Rank 1
 answered on 29 Nov 2009
6 answers
303 views
Hi,
I got problems with the extra spaces that is generated when exporting to excel.
I have read your guidlines when exporting to excel but I can't get it right.
As you see in the print screen of VS, my textboxes are perfect aligned but still it generates "a lot" of empty rows! :(

What should I do?
(using 2009 Q3 3.2.9.1113)


/Mattias

Mattias
Top achievements
Rank 1
 answered on 28 Nov 2009
16 answers
235 views

Hello Telerik,

I  have some strange problem with lates version of Telerik.Reporting. 

My application generates bar code - reports, but when I try to make export to PDF format I see '#ERROR# Parameter is not valid' instead of bar code. This strange beheviour I see in all pages instead of first page (on first page - everything ok!). I have tested your demo example (Product Tags) on my environment, result: the same errors in pdf document. 

I can publish PDF examples with Error message. 

Maxim Tairov
Top achievements
Rank 1
 answered on 27 Nov 2009
4 answers
107 views
Hi,

  I can not export the report in Firefox. If i clicking export link, no action is happening.it looks idle

Any settings needed for solving export problem in Firefox?


Thanks for any help
Steve
Telerik team
 answered on 27 Nov 2009
13 answers
3.0K+ views
Hi,

I'm trying to insert a image (into the header) of the reporting. First I tried with the picturebox but that didn't work, after that I tried like the example using style >> background image. And I have almost the same error. My image is just a jpg in the folder "images".

System.Resources.MissingManifestResourceException was unhandled by user code
  Message="Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure \"VerhuurRapport.resources\" was correctly embedded or linked into assembly \"App_Code.29im1eh8\" at compile time, or that all the satellite assemblies required are loadable and fully signed."

I have the last version of the reporting, I hope you guys can help me!

Greetz,
Kevin
 
Filipe Peixinho
Top achievements
Rank 1
 answered on 27 Nov 2009
1 answer
107 views

hi guys

i have a problem with the telerik report designer.
we have a 2 tier application, containing a GUI layer and a DAL layer.
for the reports we created a new library because not all customers use the same reports.
the reports library has a reference to the DAL library. i created a new report and choose the dataset
from the DAL library.

a dataset and a tableadapter are inserted from the toolbox to the report. when I run the software, the report works fine.
but when i click the preview tab in the design mode, no data is displayed.

if the dataset and the tableadapter are attached to the same report project the data is displayed in the report preview correctly.

its dificult to create a report without preview.

does anybody has an idea or a work around?

any help is appreciated

thanks a lot in andvance,

marino

Steve
Telerik team
 answered on 26 Nov 2009
1 answer
100 views
Hi,
 
 i want to show the pie chart based on DataGroupcolumn

3 columns -
1.resource name - legend
2. usage time - Y axis
3. Date - X axis
Line chart is showing correctly,This is the coding i used(displaying number of lines based on resources)

                 DataSet dsChart = new DataSet();
                Telerik.Reporting.Processing.Chart chart = (Telerik.Reporting.Processing.Chart)sender;
                Telerik.Reporting.Chart chartDef = (Telerik.Reporting.Chart)chart.ItemDefinition;
                chartDef.PlotArea.XAxis.Clear();
                dsChart = DBMethods.GetDetailsForInstrumentUsageByDateChart(facilityId, fromDate, toDate, isActual, resourceId);
                (sender as Telerik.Reporting.Processing.Chart).DataSource = dsChart;
                chartDef.DefaultType = Telerik.Reporting.Charting.ChartSeriesType.Line;
                chartDef.DataGroupColumn = "resource_name";
                chartDef.AutoLayout = true;
                chartDef.IntelligentLabelsEnabled = true;
                chartDef.Legend.Appearance.GroupNameFormat = "#VALUE";//this will display the usage time
                chartDef.PlotArea.XAxis.DataLabelsColumn = "date";











How to show the pie chart based on those three fields?


Thanks for any help



Chavdar
Telerik team
 answered on 26 Nov 2009
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?