Telerik Forums
Reporting Forum
3 answers
183 views

Telerik Version: 6.1.12.820

 

 


Hello,

I have a major issue with some of the subreports coming in as white space (not a blank table).

We have a win form with 2 telerik reportviewers stacked ontop of each other.  One displays the individual mainpage + subreport combo while the other loads all the combinations of the main page + subreports (about 100 or so, totaling 350 pages (abouts), this one uses the ReportBook concept).  We do this because we need to be able to preview the reports while the large report is building since it takes anywhere from 3-20 mins.  And once it's completed we hide the single report viewer and show the one with all the reports.

All this was working fine but in the last few days it has been displaying blank subreports on both the large report and the single report, not necessarily the same subreport.

<Summary>

I have 1 main report with an empty detail section.  I have a subreport with a table in it (blank).  At runtime I basically stuff the subreports in the main report.  All this is working fine except as of lately, several subreports are coming up as white space.  I mean, you see the main pages header and footer, but where the detail is, it's all white. 

Now to take this a step further, if you save as pdf, some of the subreports are white spaces, not necessarily the same ones that are blank in the viewer.

this is basically what I do:

 

                    foreach (...)
                    {
                        var genericSubReport = new GenericSubReport(data, title);

                        Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();

                        instanceReportSource.ReportDocument = genericSubReport;

                        //use w/o subreports defined
                        Telerik.Reporting.SubReport subReport = new Telerik.Reporting.SubReport();
                        subReport.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(subReportDefaultLocation), Telerik.Reporting.Drawing.Unit.Inch(currentLocation));
                        subReport.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(subReportWidthSevenPointNine), Telerik.Reporting.Drawing.Unit.Inch(subReportSpacer));
                        measureReport.Items["detailSection"].Items.Add(subReport);

                        subReport.ReportSource = instanceReportSource;

                        subReportIndex++;
                        currentLocation += LOCATION;
                    }

The subreport itself, builds the table in the code behind.  We do all this becase it was either design 100+ reports or use a dynamic model.  Other thing to note is the subreports do not use the NeedDatasource but do use the ItemDataBinding.

</Summary>



Stef
Telerik team
 answered on 11 Nov 2013
2 answers
240 views
The toggling works.  I'm just doing grouping and putting the action toggle visibility on a textbox in the group header and the toggle targets are the groups below. (I'm not using a table or crosstab).   It's just always expanded initially.  If I check the Initially expanded all it does it change the + to a - but all the detail items or group below items  are still displayed.  I think I'm missing something.

This report is very basic
Group 1 -- Year
Group 2 -- Month
Details -- Day  Data1 Data2 Data3

I have toggle vis on group 1 and group 2
danparker276
Top achievements
Rank 2
 answered on 11 Nov 2013
1 answer
65 views
hi

while designing the report an error message appears, and the program shuts down. How to troubleshoot this problem?

program bug screenshots;
http://prntscr.com/22jxwy
http://prntscr.com/22jy0k

my system;
http://prntscr.com/22ol75

Thanks.
Ivan Hristov
Telerik team
 answered on 11 Nov 2013
3 answers
295 views
Dear experts

Is there anyway to set the default path for Save As dialog during Export in Wpf Report Viewer?

Thanks
tungngie
Stef
Telerik team
 answered on 11 Nov 2013
3 answers
730 views
Hi,

I would like to programmatically do an export of my multi-paged report to PNG format, i.e. the end result should be 3 PNG files for a 3 paged report and so on. Is it possible to do this? And can I specify the filenames for each file programmatically or is it auto-generated? The whole process should be transparent to the end-user, i.e. I do not want the end user to click on the Export button and type in the file name in the File Dialog that pops up. Instead the program should do an auto-export to the required format and use names such as "Report1_pg1.png", "Report1_pg2.png" etc... Hope you can help me on this. Thanks.
Nasko
Telerik team
 answered on 11 Nov 2013
1 answer
270 views
Hi,
I am working with the integrated tool in visual studio. The attached picture shows a report where I have set the margins left and right= to 1 cm.
My understanding is that, in order to get it printed correctly, no controls or images should stay out of those margins.
The problem is that I clearly see the red line indicating the margins on the right and therefore I can manage to position the elements of the report on its left but the margin on the left side of the report (red line) is not showing correctly as it is on the edge of the report and not 1 cm inside as it should be.
Is this a bug or there is something I am missing?

Moreover, knowing that I will set the side margins at 10mm from left and right, should a give the report the total dimensions of the paper size less the margins ( A4= 210 mm, margins 10+10, report width= 210-10-10=190 mm)?
Or there is another way to handle this ? 

Peter
Telerik team
 answered on 11 Nov 2013
5 answers
352 views
Greetings

This concept should be straightforward; however, I have not been able to see it in the documentation.

How do I add Report-Book navigation based on the reports dynamically added to the Report Book. I want a navigation similar to the demo page - http://demos.telerik.com/reporting/report-book/demo.aspx

I do not need document-map, rather just links that will enable me to navigate from report to report, once the report book has been dynamically created.

Please advise
Thanks
Nasko
Telerik team
 answered on 11 Nov 2013
1 answer
100 views
Hello,

Still testing Telerik reporting. I tried to use an ObjectDataSource to reuse the repository layer of my application.

So I added a reference to my project from the Report project. Everything was fine until I had to signed the Repository assembly in my solution.

I tried to signed as well the TelerikReports assembly but it's still not working.

