Telerik Forums
Reporting Forum
4 answers
285 views

We have what we believe followed the instruction for wiring a Telerik report to a data table but cannot get it to run.
The report has it's own class lib and the actual method to call it is in a .net website here is the calling code which produces the datatable with no issues

The source of the report definition has not been specified.

this tool is most frustrating to use...any guidance appreciated

Web interface code

   protected void Run_Click(object sender, EventArgs e)
{
    Telerik.Reporting.ObjectDataSource objectDataSource = new Telerik.Reporting.ObjectDataSource();
    objectDataSource.DataSource = GetData();  
    var report = new CallCenterReportLibrary.CSRPerformance();
    report.DataSource = objectDataSource;

    //Pass to viewer
    var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
    instanceReportSource.ReportDocument = report;
    this.ReportViewer1.ReportSource = instanceReportSource;

    ReportViewer1.RefreshReport();
}

private DataTable GetData()
{
    ReportBO objReportBO = new ReportBO();
    ReportBLL objReportBLL = new ReportBLL();

    //Campaigns
    var campaignCollection = ddlCampaign.CheckedItems;
    var campaignList = new StringBuilder();
    foreach (var item in campaignCollection)
    {
        if (item.Checked)
        {
            campaignList.Append(item.Value + ",");
        }
    }

    //Teams
    var teamCollection = ddlTeam.CheckedItems;
    var teamList = new StringBuilder();
    foreach (var item in teamCollection)
    {
        if (item.Checked)
        {
            teamList.Append(item.Value + ",");
        }
    }

    //Agents
    var agentCollection = ddlAgent.CheckedItems;
    var agentList = new StringBuilder();
    foreach (var item in agentCollection)
    {
        if (item.Checked)
        {
            agentList.Append(item.Value + ",");
        }
    }
    objReportBO.StartDate = DateTime.Parse(txtStartDate.SelectedDate.ToString());
    objReportBO.EndDate = DateTime.Parse(txtEndDate.SelectedDate.ToString());
    objReportBO.CampaignId = String.IsNullOrEmpty(campaignList.ToString().TrimEnd(','))== true ? null : campaignList.ToString().TrimEnd(',');
    objReportBO.TeamId = String.IsNullOrEmpty(teamList.ToString().TrimEnd(',')) == true ? null : teamList.ToString().TrimEnd(',');
    objReportBO.AgentId = String.IsNullOrEmpty(agentList.ToString().TrimEnd(',')) == true ? null : agentList.ToString().TrimEnd(',');

    return objReportBLL.LoadCSRPerformanceData(objReportBO);;

Stef
Telerik team
 answered on 08 Jul 2013
1 answer
114 views
Hi! 
What I try to achieve, is to get a Word document with report containing multiple, generic tables.
Let me just go straight to whats wrong:
If for example i generate three tables, which are small enough to fit on one page, everything is fine as on screenshot below:
Small tables OK

But in situation, when table have more rows and it's size exceeds size of a page, strange things happens, blank pages are added and so on:
Big tables - problems screenshot

All i do, is generate tables from code (as many tables as many data I have), then generate one big table with one column and as many rows as tables I've created, and put them inside each row. Then I add this big table to detail section. Playing with properties as keepTogether etc. did not help. Do You have any advice or ideas what could be wrong and how to deal with such problem?

Sincerely,
Bartek
Stef
Telerik team
 answered on 08 Jul 2013
1 answer
49 views
hi,
My target is to create report at run time.No configuration at design time.I follow the following link
http://www.telerik.com/help/reporting/object-data-source-how-to-bind-to-data-table.html
which is for windows application.I add the same code in a web application project.But the report shows empty.

Why this code is not working in web application?Any suggestion?Please let me know.
Ivan Hristov
Telerik team
 answered on 08 Jul 2013
2 answers
744 views
Somehow, I have spent two days trying to figure out how to do something that should be so simple.  I am using Telerik Reporting Q3 2010.  I have a data source that contains a Boolean value called IsLaborCost, a String Value called CategoryName and a decimal value for CostAmount.  I simple want my table to list the Categories that IsLaborCost is true, then a subtotal, then list the ones where IsLaborCost is false and a subtotal, and then a grand total.

I have tried adding a group and using the IsLaborCost as the Group By, but then it only shows the first category from the group.  I cannot add a child group to that to set it to just show the details.  If I add my initial group and select the Details option, then it shows all of my categories, but they are not grouped where I can add subtotals and such.  What am I missing.  I have read the documentation and played with the samples but cannot seem to get mine to work right.
Joshua
Top achievements
Rank 1
 answered on 07 Jul 2013
4 answers
87 views
I have built and deployed the reporting app to the local IIS 7 using the File System method. I have launched and tested the web site and the reporting and all works well.

When I FTP the site to a public server (Arvixe) I get a runtime error. Both the reporting DLLs have been deployed and the web site files and structure are identical. I suspect it may be in the web config which is minimal. Do you have any suggestions
<configuration>    
    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
     
    <connectionStrings>
        <add name="COTSDev"
                connectionString="Data Source=csd2011;Initial Catalog=DB;Integrated Security=SSPI"
                providerName="System.Data.SqlClient" />
        <add name="COTSProd"
                connectionString="Data Source=arvixe.com;Initial Catalog=DB;Persist Security Info=True;User ID=CSDApp1;Password=PWD"
                providerName="System.Data.SqlClient" />
    </connectionStrings>
     
    <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
        <services>
            <service name="CSharp.SilverlightDemo.Web.CustomReportService"
               behaviorConfiguration="ReportServiceBehavior">
 
                <endpoint address=""
                  binding="basicHttpBinding"
                  contract="Telerik.Reporting.Service.IReportService">
                    <identity>
                        <dns value="localhost" />
                    </identity>
                </endpoint>
 
                <endpoint address="resources"
                  binding="webHttpBinding"
                  behaviorConfiguration="WebBehavior"
                  contract="Telerik.Reporting.Service.IResourceService"/>
 
                <endpoint address="mex"
                  binding="mexHttpBinding"
                  contract="IMetadataExchange" />
            </service>
        </services>
 
        <behaviors>
            <serviceBehaviors>
                <behavior name="ReportServiceBehavior">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
            </serviceBehaviors>
 
            <endpointBehaviors>
                <behavior name="WebBehavior">
                    <webHttp />
                </behavior>
            </endpointBehaviors>
 
        </behaviors>
    </system.serviceModel>
 
</configuration>
Mark
Top achievements
Rank 1
 answered on 06 Jul 2013
1 answer
34 views
Hello,
  
I am trying to show text value uniquely while overlapping on another text, by setting it's background color white.
  
m_PageTitle.Style.BackgroundColor = Color.White;
  
But even afer setting background color, both text values are displayed overlapping each other. Instead it should hide overlapping part of another text.
  
Please help.
  
Regards,
Manish
Stef
Telerik team
 answered on 05 Jul 2013
3 answers
250 views
hi Telerik Team,
 

 

I m using telerik report version 5.0.11.510

 

Browser: Chrome
When i click on print button it gives me error
Unable to perform print operation
i also try to enable adobe plugin
but it did not work
It prints well in firefox but my clients are using chrome so i want its solution in chrome
but i want that it should print directly by pressing on print button

please give me reply its very urgent

thanks in advance
Stef
Telerik team
 answered on 05 Jul 2013
2 answers
100 views
I just upgraded to the Q2 2013 DLLs for reporting and find that the Telerik.Reporting.Report.ReportParameters Value property is not updated when the user changes an input parameter manually, always retaining its original value, whether blank or defaulted programmatically, This worked just fine before the upgrade, but has now broken all my reports.

Is this an actual bug or was there some change I need to make since upgrading to fix this problem? 
Thanks.
Stef
Telerik team
 answered on 05 Jul 2013
3 answers
121 views
6 answers
355 views
I am using Telerik Reporting for just printing in my windows service but what happen is that its showing a dialog box for printing and I am getting an exception. I have already defined a default printer name by my function. Any help would be greatly appreciated.

Exception :

Service cannot be started. System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

 System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings();
            printerSettings.PrinterName = GetDefaultPrinter();
            Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
            System.Drawing.Printing.StandardPrintController standardPrintController = new System.Drawing.Printing.StandardPrintController();
            Telerik.Reporting.Report rpt = new Telerik.Reporting.Report();            
            reportProcessor.PrintController = standardPrintController;
            reportProcessor.PrintReport(rpt, printerSettings); 



public string GetDefaultPrinter()
        {
            System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings();
            foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
            {
                printerSettings.PrinterName = printer;
                if (printerSettings.IsDefaultPrinter)
                {
                    return printerSettings.PrinterName;
                    //return printer;
                }
            }
            return string.Empty;
        }
Stef
Telerik team
 answered on 05 Jul 2013
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?