Telerik Forums
Reporting Forum
1 answer
88 views
Our current reports look something like:

public partial class AlertProgressReport : Report
{
    private readonly AlertProgressReportModel _model;
    public AlertProgressReport()
    {
        InitializeComponent();
    }
    public AlertProgressReport(AlertProgressReportModel model) : this()
    {
        _model = model;
        table1.DataSource = _model.Rows;
    }
    private void textBoxTitle_ItemDataBinding(object sender, EventArgs e)
    {
        textBoxTitle.Value = _model.DateColumnNames["AlertName"] as string;
    }


The empty constructor is so that the report works in design mode.

We have only used telerik for its design surface to create awesome reports in  PDF.

Our app is in ASP.NET MVC so in our controller action we create the viewmodel that we send to the report using the overloaded constructor and then send the "Report" object to our custom action result which forces the user's browser to download the generated pdf.

System has worked well, however, now we need this in Silverlight also.

Do you have a sample on how I can implement my own ReportService this way I can use ServiceHostFactory to inject our dependencies and do exactly like we do in ASP.NET MVC?

We understand this approach might require we create an Svc per report. 




 

 

 

 

leblanc
Top achievements
Rank 1
 answered on 13 Jun 2011
1 answer
56 views
Hi,
I am trying develop some reports in silverlight 4 application with Telerik Reporting Q3 2010 version. My problem is i don't know how to do it with WCF netTcpBinding binding.
I am in confusion with the service configuration value for ReportService in WCF service config file.

Please help me ASAP by providing any guideline or with source if anyone have any sample workaround with Silverlight 4 application + Telerik Reporting + WCF netTcpBinding.
Peter
Telerik team
 answered on 13 Jun 2011
1 answer
194 views
I have looked through the forums and demos but have not seen a demonstration of this.

I created a a class library and report (w/ parameter). I then added a reference to the project in a ASP website and added a viewer and my report to a control on a page. The report works great when I select the parameter from my list of values.

What I would like to do, and haven't seen an example of, is navgate to the page my report is on and pass the parameter in the url.

An example of the url would be;
http://localhost:50536/Pages/Voucher.aspx?TrackID = 1000

1.) Can you provide me with a rundown on how this is accomplished?
2.) What changes would I need to make to my class library/report to change from manually setting the parameter?

The website is ASP with VB.net code behind.
TelerikReporting Q1, 2011

Thanks for the help,
IvanDT
Telerik team
 answered on 13 Jun 2011
3 answers
437 views
hi!

i would like to know if i can prevent the designer to expand the width of the report when i move a control. If for example and i want to move a textbox to the right and that the control cross the end of the report width, the report will auto-extand and i need to change the report width to the good value again.

so is it possible to lock values in the designer?

alex

bash
Top achievements
Rank 1
 answered on 13 Jun 2011
1 answer
89 views
Hi,

I'm trying to create a report that represents a calendar with appointments listed for each day. I am following the example provided here: http://blogs.telerik.com/blogs/posts/11-05-03/creating_a_calendar_report_with_telerik_reporting.aspx

PROBLEM 1:
The problem is that when I preview the report at both design and runtime the report generates a calendar for each day in my date range. So for example if the date range is 1 June 2011 through 30 June 2011 I get 30 pages with the June calendar on each page. I can't for the life of me figure out why. Again, I followed the code example above and cannot determine the difference between the sample solution and mine.

PROBLEM 2:
This is not as important but the subreport in the body of the crosstab is positioned to the 0, 0 position of the crosstab itself, not the crosstab of the body. The problem exists in the sample above.

PROBLEM 3:
How can I allow the crosstab body to grow? If the contents of any one day in the calendar is greater than the available space I want the day bounding areas to expand.

Thanks,
Dave
Peter
Telerik team
 answered on 13 Jun 2011
1 answer
83 views
Is there a way for me to handle the "export to CSV" server side? I have a requirements that states that the export from a report delivers a row/col result that contains data not bound to the report. Far as I can tell, there is not an "OnExport" event available in the report viewer.
Steve
Telerik team
 answered on 13 Jun 2011
1 answer
484 views
Hi,

How can I change the visibility of a panel (or for that matter, any UI element) based on the value of a piece of data returned in the report's Select statement?

Can I access the report data in the 'code behind' of the report without going through user functions?