I double check if there was an x64 or x86 issue but all assemblies in my solution are built against AnyCPU.

Is there any known restriction by using signed assemblies in the designer?

EDIT1: Forgot to mention that I also installed the DLL in the GAC.

Pierrick
Peter
Telerik team
 answered on 11 Nov 2013
7 answers
584 views
I need to exec a stored procedure. Some of the parameters are strings (but can also be null) and need to have this format: < 'IntVal1,IntVal2,IntVal3' >.
IntVals are basically city IDs.
I managed to format them with Join function:  Join(",",Parameters.Cities.Value).
The problem I'm facing is when the parameter City is null (I sometimes need it to be null). The Join function outputs an error in that case. To avoid calling the Join function when the param City is null I tried the following:
@queryParamCity   =   IIf  (Parameters.Cities.Value,  Join(",",Parameters.Cities.Value),  null)
or
@queryParamCity   =   IIf  (Parameters.Cities.Value IS NOT null,  Join(",",Parameters.Cities.Value),  null)
or 
@queryParamCity   =   IIf(Parameters.Cities.Value is null,null,Join(",",Parameters.Cities.Value))
.....but the Join function is still being called even if the City parameter is null, so it generates an error and the execution is stopped.

So, no matter what is the value of the expression, the other two member of the IIf function are called.
Gaurav
Top achievements
Rank 1
 answered on 11 Nov 2013
2 answers
136 views
OK, this is an odd one but I have a CrossTab report that when run locally on my dev machine under IIS runs perfectly fine.

However when run in Azure the needDataSource event for the CrossTab isn't raise.  I have attached a remote debugger, I can see the report initialize, and the Reports NeedDataSource event is raised however CrossTab1_NeedDataSource is never executed.  

No errors are thrown, no error statements in the console during debugging.

Is there another way to force the NeedDataSource even to fire?  Or a way to bind the cross tab(s) from the reports datasource.

using System.Linq;
using Bentley.SelectServer.Database;
using System;
 
namespace Bentley.SelectServer.Reporting
{
/// /*------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Summary description for MonthlyPeakUsage.
/// </summary>
/// <author>marcus.kellermann</author>                                                  <date>7/23/2013</date>
/// /*------------------------------------------------------------------------------------------------------*/
//public partial class MonthlyPeakUsage : Telerik.Reporting.Report, iBaseReport
public partial class MonthlyPeakUsage : BaseReport, iBaseReport
{
 
public MonthlyPeakUsage()
    {
    InitializeComponent();
    this.DocumentName = GetReportName();
    this.crosstab1.NeedDataSource +=crosstab1_NeedDataSource;
    }
 
///*--------------------------------------------------------------------------------------**/
/// <summary>
/// Report Name used for Display in the report and parameters name
/// </summary>
/// <returns></returns>
/// <author>Marcus.Kellermann</author>                              <date>07/2011</date>
/*==============+===============+===============+===============+===============+==========*/
public string GetReportName()
    {
    return ReportingStrings.MonthlyPeakUsageReport;
    }
 
///*--------------------------------------------------------------------------------------**/
/// <summary>
/// Creates the Report Configuration Object used to configure the reporting GUI
/// </summary>
/// <returns>Report Configuration</returns>
/// <author>Marcus.Kellermann</author>                              <date>07/2011</date>
/*==============+===============+===============+===============+===============+==========*/
public ReportConfiguration GetReportConfiguration()
    {
    return new ReportConfiguration
        {
        ShowGeneralParametersTab=true,
        ShowMachineParametersTab=false,
        ShowUserParametersTab=false,
        ShowVirtualSites = false,
        ReportName = ReportingStrings.MonthlyPeakUsageReport,
        ShowIncludeDetails = false,
        ShowCAGOption = false
        };
    }
 
/// /*------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Handles the NeedDataSource event of the crosstab1 control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
/// <author>marcus.kellermann</author>                                                  <date>7/23/2013</date>
/// /*------------------------------------------------------------------------------------------------------*/
private void crosstab1_NeedDataSource(object sender, EventArgs e)
    {
    Telerik.Reporting.Processing.Table table = (Telerik.Reporting.Processing.Table)sender;
    Telerik.Reporting.Processing.Report rpt = table.Report;
 
    DateTime startDate = (DateTime)rpt.Parameters[ReportParameterNames.StartDate].Value;
    DateTime endDate = (DateTime)rpt.Parameters[ReportParameterNames.EndDate].Value;
    String userID = (String)rpt.Parameters[ReportParameterNames.UserID].Value;
    string reportID = (String)rpt.Parameters[ReportParameterNames.ReportID].Value;
    Boolean includeWeekends = (bool)rpt.Parameters[ReportParameterNames.IncludeWeekends].Value;
    //Jiao: Add UltimateID to ReportParameter
    long ultimateID = long.Parse ((string)rpt.Parameters[ReportParameterNames.UltimateID].Value);
 
    var reportDataSet = Reports.MonthlyPeakUsage(startDate, endDate, userID, new Guid(reportID), includeWeekends, ultimateID);
    ReportUtils.CheckReportSize(reportDataSet.MonthlyPeakUsage.Count());   
 
    table.DataSource = reportDataSet.MonthlyPeakUsage;
    }
 
private void MonthlyPeakUsage_NeedDataSource(object sender, EventArgs e)
    {
    RPTLogger.Log.trace("In Report Need DataSource");
    }
Stef
Telerik team
 answered on 08 Nov 2013
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?