Telerik Forums
Reporting Forum
5 answers
394 views
I've had a lot of need recently to use checkboxes on my reports. I've been using an example that I found on the forum where I actually place a picturebox where I want the checkbox, then load an image that is checked or unchecked depending on some logic in the databinding event handler for the detail section of the report. That works just fine for a few checkboxes, but I have several reports with 50-60 checkboxes each and it creates a lot of very cumbersome code.

Is it possible to create a custom control, inherited perhaps from picturebox, that I could then place on a telerik report? I would want to just add the logic to it to show the checked or unchecked image based on a Field it is bound to (boolean).
Steve
Telerik team
 answered on 05 Oct 2011
6 answers
238 views

Hi,

I'm using SL4 and Telerik Reporting with the latest components from Q1 2011!
From the other threads I used the mechanism to directly print reports
without first showing them within ReportViewer:

private void button1_Click(object sender, RoutedEventArgs e)       
{  

  var layoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(this.ReportViewer1, 0);  
  var viewerModel = (ReportViewerModel)layoutRoot.DataContext;   
  viewerModel.ApplyReportParametersCommand.Execute(null);  
  viewerModel.PrintReportCommand.Execute(null);

}

Always the first time the parameter is not applied.
The mechanism for that is:

private void ReportViewer1_RenderBegin(object sender, RenderBeginEventArgs args)
{
  args.ParameterValues["Parameter1"] = textBox1.Text;
}

The Xaml-Code:

<telerik:ReportViewer Grid.Row="1" x:Name="ReportViewer1"
  Width="1000" UseNativePrinting="False"
  telerikControls:StyleManager.Theme="{Binding SelectedItem, ElementName=ThemeSelector}"
  ReportServiceUri="../ReportService.svc"
  Report="ClassLibrary1.Report1, ClassLibrary1" RenderBegin="ReportViewer1_RenderBegin" />

When I make the ReportViewer big enough to observe I can see that the report is rendered
correctly even the first time!
But the printed document has only the report skeleton missing the real data.
From the second call on (button click) the parameter will be applied and its is working fine.
If I toggle the UseNativePrinting to true  (the new default) it works also the first time.

Unfortunately I will need the UseNativePrinting=false option to get the reports with landscape-mode
immediately ready to print.

Please help me!
It is urgent since it should have been a fast switch from the old Q2 2010 Reporting.components
to the latest version and I have to deploy immediately.

Best Regards
Andrew

 

 

 

Peter
Telerik team
 answered on 05 Oct 2011
1 answer
167 views
I have some data lines that needs to be suppressed depending on a value sent to a report.  It's kind of in the middle if it shows. 

In Crystal reports you'd add multiple detail sections and suppress the section if it's blank.  Is there a way or workaround to do this.
vs2010

So
Some data
if data= 'Y' then show this else suppress this section with no blank space.
some other data.

I apologize if this is a newb question, I'm EXTREMELY NEW to telerik and didn't know we're switching to this.
Steve
Telerik team
 answered on 05 Oct 2011
12 answers
312 views
I am trying to set up multiple sub reports within an unbound main report.  Each has its own sqldatasource connecting to MS Access tables.  Individually the subreports work fine.  Placing each one individually into the main report they work fine but if I put both in, one of them does and one of them doesn't - I get the  'An error has occurred while processing TextBox 'dateDataTextBox':
The expression contains object 'CalDate' that is not defined in the current context.'  error.

Here is the weird bit - I tried this with two subreports that, by chance, have the same field name (completely different source tables though).  And the report with the error showed the field value from the other report.  In other words one report is looking at the other's datasource.  The datasources have different names, though they have the same connection string. 

This is all just working in the report designer. Using Q3 2010 in VS2010.  Does anyone have any ideas?

Thanks
Clive
Peter
Telerik team
 answered on 04 Oct 2011
1 answer
246 views
I have a base report class which defines a common header and footer for all reports.  By default the base report is setup as Letter size page in portrait orientation.    It is possible for the reports that inherit the base report class to override the page size and orientation.

