Telerik Forums
Reporting Forum
1 answer
87 views
Hey Guys, I have a simple question that I cannot answer.

I have a library of reports that I call successfully. I have a form with a report viewer which shows the report. The problem is, for this 1 report, a field does not require the entire size of the presized text box. I can easily resize the text box, but I fail to be able to move it to the right. userscore is the report object.

 

 

 
            userscore.detcol3.Value = "=average";  
            userscore.detcol3.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Right;  
            userscore.detcol3.Width *= .75;  
            userscore.detcol3.Style.BackgroundColor = Color.Teal;   
            userscore.detcol3.Location.X.Add(new Unit(1.0, UnitType.Inch)); 

 

 

Gersh
Top achievements
Rank 2
 answered on 21 Oct 2009
3 answers
844 views

I want to create a report that just shows the top 5 records for use in a dashboard. (I'll link to another page with the full results.) I want the number top number (5 inthis case) to be configurable, so I created a report parameter, RecLimit, which is an Integer with a default value of =5. To limit the records I created a filter on the report and used the Top N operator, so my filter looks like this:
    Expression: =RowNumber()
    Operator:    Top N
    Value:         =Parameters.RecLimit

When I preview the report, one of two things happens. If the report parameter UI.Visible property is set to True then I get the error "Filter cannot be evaluated. Value should evaluate to Integer." If the visibility is set to False then the report displays with all the records. The Top N filter is ignored.

If I run in debug I see this stack trace:

 

System.InvalidOperationException: Filter cannot be evaluated. Value should evaluate to Integer.

at Telerik.Reporting.Processing.Data.TopBottomFilterOperator.Create(IEnumerable`1 filters, Object context)

at Telerik.Reporting.Processing.Data.RuntimeDataSource..ctor(Object dataSource, String dataMember, IEnumerable`1 filters, IEnumerable`1 sorting, Object expressionContext, String name)

at Telerik.Reporting.Processing.Data.RuntimeDataSource..ctor(IDataSource dataSrc, Object expressionContext)

at Telerik.Reporting.Processing.ReportDataSource..ctor(IDataSource1D dataSource, Boolean detailGroup, Object expressionContext)

at Telerik.Reporting.Processing.Report.ProcessItem()

at Telerik.Reporting.Processing.ReportItemBase.Process(DataMember data)

 

Doesn't RowNumber() return an Integer?
What am I doing wrong here?

I created the report with Reporting Q2 2009 (version 3.1.9.807).

Steve
Telerik team
 answered on 20 Oct 2009
1 answer
75 views
Hi,

Is it possible to render Crosstab or Table as image?. So that I can avoid table layout in Exported RTF file. Borders are showing in the exported report, that looks ugly. Otherwise any other way to avoid table borders?

Please help me.


Regards,

B.Sridhar


Steve
Telerik team
 answered on 20 Oct 2009
1 answer
111 views
It looks like when I call "RefreshReport()" on the WinForms report viewer it gives the focus to the report viewer. Is there a way I can prevent this functionality? I want the focus to stay where it is.
Steve
Telerik team
 answered on 20 Oct 2009
15 answers
207 views
the workaround provided for ealier versions doesn't seem to work on the Q2_2009 version.  We have a code that uses this workaround using the Q1_2009 version and it was working but when we upgraded to Q2_2009, it basically broke (i.e. it's now displaying the url and the text is no longer clickable).  Any new workaround for this one?  Cheers.
Steve
Telerik team
 answered on 20 Oct 2009
2 answers
76 views
Hi

Are you planning on releaseing any new reporting videos?

I'm really struggling to get them to work in my environment, I just cant get the reports to work with any form of code behind, as detailed in my other posts.

I've decdided to use the built in data sources, and picked the Parameterised query video, the first thing it says to do is add an sqlDataAdapter, which is not an option on the new reports.

I hesitate to look at other videos incase there are other compatability issues that will confuse / cause me problems.

Andy
Andy Green
Top achievements
Rank 1
 answered on 20 Oct 2009
2 answers
144 views
We develop/distribute a web based application and want to add reporting capabilities. I am a little unclear about the Telerik reporting. Years ago we use Crystal Reports which allowed the customers to create report files that could be loaded into our application.

How is this done with Telerik reporting? If the customer has to use Visual Studio (does the Visual Studio plugin just generate .cs code?) how do they add this to our web application (a commerical product). Would my customers have to create a .dll (inside visual studio) for every new report they want to create?

Thanks!
Jay O'Brien
Top achievements
Rank 1
 answered on 19 Oct 2009
3 answers
750 views

I have a web page (page1) that calls another page including the ReportViewer control.  Page1 includes a button that when clicked redirects to the ReportViewer page.  The call redirection from Page1 to the ReportViewer page includes 2 parameters in the QueryString.  One parameter tells the ReportViewer which report to display from my report lib class.  The other parameter is an ID I want to use in the report codebehind when building the datasource (e.g. Where customerID = paramID).  I don't want to use the ID value as a filter.

The parameter, paramID, is already defined in the report designer with no Value.

In the ReportViewer, how do I set the report parameter, paramID, to the querystring value so that it will be used in the SQL query for the report's datasource?

In the ReportViewer page codebehind I'm trying the following but it doesnt' work:

 

 

Case "rptMyReport"    'this is the report name from the querystring

 

 

 

  Dim appId As String = Request.QueryString("appId")    'this is passed from the first web page (Page1)

 

 

  TryCast

 

(ReportViewer1.Report, wwnReports.rptMyReport).ReportParameters("paramAppId").Value = appId

 

 

  Me.ReportViewer1.Report = New wwnReports.rptMyReport

 

Steve
Telerik team
 answered on 19 Oct 2009
2 answers
165 views
hey guys,
 i've a little problem here, i created a method in a report (report x), takes 1 parameter to fill the dataset query with this parameter. this report x is used as subreport in another report (report y)....  so i call that method from report y in the textbox bound event with the value of the text box as the parameter like that:

Telerik.Reporting.Processing.TextBox textbox = sender as Telerik.Reporting.Processing.TextBox; 
string myParameter = textbox.Text; 
mysecondReport mysecondReport1 = new mysecondReport(); 
subReport1.ReportSource = mysecondReport1; 
((mysecondReport)subReport1.ReportSource).fill_DataSet(myParameter);  // where fill_DataSet is my method

and this is the code of my method (fill_DataSet) in report x:
public void fill_DataSet(string myParam) 
        { 
 mysecondReportTableAdapter adapter = new mysecondReportTableAdapter(); 
 myDataSet.mysecondReportDataTable table = adapter.GetDataBymyParameter(myParam); 
this.DataSource = table; 

i've breakbpoint all these and the value is passing correctly from the textbox bound event to the other report but the problem in the first time the subreport rendered where it show no data (as if the value didn't pass) , then this value(first textbox) that supposed to be for the subreport (first subreport) is taken instead by the second subreport rendered.
so my output is a subreports with incorrect data, and a missing first subreprot rendering.

hope someone get it and could help me with that.

P.S i can't use need datasource event as the report has its own dataset and i don't want to use parameters.


Fatima Mohey
Top achievements
Rank 1
 answered on 18 Oct 2009
1 answer
159 views
I am getting error:
Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.IEnumerable<Telerik.Reporting.ReportParameter>
Any new workaround for this one?  Cheers.
Sergei Rassk
Top achievements
Rank 1
 answered on 17 Oct 2009
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?