Telerik Forums
Reporting Forum
1 answer
188 views
What I want to do is pull a field from SQL that contains XML, parse that XML into a class, then use that as my object data source.
I have sqlDataSource1 that will get the text (XML) field from the DB using my ReportParameter (so it only gets 1 record).
I also have objectDataSource1 that will display the data from my class.
Right now objectDataSource 1 is the Report's datasource.

I also have a NeedDataSource event trigger on the report.

The question is "Can I have the event trigger tell the sqlDataSource1 to go get the data, parse it, then feed it to objectDataSource1 to display on the report?"

This sample shows how to read in an xml file, parse it, then feed it to data source to display.  So I imagine I should be able to do it.  Does someone do the same thing?  Am I going about it the hard way?
Peter
Telerik team
 answered on 25 Oct 2012
1 answer
166 views
Hello TElerik,

My web application enables a user to choose database at runtime. I have a more connection strings in a web.config.

Selected connection string key is stored in a session.

I can read this key during loading a page with a report web viewer.

My main report is accepting connection string parametr using its constructor, but I dont know, how to specify this for a details subreports.

Can you advice me how to solve this?

Thank you very much.

Tom
Elian
Telerik team
 answered on 25 Oct 2012
1 answer
228 views

I am trying to build a dynamic report with many tables which have different columns definition.

My source is a list of data table

My code is:

public EntregaReport()
       {
 
 
           InitializeComponent();
           var list = Entrega.GetEntregaDocumentos("BERK_122");
           HtmlTextBox textboxHeader;
           HtmlTextBox textBox;
           foreach (DataTable dataTable in list)
           {
               Table table = new Table();
                
 
               //SetTableProperties(ref table);
 
               detail.Items.Add(table);
               table.ColumnHeadersPrintOnEveryPage = true;
               table.DataSource = dataTable;
              
 
               Telerik.Reporting.HtmlTextBox textboxGroup;
               Telerik.Reporting.HtmlTextBox textBoxTable;
               table.ColumnGroups.Clear();
               table.Body.Columns.Clear();
               table.Body.Rows.Clear();
               int colCount = dataTable.Columns.Count;
               for (int i = 0; i <= colCount - 1; i++)
               {
                   Telerik.Reporting.TableGroup tableGroupColumn = new Telerik.Reporting.TableGroup();
                   table.ColumnGroups.Add(tableGroupColumn);
                   table.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Unit.Inch(1)));
 
                   textboxGroup = new Telerik.Reporting.HtmlTextBox();
                   textboxGroup.Style.BorderColor.Default = Color.Black;
                   textboxGroup.Style.BorderStyle.Default = BorderType.Solid;
                   textboxGroup.Value = dataTable.Columns[i].ColumnName;
                   textboxGroup.Size = new SizeU(Unit.Inch(1.1), Unit.Inch(0.3));
                   tableGroupColumn.ReportItem = textboxGroup;
 
                   textBoxTable = new Telerik.Reporting.HtmlTextBox();
                   //textBoxTable.Style.BorderColor.Default = Color.Black;
                   //textBoxTable.Style.BorderStyle.Default = BorderType.Solid;
                    textBoxTable.Value = "=Fields." + dataTable.Columns[i].ColumnName;
                   textBoxTable.Size = new SizeU(Unit.Inch(1.1), Unit.Inch(0.3));
                   table.Body.SetCellContent(0, i, textBoxTable);
                   table.Items.AddRange(new ReportItemBase[] { textBoxTable, textboxGroup });
 
               }
               
 
           }
       }


It´s seems the tables are created but the data is not bind, do I miss something.

Thanks Jochanan

Elian
Telerik team
 answered on 25 Oct 2012
7 answers
256 views
Help! I am supposed to demo some reporting tomorrow but after deploying to my web server I get the error:

"Report is unavailable or session has expired"

The reports are built into their own class library. Then I use the report viewer in a web page to view the report.

This works perfectly on my development machine running locally. But, after compiling and deploying I get the above error.

Help!!!
Alberto
Top achievements
Rank 1
 answered on 24 Oct 2012
1 answer
104 views
Hi guys,

is it possible to serialize/deserialize using ReportXmlSerializer from/to specific report base class?

Core problem is that I need to access IDictionary in my report. Because of that I introduced user function that helps to solve this. But user function must be placed in an assembly where the actual report is placed. My report is xml serialized, so I have decided to create common base class which will change the assembly where telerik is searching for user functions. And there I stand in front of the problem that ReportXmlSerializer does not seems to support specific report base class.

