Telerik Forums
Reporting Forum
3 answers
130 views
Recentelly Installed 5.0.11.316 version of Telerik.ReportViewer.Silverlight
But I am getting attach error please let me know how we can resolve it!

Thanks,
Ed
Massimiliano Bassili
Top achievements
Rank 1
 answered on 02 Jun 2011
1 answer
344 views
 Hello,

I have report datasource like the following:

SELECT

 

 

 

 

,firstname

 

 

 

,lastname

 

 

 

,email

 

 

 

,amount

 

 

 

,dcomments

 

 

 

 

 

FROM

 

[donation]

WHERE

 

firstname LIKE '%'+@firstname+'%'

 

OR

 

lastname LIKE '%'+@lastname+'%'

 



How do i pass @firstname parameter value from report. I am trying to display textbox where user can key in but i could not. I can do dropdown for firstname but i am trying to do textbox.

Do you have any example for my issue?
Thanks,
Steve
Telerik team
 answered on 02 Jun 2011
0 answers
111 views
Hi
I have placed a Textbox in Report header section and name it prm2
i set its value in Report_NeedDatasource event but its value are not displayed when preview the report
For other non cross tab reports it works fine 

Here is my code

 private void crosstab1_NeedDataSource(object sender, EventArgs e)
        {
            SqlConnection CN = new SqlConnection();
            SqlCommand cmd = new SqlCommand();
            SqlDataAdapter adp;
            try
            {
                string strQuery = "", strWhere = "";
                //--- Criteria
                string vToDate = sftParser.NullToVal(prm["toDate"]);
                string vFromDate = sftParser.NullToVal(prm["fromDate"]);
                if (vFromDate.Equals(""))
                    vFromDate = common.registry.getOpeningDate();
                if (vToDate.Equals(""))
                    vToDate = "2050-12-12";
                 //-----------------------------------------------------------------------
                strQuery = @"Select ExternalCode,ProductName,PackingName,WareHouseId,WareHouseTitle,Type,SUM(Qty) as Qty
                    FROM         StockTransaction ST 
                    WHERE    ST.TransactionDate>=@FromDate And ST.TransactionDate<=@ToDate
                    Group by Pro.ExternalCode,Pro.ProductName,PP.PackingName,WH.WareHouseId, WH.WareHouseTitle,Type";

                cmd.CommandText = strQuery; cmd.Connection = CN;
                cmd.Parameters.AddWithValue("@FromDate", vFromDate);
                cmd.Parameters.AddWithValue("@ToDate", vToDate.Equals("") ? null : vToDate);
                
                //passing null value to parameters not supplied
                foreach (SqlParameter Parameter in cmd.Parameters)
                {
                    if (Parameter.Value == null)
                        Parameter.Value = DBNull.Value;
                }
                adp = new SqlDataAdapter(cmd);
                
                DataTable tbl = new DataTable();
                adp.Fill(tbl);
                adp.Dispose();




                Telerik.Reporting.Processing.Table table = (Telerik.Reporting.Processing.Table)sender;
                table.DataSource = tbl;
                //-------------------------------------------------------------------------
                vToDate = sftParser.NullToVal(prm["toDate"]);
                this.prm2.Value = "From: " + String.Format("{0:dd/MM/yyyy}", Convert.ToDateTime(vFromDate)) + " To: " + (vToDate.Equals("") ? " All " : String.Format("{0:dd/MM/yyyy}", Convert.ToDateTime(vToDate)));

               // or apply this did not work
 Telerik.Reporting.TextBox txt = this.Items.Find("prm2", true)[0] as Telerik.Reporting.TextBox;
                txt.Value = "From: " + String.Format("{0:dd/MM/yyyy}", Convert.ToDateTime(vFromDate)) + " To: " + (vToDate.Equals("") ? " All " : String.Format("{0:dd/MM/yyyy}", Convert.ToDateTime(vToDate)));

               
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                cmd.Dispose();
                CN.Close(); CN.Dispose();
            }
             

Saima Gul
Top achievements
Rank 1
 asked on 02 Jun 2011
2 answers
381 views

Hello everybody,

I want to pass a dynamic DataSet which has been generated by
an outside code (request) to telerik's report.

Exemple

 
//Library Report DataSet 
 
DataSetReport{ 
column1, 
column2, 
column3, 
column4 
 
 
//OutSideCode 
 
request = "Select * from Telerik"
DataSet dataSetReport = request.Result().DataSet(); 
 
LibraryReportDataset libraryReport = new LibraryReportDataset (); 
 
//To this report, i want to associate my dataSetReport... 
 
libraryReport.AssociateDataSet(dataSetReport); 


and after, the result is going to be a report with the dataSetReport's data...

I searched everywhere but i found nothing...

Can someone help me?

Thanks...
Daniel Botero Correa
Chris @ Intrinsic
Top achievements
Rank 1
 answered on 01 Jun 2011
1 answer
125 views
In my application, I have List of fields ,related binding fields,Width alignment etc configuration in On Table in DB.On Silverlight application UI user can select fields those he want to display in report(Not all which are exist in table).So I want to create Report's design and binding Dynamically.For that I need to pass List<T> to report which contains Field related configuration(width,Label,Binding Field,Width etc).If I can do that,I will be able to bind data with that table using dynamic Stored Procedure.But in Silverlight,I do not have reference of Report into Silverlight application,as it is in class library.I am not able to get that Report's Object.Please suggest me what to do in such case?
Peter
Telerik team
 answered on 01 Jun 2011
0 answers
146 views
How to hide Refresh button ?
Kanhaiya
Top achievements
Rank 1
 asked on 01 Jun 2011
0 answers
50 views
How to add a “Bookmarks” label above the report bookmark list?
Kanhaiya
Top achievements
Rank 1
 asked on 01 Jun 2011
1 answer
138 views
My developers are constructing a stacked bar chart, and have included a datatable to show the values of the stacked elements. The user has also asked to see the total value for each stacked bar. There are references to changing the label of the last series to show the total, using STSUM, but it appears this also changes the display in the datatable (so that the last series shows the total in the datatable as well).

Any suggestions on including BOTH the datatable and a stacked bar total, either in the datatable or as a label on the bar?

Alternatively is it possible to have a bar value which shows in the datatable but NOT in the chart?

TIA
Ves
Telerik team
 answered on 01 Jun 2011
3 answers
345 views

I need to create a report programicly.  if i have a text box and that will be filled with the Text "foobar" at Arial 10 bold.  how do i calculate the length.  Below is what i need to achieve.   is there a way to calculate the length to place in the code below without guessing..  

 

 

new

 

 

Telerik.Reporting.Drawing.Unit(0.800000011920929D, Telerik.Reporting.Drawing.UnitType.Inch)

 

Squall
Top achievements
Rank 1
 answered on 31 May 2011
8 answers
1.1K+ views

I just upgraded Telerik Reporting to Q3 2009 (version 3.2.9.1211), and now I receive an error whenever I try to open a report in design mode in Visual Studio 2008:

 

Type 'Telerik.Reporting.Drawing.Unit' does not have a constructor with parameters of types Double, UnitType.

 

Granted, I am new to Telerik Reporting, but the code hasn’t changed, and it still works fine with Telerik Reporting Q2 2009.  It looks to me like the new version still does have a constructor with that signature, and my reports do indeed compile and run just fine.  Unfortunately, I can’t open them to edit them.

 

This is the call stack it gives me:

 

at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

 

I tried the "Ignore and Continue" option, but that just gives me another error.  Does anyone have any clue as to what I may have done wrong, or what I can do to correct this problem?  Thank you very much.

Shaun

richard
Top achievements
Rank 1
 answered on 31 May 2011
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?