Telerik Forums
Reporting Forum
1 answer
117 views
I just converted my Telerik reports to Q3 2012 and they all work except for two reports that have subreports.  The NeedDataSource event is not firing for the subreports.  Here is the code.  What am I doing wrong?  Thanks.
My report .aspx:
 
CPR_Reports.SalesActivityReport report1 = new CPR_Reports.SalesActivityReport(myConnectionstring, Convert.ToInt32(Session["pk"].ToString()), Convert.ToInt32(Session["cpruser_no"].ToString()), fromdate, todate);
InstanceReportSource instanceReportSource = new InstanceReportSource();
instanceReportSource.ReportDocument = report1;
this.ReportViewer1.ReportSource = instanceReportSource;
 
My report class:
 
public partial class SalesActivityReport : Telerik.Reporting.Report
{
    public SalesActivityReport(string myConnectionstring, int cfkwebuser, int cfkpnnames, string fromdate, string todate)
        {
            localConnectionstring = myConnectionstring;
            localCfkWebUser = cfkwebuser;
            localCfkPnnames = cfkpnnames;
            localFromDate = fromdate;
            localToDate = todate;
 
        InitializeComponent(reportHeaderBgColor, reportHeaderTextColor);
         
        SalesActivitySub1 salesActivitySub1 = new SalesActivitySub1();
            SubReport subReport1 = new Telerik.Reporting.SubReport();
            Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
            instanceReportSource.ReportDocument = salesActivitySub1;
            subReport1.ReportSource = instanceReportSource;
            subReport1.NeedDataSource += new EventHandler(subReport1_NeedDataSource);
 
    private void subReport1_NeedDataSource(object sender, EventArgs e)
        {
            EventLogger log1 = new EventLogger();
 
            string commandText = @"exec wa_SalesActivityCallsLogged2 " + localCfkPnnames + ",'" + localFromDate + "','" + localToDate + " 23:59:59'";
 
            try
            {
                SqlConnection sqlConnection1 = new SqlConnection();
                SqlCommand sqlSelectCommand1 = new SqlCommand();
                SqlDataAdapter sqlDataAdapter1 = new SqlDataAdapter();
                sqlConnection1.ConnectionString = localConnectionstring;
                sqlSelectCommand1.CommandText = commandText;
                sqlSelectCommand1.Connection = sqlConnection1;
                sqlDataAdapter1.SelectCommand = sqlSelectCommand1;
            this.DataSource = sqlDataAdapter1;
            }
            catch (Exception ex)
            {
                log1.WriteError(ex);
            }
            finally
            {
                log1.Dispose();
            }
        }
}
Dan
Top achievements
Rank 2
 answered on 05 Dec 2012
1 answer
311 views
Hello,
I have developed one report using Telerik reporting and I am getting some trouble in that. Please review this screenshot.
It shows image of my report, my problem is I ma getting extra spaces between Report header and Report detail part. So please any one can help me in how to remove that extra space?

Also I am getting my report footer very bottom of the page I want that after detailed section gets complete.

Please help me in both issues.


Thanks,
Anvesh
Elliott
Top achievements
Rank 2
 answered on 05 Dec 2012
11 answers
938 views
Hi, I have seen several posts on this and I cannot seem to solve this problem after trying what I found in those posts. I have Reporting installed on my VS 2008 system (running XP) and I successfully created my report and now want to add it to my webapp. I read that I must add the Report Viewer and that it can be found in the VS Toolbox. I have a Radcontrols for ASP.Net section in toolbox but nothing called Reportviewer. I have a Reporting section in my toolbox but nothing Telerik-related. I looked in the General section and also the Standard section of the toolbox to no avail.
I have uninstalled Reports and reinstalled Reports (with VS 2008 NOT running) and still do not see the Reportview control. I have reset the Toolbox and this did not change anything.

My VS menu bar has a Telerik menu item which has a Reporting item that only points to an UpgradeWizard utility.

thanks for your help.
Steve
Telerik team
 answered on 05 Dec 2012
0 answers
90 views
HI i want to move controls on webpage of telerik reporting tools. So when page loaded we can drag and drop the control.
Like DragPanel handler in AJAX.

Is this possible in Telerik Reporting Controls???  
Sam
Top achievements
Rank 1
 asked on 05 Dec 2012
1 answer
122 views
I tried to add a reference to the Report Viewer assembly for WPF and I got the error that you see in the attachment. For your description on your web site I understand that it is only the designer that requires .NET 4 and not the viewer.
What's happening!?
Steve
Telerik team
 answered on 05 Dec 2012
1 answer
332 views
Hello

I'm looking for a solution to modify the company logo size on the report (pdf format) according to the page number it is on.

On first page it should be bigger than the rest of the pages.

Is that in any way possible?

Thanks
Roland
Peter
Telerik team
 answered on 04 Dec 2012
4 answers
148 views
In report class, I make some calculations. like:

my variable is declared like:

Protected  runningPageValue As Double


Private Sub pageFooter_ItemDataBound(sender As Object, e As EventArgs) Handles pageFooter.ItemDataBound
 
