Telerik Forums
Reporting Forum
1 answer
262 views
Hi,

I am using Telerik Report Q3 2010 SP1 (4.2.10.1221).
I created a master report and would like to add several sub-reports to it at run time with different data sources.

With the follow code, it generates what I want: (see attached image: expected.png)
public MasterReport()
{
      InitializeComponent();
      AddSubreports(111);
}

private void AddSubreports(int headerId)
{
        ReportDataSource c = new ReportDataSource(headerId);
        dss = c.GetSources();
        foreach (ParameterValuesReportDataSource ds in dss)
        {
            IndividualParameterReport subreport = new IndividualParameterReport(ds);
            SubReport subReport = new SubReport();
            subReport.Size = new SizeU(Telerik.Reporting.Drawing.Unit.Cm(8), Telerik.Reporting.Drawing.Unit.Cm(1));
            subReport.Dock = DockStyle.Top;
            subReport.ReportSource = subreport;
            detail.Items.Insert(0, subReport);
        }
}

However, I need to get the headerId first before I can call AddSubRepots method, so I modified the code to such:
public MasterReport()
{
InitializeComponent();
DataSource = null;
NeedDataSource += new EventHandler(MasterReport_NeedDataSource);
}
 
void MasterReport_NeedDataSource(object sender, EventArgs e)
{
headerId = Int32.Parse(ReportParameters["ParameterHeaderId"].Value.ToString());
AddSubreports(headerId);
}
Please see attached image: wrong.png 

The first two tables should contain 2 rows and the third one should contain 5 rows, but it only shows 2 in this case.
If I modified the order of my data source, show "Material" first, all tables display 5 rows.
Can someone help with explaining what's happening here?

Thanks,

VH
Peter
Telerik team
 answered on 13 Jan 2011
1 answer
163 views
I have Telerik reporting in my silverlight application. How to make the ReportService to work with both http and https at the same time? If I make it to work with https it stops to work with http and if I make it to work with http it stops to work with https.
Steve
Telerik team
 answered on 13 Jan 2011
1 answer
71 views
In visual studio, the report and all his subreports are rendering well, but in the browser I have the following error message on every subreport : Format of the initialization string does not conform to specification starting at index 0. The parameter is a string (the id of an employee) and subreports show other data from that employee. My project is a web app (ASPx) on sql server 2008 and VS 2010. Thanks for help (I am a french speaker, so...)
Steve
Telerik team
 answered on 13 Jan 2011
4 answers
237 views
Hi

right now for my current project, whenever i create a new reportViewer to show my report and i always get the error message:
XamlParseException Occurred
Failed to assign to property 'System.Windows.ResourceDictionary.Source'. [Line: 5 Position: 36]

Note that i have just updated to the Q3 for my report(before updating i even get the error message in the design mode, however by using Upgrade Wizard to update to Q3 the error at design mode is gone). Right now only at runtime . And my silverlight control is using the latest Q3 too

My reporting version is 4.2.10.1221
my silverlight control version is 2010.3.1110.1040




I ABSOLUTELY have no idea what is going on. For my current project, i try to create a NEW simple page which only contains ReportViewer control (nothing special, no source supply too). And try to test it but still get the error
However, if i create a NEW PROJECT, with the same simple page which contains the ReportViewer only , then everything runs fine.
So i think there must have some compatible issue here.

I tried to clean the solution and rebuild it but no luck too


this is the stack trace:
System.Windows.Markup.XamlParseException occurred
  Message=Set property 'System.Windows.FrameworkElement.Style' threw an exception. [Line: 14 Position: 41]
  LineNumber=14
  LinePosition=41
  StackTrace:
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at SilverFinancials.WindowsReport.FinancialAccountReport.InitializeComponent()
       at SilverFinancials.WindowsReport.FinancialAccountReport..ctor()
  InnerException: System.Windows.Markup.XamlParseException
       Message=Failed to assign to property 'System.Windows.ResourceDictionary.Source'. [Line: 5 Position: 36]
       LineNumber=5
       LinePosition=36
       StackTrace:
            at MS.Internal.XcpImports.CreateFromXaml(UnmanagedMemoryStream stream, String sourceAssemblyName, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers)
            at System.Windows.Controls.Control.GetBuiltInStyle(IntPtr nativeTarget, IntPtr& nativeStyle)
       InnerException: System.Collections.Generic.KeyNotFoundException
            Message=The given key was not present in the dictionary.
            StackTrace:
                 at System.ThrowHelper.ThrowKeyNotFoundException()
                 at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
                 at System.Windows.ResourceManagerWrapper.GetResourceForUri(Uri xamlUri, Type componentType)
            InnerException: 


My xaml. It is very simple. A RadWindow contains the reportviewer . The window will be popped up through the clicked event of the menuItem in the RadRibbonbar.
<telerik:RadWindow x:Class="SilverFinancials.WindowsReport.CheckReport"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                   xmlns:telerikReport="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"
    mc:Ignorable="d"
                   Closed="Check_Print_Closed"
                   Header="Check Print"
    d:DesignHeight="300" d:DesignWidth="400" Width="970" Height="600">
     
    <Grid x:Name="LayoutRoot" Background="White">
        
            <telerikReport:ReportViewer  Name="checkReport" Width="970" Height="600"
 >
            </telerikReport:ReportViewer>
         
        
    </Grid>