My footer has the Page number in the left hand corner and copy right information in the right.  The copy right text box is set with an anchor of the lower right corner and the bottom and to be right aligned  However when a report changes the page orientation or size the copy right text box doesn't move right with the additional width.  

How do I move it to the right when the report changes the page size?

Attached is an image of the issue.
Peter
Telerik team
 answered on 04 Oct 2011
3 answers
75 views
What is the best way to get a large amount of dynamic, non-data source data into a report.

For example, on an invoice the header contains contact details for the company and vendor.  If these details are not in the data source, what's the best way to pass it into the report?  

For example, here's how I run a report now.

This  report uses a DataObject class as it's data source, with a method that returns a List for the actual data source.  

var r = new ProfitSystemReports.SalesByCategory();
r.ReportParameters["startDate"].Value = Model.StartDate;
r.ReportParameters["endDate"].Value = Model.EndDate;
ReportViewer1.Report = r;

In this case, the parameters are used to filter the report.  Should one use a bunch of parameters to hold the extra data?  Or, create user-defined functions that return the needed values?  What if the DataObject class also had public properties, could they be accessed from the report?

In this case, I'm using Reporting 5.1, with ASP.NET 3.5 and MVC 3 with the web viewer.
Steve
Telerik team
 answered on 04 Oct 2011
3 answers
593 views
Hello All -
This is my first foray into Telerik Reports and while I've done some reading on how to get started, please bear with me if I do ask something that is fairly basic.

Here is what I want to do -
I have a Stored Procedure that has 2 input params and returns me a set of records, I display this in a Report (table) and then I want to chart the output.

Now, when charting (pie chart) I first want to filter my data, i.e. not all rows from the SP output need to make it to the chart. To do this, I create a Custom report and in the constructor for the report I make the SP call, get the data into a Dataset and then use a DataView to filter out what I want. But bear in mind that the End User can select parameters to run the report (the 2 input params to the SP) and then click the Preview button to pull the data, however in doing so the report just shows the old data, for I have not captured the Preview button click and wired it into my Logic for filtering data.

How do I go about doing this?

Thanks.
Peter
Telerik team
 answered on 04 Oct 2011
6 answers
415 views
Hi,

I want to know how, if possible, I can put a chart in a group and this chart show the info about this group. I tried to put my chart in the footer Group (where it should be), but I don't know how to specify the group in wich it is. Let's said that I want to make a rapport about the number of gummies inside a gummies machine. My rapport should look like this:

Machine 1
Gummies Color  Gummies Number
Red 150
Green 29
Yellow  87

My chart (pie) should be here and will show the % for each color

Machine 2
...

So, I have three values : The machine number (group) , the colors (details) and the number(details). So, for my chart, I should create a serie and I guess the name of each items of this serie will be the color of the gummies and the value will be the number of gummies with this color. But I tried it this way and it doesn't work. 

Thank you in advance for your answer.
David

Steve
Telerik team
 answered on 04 Oct 2011
2 answers
203 views
Hi all,

I was looking for a simple solution to disabling the print button and the export button with the SL report viewer.  What I am trying to accomplish is the following.

I'm trying to create an initial load screen (report) similar to the report provided in the example folder (VS2010 C#).  In that example it lists those available reports for viewing and you are able to click the appropriate report you would like to view.

I'm going about a similar initial load page (rptSplash), but I would like to restrict the ability to print / export this specific page.  I looked in the Viewer for a binding event to try and check the currently (newly) bound report but didn't see such an event to use.

Can you please provide a little guidance or a suggestion.

Thanks,
Mark

[Title of thread should read Print & Export]
Mark
Top achievements
Rank 1
 answered on 04 Oct 2011
12 answers
309 views
Hi,

In my web site project in VS2005, trying to create a report from converting an existing Cystal Report v11.5 SP2 with the wizard, I get the 'Requires Crystal Report 11' message with nowhere to go forward from there (and I think I've included every CR reference I require). Does 'Requires Crystal Report 11' mean ONLY Crystal 11 and not 11.5?

Thanks
Sylvain
Steve
Telerik team
 answered on 04 Oct 2011
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?