Telerik Forums
Reporting Forum
0 answers
90 views
I need to add all the pictures that are in a directory to a report. Probably will be no more than 5-10 pictures per report. Is this possible in Telerik Reporting?

Thanks, 
Charles Hawk
KawaUser
Top achievements
Rank 2
 asked on 14 Dec 2010
1 answer
75 views
Hello,

I am using telerik reporting in order to make a chart on my web page and i seem to have a problem i cannot solve. I am using the StackedSplineArea chart with the Inox skin. Now I have changed the YAxis letters and numbering color to black that was easy by changing their color in appearance. I am facing a problem trying to change the labels' color. It is gray and i want it black.. I change it through the series apearance properties.. It is correctly changed on the design mode but as soon as I run it.. in preview mode or html it is still grey. I close it I re-open it and the color change I had done is gone.. I cannot change the label color.


Appart from that.. I want to make a chart with a time line... i have found how can i put dates to the xAxis but i want months...
I also want xAxis to show categories... that is not numeric.. I think it is not possible with the current charts.. is it??

Thank you in advance!
Sofia Sidirokastriti
Ves
Telerik team
 answered on 14 Dec 2010
4 answers
107 views
Hi,
I've specified different PointMark figures for different series. The legend marker is still rectangle. How can i make the legend marker to follow the series point mark figure?

Thanks in advance.
Lauren
Top achievements
Rank 1
 answered on 14 Dec 2010
1 answer
119 views
I have a report that works fine when accessing the viewer through a web app.  However, the designer view doesn't work.  I get an exception because code I added to my report class depends on a custom configuration section in the config file.  I added the custom config section to the app.config file in my report lib project, but it doesn't seem to "see" the section.

I've seen other postings about using the Settings in lieu of app.config, however, I'm not sure that's going to work in my case.  Any help would be appreciated.
Steve
Telerik team
 answered on 14 Dec 2010
1 answer
150 views
Hi,

Can someone please advise me how I can achieve the following:

I have a report whose page orientation is landscape.  I want to print it from my in-browser (IE8) Silverlight 4 application.  I want the print dialog button to appear so the user can choose a printer or change defaults, but I want the report to print in landscape by default (unless the user specifically changed this in the print dialog) and not print according to the printer's defaults. 

If I set UseNativePrinting to false then nothing happens when I press the Report Viewer's print button.  If I create my own button with the following code executing on the click event :
var reportViewerModel = reportViewer.DataContext as ReportViewerModel;
if (reportViewerModel.State.Equals("ViewerPageState"))
{
   reportViewerModel.PrintReportCommand.Execute(null);
}
nothing happens.

This should be easy.  Please help.

Thanks.
Peter
Telerik team
 answered on 14 Dec 2010
1 answer
131 views
Hi, 

I'm currently evaluating your reporting package. I've been able to deploy the report service (the one that does the rendering) successfully on both a self-hosted WCF application as well as IIS-5. I can view my reports successfully when I run the Silverlight Report Viewer in Silverlight's out of browser mode with elevated trust level enabled. 

However, I get a problem when this the elevated trust level option is unchecked or when I run the Silverlight application in it Web mode.  When the report viewer is opened it briefly tries to connect to the report viewer service, but very quickly comes up with the following error: 

"An exception occurred during the operation, making the result invalid.  Check InnerException for exception details."

I'm not sure how to get more info from the error. I'm a little confused as everything works fine in the out of browser mode, but not in the web mode. Is there a difference I need to be aware of, and you do have any suggestions as to a possible solution? 

Thanks. 
Fletcher Aluminium
Top achievements
Rank 1
 answered on 14 Dec 2010
1 answer
42 views
've just created a simple project with 3 reports. 1 Report shows static text. 2nd report shows a list of some entity (assigned as datasource in constructor) of the report class) as follows:
this.DataSource = new List<Test>()
{
new Test(){Name = "hasan"},
new Test(){Name = "Ali"}
};

3rd report just contains two sub report objects in its detail section.

When I run the application I see only one of the sub reports. Can someone check the source at http://www.filedropper.com/telerikreporttest and tell me what the problem is?

If I check preview of individual report, they show the data perfectly fine but something wrong happens on runtime.

Also the behavior seems unpredictable because sometimes it shows data from both the reports but repeats the static text as many times as there are rows in the second subreport. This happens if I change the order of subreports in the detail seciton of Master report.

Thanks

Hasan Khan
Top achievements
Rank 1
 answered on 13 Dec 2010
1 answer
1.0K+ views
Hi,

I have a problem , I can not figurer out / it is not working how to change the background when a date field is not set.(is null)

Here is what I have come yp with so far.....

realizing that the datetime value will be datetime.minvalue when the underlying data is null, I made the following in an formatting rules expression.