    Dim processingPageFooter = TryCast(sender, Telerik.Reporting.Processing.PageSection)
    Dim processingPageExecTextBox = TryCast(processingPageFooter.ChildElements.Find("txtSayfaToplami", True)(0), Telerik.Reporting.Processing.TextBox)
    runningPageValue += Convert.ToDouble(processingPageExecTextBox.Value)
 
    Dim processingRunningPageExecTextBox = TryCast(processingPageFooter.ChildElements.Find("TextBox3", True)(0), Telerik.Reporting.Processing.TextBox)
    processingRunningPageExecTextBox.Value = runningPageValue
 
End Sub

as a result when I refresh report, export report to pdf, print report etc.. all report events run again (naturally) but my variable never sets to zero. I tried all disposed events but could not succeeded.

I need to understand if report ends, then set runningPageValue=0

how a report component does not have completed event ? how should I use variables here ? please help. everytime report prints, refreshes or esports, number are groving, bigger and bigger.

Elliott
Top achievements
Rank 2
 answered on 04 Dec 2012
2 answers
292 views
Hi,

I want to export a chart report to excel. Right now exporting works fine. A new requirement is to edit the chart in the excel. Right now it will export a image for the chart. How can I export real chart, not image to excel? 

Here is my exporting code:
var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
                Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("xlsx", report, null);

                string fileName = user_keyid + "_" + project_id + @"\" + Guid.NewGuid().ToString() + "." + extstr;
                if (!System.IO.Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + user_keyid + "_" + project_id))
                {
                    System.IO.Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + user_keyid + "_" + project_id);
                }
                var fs = new System.IO.FileStream(AppDomain.CurrentDomain.BaseDirectory + fileName, System.IO.FileMode.OpenOrCreate);

                fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);

                fs.Flush();

                fs.Close();

Any help will be appreciated!
zxp
Top achievements
Rank 1
 answered on 04 Dec 2012
1 answer
252 views
Hi,

Is there a list of the client side methods or events that are available for the Web Report viewer?  The current Q3 2012 client side API does not include methods that are referenced in the help forums such as:

OnPrint
OnPrintReportLoaded
OnReportLoaded
etc.

Any help and further documentation would be appreciated. We are specifically wondering if there are any methods/events triggered on client side export, but a full list of available functionality would be great.

Thanks!
Steve
Telerik team
 answered on 04 Dec 2012
1 answer
600 views
hello i added a reportviewer and from its properties set the report and a parameter, but the value for the parameter has to come from session variable, i want to achieve this by adding it in the reports.parameters, how do i set it.

i do not want to do it from codebehind.

Steve
Telerik team
 answered on 03 Dec 2012
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?