Telerik Forums
Reporting Forum
4 answers
140 views
I'm passing data sets for my master and subreport. For each row in master report, the subreport needs to call a procedure using the master row data. 

I added NeedDataSource handler in the master report constructor:
subReport2.NeedDataSource += new EventHandler(subReport2_NeedDataSource);

then I added NeedDataSource handler function as below:

private void subReport2_NeedDataSource(object sender, EventArgs e)
{
    //read parent/master row data:
    int goalID = ??; //how to get the data from the current master row?
 
    //get measurements for this goal:
    System.Data.DataSet ds2 = DataHelper.Measurements_GetMeasurementsForGoal(goalID);
    var objectDataSource = new ObjectDataSource();
    objectDataSource.DataSource = ds2;
    subReport2.Report.DataSource = objectDataSource;
}

 I have GoalID as a field of master report. How to get the current master row to read the goalID? the sender object in subReport2_NeedDataSource is an instance of SubReport2. 

your help is very appreciated!
Yanli
Top achievements
Rank 1
 answered on 09 Aug 2013
1 answer
165 views
I am trying to format the date on my Y-axis label so it shows "August, 2013"  I have set the axis LabelFormat property to {0:Y} but it still displays the full date time.  See attached picture.  
Also the data point label for March extends beyond the right side of the graph.  Is there a way to shrink the graph so the label always appears within the border of the graph?

//
// cartesianCoordinateSystem1
//
this.cartesianCoordinateSystem1.Name = "cartesianCoordinateSystem1";
this.cartesianCoordinateSystem1.XAxis = this.graphAxis1;
this.cartesianCoordinateSystem1.YAxis = this.graphAxis2;
//
// graphAxis1
//
this.graphAxis1.LabelFormat = "{0:C0}";
this.graphAxis1.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis1.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis1.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis1.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis1.MinorGridLineStyle.Visible = false;
this.graphAxis1.Name = "graphAxis1";
this.graphAxis1.Scale = numericalScale1;
//
// graphAxis2
//
this.graphAxis2.LabelFormat = "{0:Y}";
this.graphAxis2.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis2.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis2.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis2.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis2.MinorGridLineStyle.Visible = false;
this.graphAxis2.Name = "graphAxis2";
this.graphAxis2.Scale = categoryScale1;


Thank you
Thomas
Stef
Telerik team
 answered on 09 Aug 2013
10 answers
399 views
Hi,

I'm in trouble with the ReportViewer under Silverlight. Under development machine everything works fine but when deploy the project to production server (IIS7) silverlight report viewer doesn't display the report but shows a Async_ExceptionOccurred exception.
I've read all the other threads about this problems and I've checked that:

As referenced by server project following assemblies are present under the bin directory:
Telerik.Reporting.dll (also installed in GAC as a try) - 5.0.11.316
Telerik.Reporting.Service.dll (also installed in GAC as a try) - 5.0.11.316
Telerik.Reporting.XamlRendering.dll (also installed in GAC as a try) - 5.0.11.316

Of course SL project references:
Telerik.ReportViewer.Silverlight - 5.0.11.316

First I have tried without luck with the multisite bindings enabled (.NET 4 feature) as it works perfectly with the dev environment:
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
then I've tried to explicetely define telerik services and bindings (as stated in documentation):

 

  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <services>
      <service
              name="Telerik.Reporting.Service.ReportService"
              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="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
        <behavior name="ReportServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="WebBehavior">
          <webHttp />
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>
Unfortunately none of the above solution worked in my case.
Report works fine in my dev environment, is developed in SL4, under VS 2010.
The event viewer of the server doesn't report any error.
Looking at the WCF tracing (using tracing viewer) I see that telerik service is correctly open and the closed.
Also navigating to the service uri ("...\ReportService.sc") it correctly shows the service signatures.

I've create a great telerik report, my clients are ansious to see the final effect :)

Do you have any ideas on what could be wrong?

Adolfo Marinucci



Stef
Telerik team
 answered on 09 Aug 2013
1 answer
197 views
I'm using telerik reports with stored procedures and after upgrading to Q2 2012 I receive errors in the report viewer when trying to preview reports using sp's. I also have quite a few reports using dataset which runs fine still.

I use string as input parameter type and convert to uniqueidentifier inside the sp using the CAST function. This worked like a charm in my previous install (Q2 2008), but trying to run the same reports now gives the following error: 
 