=Fields.SyncDate.Date.Ticks < :=1  but nothing happens, 

Any ideas on how to make this happen ?.

Best Ole
Peter
Telerik team
 answered on 13 Dec 2010
2 answers
99 views
How would I create a function using my EntityDiagrams file and a LINQ statement, to bind to a textbox I wasnt to add to my Report?
I tried creating this function in Report1.cs:

public static string myFunction( )
{
MyEntityDiagrams1 conn = new MyEntityDiagrams1();
var getResults = from a in conn.Products
                             select a.Name;
return getResults.ToString( );
}

Then in the TextBox I add to my report, I right click, go to Expressions and choose myFunction( ), but I get an error when I try to view in Preview.
Richard M
Top achievements
Rank 1
 answered on 13 Dec 2010
7 answers
308 views
Hi,

in Q2 2010 Telerik Reporting I set the DataSource of a Report to null in the constructor and created dynamically sized textfields dynamically, dependent on some ReportParameter sent by a Silverlight Application via the Telerik WCF Service, in the overridden OnNeedDataSource method.. This worked like a charm.

In Q3 2010 Telerik Reporting the constructor of the Report also gets called twice like before. Once while requesting the report initially to be previewed in the Silverlight Report Viewer, the second time if exporting the Report to PDF or any other format from the Menu of the Silverlight Report Viewer. The first time the constructor is called, OnNeedDataSource gets called correctly and the dynamic Textfields get created, the second time the constructor is called (before saving to file), OnNeedDataSource does not get called, even though the DataSource is again set to null in the constructor.

In Short: Preview shows correct Report like in Q2. Saving to PDF (or any other format) produces blank file in Q3. In Q2 the Report was being saved correctly.

Since this is a time-critical issue, I am temporarily stepping back to Q2 2010 as of now. I hope this issue can be resolved.

Some code reconstructed to visualize what I wrote in the upper paragraphs:

Constructor:

/// <summary>
        ///   Initializes a new instance of the <see cref = "OverviewReportBase{T}" /> class.
        /// </summary>
        public OverviewReportBase()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
 
            // Set DataSource to null, so that the NeedDataSource Event gets fired.
            // This is done because otherwise the ReportParameters are not getting filled from the Silverlight Client.
            DataSource = null;
        }
OnNeedDataSource method:
/// <summary>
        ///   Called when the report needs a data source.
        /// </summary>
        /// <param name = "sender">The sender.</param>
        /// <param name = "e">The <see cref = "System.EventArgs" /> instance containing the event data.</param>
        protected override void OnNeedDataSource(Object sender, EventArgs e)
        {
            Unit writeableArea = CalculateWidthOfWriteableArea();
            IEnumerable<String> columnNames = ((Object[]) ReportParameters["columnNames"].Value).OfType<String>();
            Int32 columnCount = columnNames.Count();
            IEnumerable<Int32> columnPercentages =
                ((Object[]) ReportParameters["columnPercentages"].Value).Select(x => Int32.Parse(x.ToString()));
            Double summedUpWidth = 0D;
            for (Int32 i = 0; i < columnCount; i++)
            {
                Unit controlWidth = writeableArea.Multiply(columnPercentages.ElementAt(i)).Divide(100);
                TextBox captionTextBox = new TextBox
                                             {
                                                 Location =
                                                     new PointU(new Unit(summedUpWidth, UnitType.Mm),
                                                                new Unit(0, UnitType.Cm)),
                                                 Size = new SizeU(controlWidth, new Unit(0.75, UnitType.Cm)),
                                                 Name =
                                                     String.Format(CultureInfo.InvariantCulture, "captionTextBox{0}", i),
                                                 StyleName = "Caption",
                                                 TextWrap = false,
                                                 Value = RetrieveDisplayName(columnNames.ElementAt(i))
                                             };
                labelsGroupHeader.Items.Add(captionTextBox);
                TextBox dataTextBox = new TextBox
                                          {
                                              Location =
                                                  new PointU(new Unit(summedUpWidth, UnitType.Mm),
                                                             new Unit(0, UnitType.Cm)),
                                              Size = new SizeU(controlWidth, new Unit(0.75, UnitType.Cm)),
                                              Name = String.Format(CultureInfo.InvariantCulture, "dataTextBox{0}", i),
                                              StyleName = "Data",
                                              TextWrap = false,
                                              Value = RetrieveValuePathOfColumn(columnNames.ElementAt(i))
                                          };
                detail.Items.Add(dataTextBox);
                summedUpWidth += controlWidth.Value;
            }
            SetDataSourceHere();
            base.OnNeedDataSource(sender, e);
        }
Best Regards
Tomas
Top achievements
Rank 1
 answered on 13 Dec 2010
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?