</telerik:RadWindow>

Code behind
using SilverFinancials.Windows.Accounts_Payable.Posting;
using Telerik.Windows.Controls;
 
namespace SilverFinancials.WindowsReport
{
    public partial class CheckReport : RadWindow
    {
        
        public CheckReport()
        {
            InitializeComponent();
            }
             
             
     
    }
}



plz help me
Tai
Top achievements
Rank 1
 answered on 13 Jan 2011
1 answer
592 views
I have a text field in a report we are using to display multi-line string data from a database that contains tab characters (ascii 9).  These are getting compressed to single spaces or just not getting displayed at all.  Is there any way to print text with tabs and have the report process the tabs correctly?  We tried the HTML control as well and not able to find an answer with it either, plus it does not process cr/lf either (have to replace those with <BR> tags), which the text field does correctly.  We are using Q2 2010 right now, not seeing anything in Q3 2010 that would give us any help with this.  We have many customers displeased because what they are expecting is not what they see on these reports. Thanks for any advice you can give.
Peter
Telerik team
 answered on 12 Jan 2011
1 answer
145 views
Is there away to create a report based on the following SQL querie:

declare @date smalldatetime
select @date = GETDATE()
select @date = CONVERT(varchar(12),getdate(),101)
  
SELECT PEERS.COMPANY_NAME, PEERS.ASN, EXCHANGES.EXCHANGE_NAME, PEERINGS.CREATED
FROM EXCHANGES 
  
INNER JOIN PEERINGS ON EXCHANGES.EXCHANGE_ID = PEERINGS.EXCHANGE_ID 
INNER JOIN PEERS ON PEERINGS.PEER_ID = PEERS.PEER_ID
  
  
WHERE PEERINGS.CREATED BETWEEN @date + '00:00' AND @date + '23:59'

It appears that the use of declare is not supported.
Peter
Telerik team
 answered on 12 Jan 2011
0 answers
69 views
I'm using Telerik reporting in my silverlight project and there is one problem here. I need to bind the size of the textbox font to some property in my ViewModel on server side, before report starts to render. I need this cause this value can be changed dynamically.
Is there any solution?
Vlad
Top achievements
Rank 1
 asked on 12 Jan 2011
0 answers
114 views
Hello,
  I am working on a project where I am creating reports dynamically and exporting them out to either pdf or excel.  To accomplish this task, I am using the ReportProcessor and RenderingResult classes.  My process is a daily process that runs and exports a standard set of reports for each person in a group of employees. 
  I am having a problem figuring out the best way to handle my next step.  There are occasions when for a particular employee, there will be no data for a report.  My thought for each report, when I set the data source in the OnNeedDataSource method, I check the row count and if no rows exist then create an error for the report.  Then the RenderResult has a way to check and see if the report has any errors.  If there is an error, I can keep it from exporting out a blank report. 
  This is just my thought on how to accomplish this.  Any help on how I can either accomplish this or another way to suppress blank reports would be greatly appreciated.

Thanks,
Jeff
Jeff Rice
Top achievements
Rank 1
 asked on 11 Jan 2011
2 answers
166 views
I would like to create a report using a specific LINQ query with a where clause.  I cannot figure out how to bind my Report1 to that LINQ query.  Is it after the InitializeComponent(); in the code-behind page?  Or is it in its own function?  After I bind that, how do I bind controls, such as a textbox, to that function in the designer page?  Do you have a sample project that I can use as an example?
Richard M
Top achievements
Rank 1
 answered on 11 Jan 2011
11 answers
190 views
Hello,

I recently put together a website in Sitefinity (3.6) on one or our development servers. Everything worked fine, but when I transferred it to our client's hosting it is giving me a serialization error. In particular, this occurs when I go to edit a page and it somehow has set Overlay back as default (although I used Custom). Nothing on the page is editable. When I try to change it back to Custom I get this error:

Server Error in '/' Application.

Serialization error.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.Serialization.SerializationException: Serialization error.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[SerializationException: Serialization error.]
   Telerik.Personalization.Data.NolicsProvider.Set(String userName, String keyName, String moduleName, T value, Transaction transaction) +430
   Telerik.Personalization.Data.NolicsProvider.SaveModuleValue(String userName, String keyName, String moduleName, T value) +107
   Telerik.Personalization.Data.NolicsProvider.SaveModuleValue(String keyName, String moduleName, T value) +46
   Telerik.Personalization.Data.NolicsProvider.SaveGlobalValue(String keyName, T value) +40
   Telerik.Personalization.PersonalizationManager.SaveGlobalValue(String keyName, T value) +35
   Telerik.Cms.Web.UI.ToolBar.SelectSkin_SelectedIndexChanged(Object sender, EventArgs e) +113
   System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +111
   System.Web.UI.WebControls.DropDownList.RaisePostDataChangedEvent() +134
   System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +10
   System.Web.UI.Page.RaiseChangedEvents() +165
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1485


Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4209


The site is on a Rackspace cloud server. 

I'm lost as to what is causing this. Any help would be very much appreciated.

Thanks,

Matt
Radoslav Georgiev
Telerik team
 answered on 11 Jan 2011
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?