Can I execute code that accepts data fields at a higher level than the individual report field level e.g. to hide or show a panel based on a data value?

Apologies for the 3-in-1 question!

Regards,
Steve
Steve
Telerik team
 answered on 13 Jun 2011
3 answers
127 views

I have recently upgraded one of my reporting projects to the latest version of Telerik (5.0.11.510) and I have noticed that if a text box has no underlying data (Null or blank values) then it is not rendered on the report. The problem that I have is I use the text boxes to draw lines on the report (make a grid) using the textbox borders, if they are not rendered then I get gaps in my grid (see screen shot attached.
Is there an option to force the report to render all of the text boxes like it used to do in previous versions?

Steve
Telerik team
 answered on 13 Jun 2011
0 answers
80 views
Hi,
here the problem:
I create a Report and i test it by a winfrom it work fine. If i modify this report adding some code getting data form my DataLayer and i compile it all still  run fine, but the design of my win form (in design time) show me  an error

1- I create 2 class in report  library

 

 

 

 

public class mCubeDistrXday
    {
        public int cont { get; set; }
        public string cardType{ get; set; }
        public string Country{ get; set; }
        public string na { get; set; }
        public DateTime ? date { get; set; }
    }


public  class lstCubeDistrXday : List<mCubeDistrXday>
    {
  
     }

2- I create a Table Report (with WIzard)
the datasource is lstCubeDistrXday collection.

3-I create a report by wizard
-As datasource type i set the  ObjectDataSource one.
-I bind it to my DataLayer Library and i set a method  as datamemeber (let say...getMyItemsFromDB) My DL library is referncede in Reprto Library
-The wizard let me choice the fields to put in table report.
-Finally i have A table report with all my filed

4- I write some code to populate the collection (i want tesst it wit a hardcoded collection first, so i dont yet get data from DL):

private List<Model.mCubeDistrXday> myItemList = new List<mCubeDistrXday>();


       public Report8() {   
            InitializeComponent();             
            mCubeDistrXday i = new mCubeDistrXday();
            i.cont=10;
            i.data=new DateTime(2011,02,02);
            i.na="";
            i.cardType="OPE";
            i.country= "ITA";
  
             myItemList.Add(i);
            i = new mCubeDistrXday();
            i.cont = 10;
            i.data = new DateTime(2011, 02, 02);
            i.na = "";
            i.cardType= "OPE";
            i.country= "EXT";
  
            myItemList.Add(i);  
  
     var selectqry =
      from t in myItemList 
        where t.nazione != null && t.tipoTessera != null && t.data != null
      select new { nazione = t.nazione, tipoTessera = t.tipoTessera, cont = t.cont, data = t.data, na = t.nazione == "ITA" ? "ITA" : "EXT" };
    
    this.objectDataSource1.DataSource = selectqry;
}

4-I add a winForm project to my solution  to debug the report  the report
on the form i add a reportViewer then a ReportBook i ad my report to Rport book and finally i set hte property report to report81 (it is my report)
ALL WORK FINE and i See my data in my report

Now  i try to binf me DataLayer, just a little change:

public partial class Report8 : Telerik.Reporting.Report
   {
       
       private DataObjectsSE.IDbStat.IDbStatDao daoDbStat = DataObjectsSE.DataAccess.dbStatDao;
       public Report7() {
           //
           // Required for telerik Reporting designer support
           //
           InitializeComponent();
   
    
var selectqry =
         from t in daoDbStat.getCubeTipoTesseraDataNazione("MyParam")  
         where t.nazione != null && t.tipoTessera != null && t.data != null
         select new { nazione = t.nazione, tipoTessera = t.tipoTessera, cont = t.cont, data = t.data, na = t.nazione == "ITA" ? "ITA" : "EXT" };
           this.objectDataSource1.DataSource = selectqry;
}

I compile the report Library and i launch the winForm project to see the report.

ALL WORK FINE. i can see my Data.
But i have a problem:  at design time the WINFORM can't display and shows me  the following message:

The variable 'report71' is either undeclared or was never assigned.



 
Instances of this error (2)
1.
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
2.
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
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)
 
Help with this error
 
Forum posts about this error



PLease, any Idea?


























ciccio
Top achievements
Rank 1
 asked on 11 Jun 2011
1 answer
94 views
Please remove, solved....

Justin
Top achievements
Rank 1
 answered on 10 Jun 2011
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?