An error has occured while processing Report 'some_report_name':
Conversion failed when converting from a character string to uniqueidentifier

When debugging the sp and copying the same value as I use as default value in the report parameter dialog into the input parameter value field, the sp runs fine. So it looks to me like the value of this param gets invalidated somehow between the report viewer initiation and the execution of the sp.  Any ideas ?

TIB
Tor Ivar
Top achievements
Rank 1
 answered on 09 Aug 2013
5 answers
288 views
my png image is stored on a Uri object and it has the following format
"pack://application:,,,/AppName.Modules.App.Shared;component/Images/AppName_logo.png"

how do I put this image into the .value property of a PictureBox element in my report.

regars.
Wadigzon
Top achievements
Rank 1
 answered on 08 Aug 2013
3 answers
801 views
I have a report and i need to insert a page break based upon a group. I already know that i can insert page break after any report section. But i need to break page in the detail section. I have a scenario something like that:
There are some summary rows (Based on a customer). After the summary rows, I want to show the details against that customer. This goes on for multiple customers. I need to break page after one customer's data ends. Now, i need to know that is there a way to insert page breaks within a section (Not after a section, i know it is possible).

I know this is not possible, but is this functionality added in the latest version (2013 Q1)...?
Stef
Telerik team
 answered on 08 Aug 2013
1 answer
41 views
Hi all,
Please can anybody help me out that how this report should be implemented. i'm totally getting freaking out... and the deadline is closed ahead..

kind regards
Squall
Top achievements
Rank 1
 answered on 07 Aug 2013
1 answer
102 views
Hi,
we are developing a custom report designer for end users. The designer works against the CLR API while reports are persisted as serialized trdx.

To provide our designer with additional information, we decided to extend some of the classes. While this works just fine in some cases, it breaks the serialization in others.

Working example:
public class ExtendedColumn : TableBodyColumn
{
  public string Name { get; set; }
}


Broken example:
public class ExtendedTable : Table
{
  public int HeaderHeight { get; set; }
}

While the additional property is in fact being serialized, some parts of the base class are not. In this case the table's xml node '<Corner />' remains empty and the table body's node '<Cells/>' is missing.

Is there another way to achieve the desired behavior?

Kind regards
Sebastian
Elian
Telerik team
 answered on 07 Aug 2013
7 answers
300 views
well the code below works fine on development machine but when moving it to the web i get the error in the graphic.

Here is the code:
private void crosstab1_NeedDataSource(object sender, EventArgs e)
{
  using (EntitiesModel dbContext = new EntitiesModel())
  {
    int dealid = Global.GetInt32(this.ReportParameters["dealID"].Value.ToString());
    int version = Global.GetInt32(this.ReportParameters["version"].Value.ToString());
    bool amended = Global.GetBool(this.ReportParameters["amended"].Value.ToString());
    bool postContract = Global.GetBool(this.ReportParameters["postContract"].Value.ToString());
    bool staging = Global.GetBool(this.ReportParameters["staging"].Value.ToString());
    bool commOption = Global.GetBool(this.ReportParameters["commOption"].Value.ToString());
 
    IEnumerable<rsDealsDealerOpt> d = dbContext.GetDealsDealerOptions(dealid, version, postContract, staging, amended, commOption);
 
    crosstab1.DataSource = d;
  }
Any thoughts on what is going on?

Thanks,
Richard

richard
Top achievements
Rank 1
 answered on 06 Aug 2013
2 answers
68 views
Hello.

Using version 6.2.12.1017 with Silverlight. 
I have a cross tab report with NeedDataSource event loading report data. The report has toggle visibility actions to collapse/expand cross tab row/column groups. On my dev box everything works as expected.

Once deployed to QA environment, toggle actions result in empty report, not blank but like if no data.

After some research I found that on my dev box NeedDataSource is fired only once, toggle actions don't fire it. I guess in this case data is taken from cache. But in QA I see NeedDataSource is fired for every toggle click. In addition to in, despite of multiple event firing, report items binding doesn't work, that's why report is empty.

Could someone point me to some solution for this. I checked configuration, files, everything is the same with my dev box. Now have no idea what can cause such misbehavior.

Thanks in advance.



Dmitry
Top achievements
Rank 1
 answered on 06 Aug 2013
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?