Thanks for answers
Chavdar
Telerik team
 answered on 24 Oct 2012
2 answers
539 views

Telrik Reporting Forum…

First, I would like to commend you in developing a great tool for developing Web based reports.    A lot easier than generating the HTML and DB calls.    Bravo!

The reason I am writing is I have an issue that seems common when I Google it and browse Telerik Forums, but I haven’t found the solution that will resolve it for the Customer Service Application I developed.
 
Basically, I pull note data from my SQL Stored Procedure that has embedded carriage returns and line feeds.  The data is then bound to a textobox control on the report.  When the report is viewed, the carriage returns and line feeds are not retained, so all the text is ran together.

I am thinking, but not sure exactly how to to it, I have to some how strip the the carriage returns and line feeds and replace them before rendering control.  The thing is, since I can't see these characters, I am not sure what to search for.   Some of the note data is copied from Outlook E-Mails, maybe Word and pasted in the note field prior to saving the database.

1. With that said, what is best approach for my situation?  
2. What event do I need to place code in do the search/replace?
3. What Telerik Report Control should I use?


The Technical Specs are as follows:
ASP .net 4   VB
SQL 2008 DB
Telerik Q3 2001

Thanks In Advance


Deron
Top achievements
Rank 1
 answered on 23 Oct 2012
2 answers
87 views

Good morning,
Well, I have a problem where I would like for more than two items per line in the report barrade tools.
Follow the image for better understanding.

link for image

Sorry for my english google.




Lucas
Top achievements
Rank 1
 answered on 23 Oct 2012
5 answers
224 views
I installed Telerik 2011 Q3 on XP SP3, VS 2008 SP1 succesfull. but when starting VS 2008, An dialog appear :

Package Load Failure
Package 'Telerik.Reporting.VsPackage.VsPackage, Telerik.Reporting.VsPackage, Version=3.20.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' has failed to load properly (GUID = {xxxxxxxxxxxxxxxxxxxxx}}. Please contact package vendor for assistance. Application restart is recommended, due to possible environment corruption. Would you like to load this package in the future? you may use 'devenv /resetskippkgs' to re-enable package loading.

and then in VS 2008 I can't see menu Telerik => Reporting ( include submenus of Reporing...) and don't have Data Explore, Group Explore,...window.
I don't know how to fix it. I've installing Telerik Reporting 2011 Q2 and it run normally. After uninstaling Q2 and installing Q3, above err appear.
Please help me.

Milen | Product Manager @DX
Telerik team
 answered on 23 Oct 2012
1 answer
64 views

Hadib Ahmabi
Top achievements
Rank 1
 answered on 23 Oct 2012
1 answer
313 views
Hello,

I am working on a report that resembles mostly a crosstab, thatswhy I consider using it. 
My problem is to solve the binding of the objectdatasource, that is a List inside a List.

Looks like the following:

public class GroupedLine
    {
        public string Group { get; set; }
        public BookingType Type { get; set; }
        public BookingStatus Status { get; set; }
        public List<WeeklyStat> WeeklyStats { get; set; }
    }


    public class WeeklyStat
    {
        public DateTime WeekStart { get; set; }
        public decimal Sum { get; set; }
        public int Count { get; set; }
    }

I create a DataSource binding to the CrossTab to this list: List<GroupedLine> GroupedLines.

But I am having trouble figuring out the binding of WeeklyStats that can have as many elements as the number of weeks the user selects in the report parameters. 

I'd like to ask for advice how to accomplish a result like this (in case the selection covers a 5 weeks range):

                                 	Week 22     Week 23     Week 24     Week 25     Week 26
                                       
May28-Jun3  Jun4-10     Jun11-17    Jun18-24    Jun25-Jul1
           
Group   Type    Status      Cnt. Price  Cnt. Price  Cnt. Price  Cnt. Price  Cnt. Price
           
----------------------------------------------------------------------------------------------
           
Group1  Online  New         3   450     0   0       0   0       0   0       0   0
           
Group2  Phone   Accepted    0   0       1   80      1   110     0   0       0   0
           
Group3  Store   Accepted    0   0       0   0       0   0       1   225     0   0      
           
Group3  Store   Invoiced    0   0       0   0       0   0       2   440     0   0          
IvanY
Telerik team
 answered on 23 Oct 2012
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?