Telerik Forums
Reporting Forum
2 answers
144 views

Hello friends,

I am using crystal report in my project. in this, I am using crystal's pull method to display data in it.

So when any small change [adding Total, Alignment, or add new field in the existing data source etc.] in report is needed, i can copy modified the .rpt file in to the production server, without the asp.net published files.

Can I use Telerik report in the same way ?

Shivan
Top achievements
Rank 1
 answered on 02 Feb 2012
0 answers
223 views
Hi,

I'm trying to create a table in which besides having an unknown number of rows in the Data Source I might have too a unknown number of columns (up to a max) so I decided to add the maximum amount of columns I could have and hide them using conditional formatting on all the cells of that column if the value returned by processing the row in a user-defined function are < 0. 

I've made sure that the rule on the conditional formatting is being applied as if I change the Background this one changes, however when I set the Layout to not visible (unchecked) the cells don't hide.

Any idea on how this could be done or why it's not working?
Roberto
Top achievements
Rank 1
 asked on 02 Feb 2012
0 answers
155 views
I am currently developing reports for a web based solution using Telerik Reporting and the report viewer.  The reports created could display a different image in the detail section for every single record.  As a result I have a function that loads the appropriate image.  When I first implemented this I quickly realized that I had a memory usage problem.  The problem was that an image object was being loaded into memory for each record on the report.

To attempt to solve this problem I created a static variable that stores the images that have been loaded into memory already. When the original method is called it checks to see if the image is already in memory.  If the image is found in memory it returns the located image otherwise the image is loaded.  Additionally, logic is built in so that an image is only retained in memory for 15 minutes since the last time it was accessed.  With this approach I was able to decrease the memory usage and increase the performance.  For simple implementations this solution would be enough but unfortunately the current requirements are more complex.

The problem is that I am governed by regulations that dictate the size of the images based on the number that are displayed.  Since this could be different for each detail record my solution is to create a composite image in memory that I can size to meet my requirements.  Now instead of working with possibly 100 images the amount of images that I could be working with could be in the tens of thousands.  There are some rules I can put in place to limit the amount of unique images but I am still concerned about the amount of memory that will be used as the number of users grow and more reports are generated.

The best solution that I can think of is to only keep the image in memory for as long as it is required but I can not determine a good way to accomplish this.  The static variable is shared by the entire application (every user) and the image can not be disposed of until report generation is complete.  My current goals to solve this problem are:

  1. Keep memory usage at a minimum (only one unique image loaded for all users using the application)
  2. Only keep an image an memory for as long as it is needed by current report requests
  3. Reduce the impact on the end user experience

At this point I have accomplished the first goal but I am still not satisfied with the solution to the second goal.  I have some ideas on how to keep track of which report jobs are using an image while at the same time only having the single image loaded.  I am concerned that by building on this extra layer of tracking it will have a significant impact on performance.  Before I went down that road I wanted to check and see if I am trying to over complicate an issue that doesn't need to be complicated.  Is their a simpler solution to what I am trying to accomplish using Telerik Reporting?

Kevin
Top achievements
Rank 1
 asked on 01 Feb 2012
1 answer
334 views
Version=5.1.11.928

Adding a boolean parameter with visibility set to true, is causing a javascript error in the browser which means that the report never generates, and the "generating report" swirl keeps swirling.

If you just try to preview the report in the report creator, then it works fine.

The file throwing the error is Resources.Parameters.js:
the  method
BooleanEditor.prototype.Init = function ()
{
    var radioButtonList = document.getElementById(this.radioButtonID);
    if (radioButtonList)
    {
        var inputs = radioButtonList.getElementsByTagName("INPUT");
        if (inputs)
        {
            var editor = this;
            for (var i = 0; i < inputs.length; i++)
            {
                var input = inputs[i];
                input.onclick = function ()
                {
                    editor.ValueChanged();
                };
                var label = input.nextSibling;
                var text = "";
                var reportViewer = GetReportViewer();
                switch (i)
                {
                    case 0:
                        text = reportViewer.GetString("ReportParametersTrueValueLabel");
                        break;
                    case 1:
                        text = reportViewer.GetString("ReportParametersFalseValueLabel");
                        break;
                }
                label.firstChild.nodeValue = text;
            }
        }
    }
    return false;
}

var label = input.nextSibling;
results in label = null;
so once we get to:
label.firstChild.nodeValue = text;
an error is thrown. I've seen this both in IE8 and in Firefox 9.0.1

You can test it by creating a blank report, adding a single boolean parameter and making it visible.

You must then create a web project so you can view the report in a report viewer control in a browser.

If there's anyway I can fix this without creating "fake" string parameters and then remapping them to the real boolean parameters, please let me know.
Steve
Telerik team
 answered on 01 Feb 2012
1 answer
68 views
I have a report that includes a row/col table of data + a couple charts. I bind the data to the report via an ObjectDataSource.

The problem I'm facing is that some of the data needs to be HtmlEncoded prior to display in the ReportViewer but should not be encoded when exported to PDF/XLS/etc. How do I go about doing this? Is there something passed to the ObjectDataSource that will allow me to know what the target is for the returned data?
Steve
Telerik team
 answered on 01 Feb 2012
2 answers
223 views
Hi

my report has two sqlDataSources: first is bound to report as report data, the second is bound to multivalue parameter as data source (and selected value from this parameter is used as a filter). Now I need to set default value for that parameter using expression, but fields are available only from first (report bound) data source. Is it possible to address field from second data source in expression? If not, how to select default value from second expression programmatically?

Thank you in advance,

Jiri
Jiri
Top achievements
Rank 1
 answered on 31 Jan 2012
1 answer
173 views
Hi.. I'm using Telerik Reporting Q2 2011.

I have a problem with my Telerik reporting bar chart.  Everything works perfectly , however i need my chart to have different color for each bar.
I've set my chart LegendDisplayMode to itemLabels, make sure my series pallete is not set and write these codes

public WebCategoryBarChart()
      {
           //
           // Required for telerik Reporting designer support
           //
           InitializeComponent();
 
           this.chart1.Series[0].Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
 
           Color[] barColors = new Color[8]{
               Color.Purple,
               Color.SteelBlue,
               Color.Aqua,
               Color.Yellow,
               Color.Navy,
               Color.Green,
               Color.Blue,
               Color.Red
           };
           int i = 0;
           foreach (ChartSeriesItem item in chart1.Series[0].Items)
           {
               item.Appearance.FillStyle.MainColor = barColors[i++];
           }
 
          
           //
           // TODO: Add any constructor code after InitializeComponent call
           //
       }

But still the default color of the bars is still there..

How should i go about this..?
Elian
Telerik team
 answered on 31 Jan 2012
1 answer
115 views
I wrote some code to create a report in a wizard like fashion.   Something changed in the architecture of the system and now I need to support a dynamic connection to a datasource.  In other words I don't know what database I'm connecting to at design time.  The only thing I can think of to do is to inherit the Report object into a new class that supports my dynamic connection and then serialize the whole thing.  I can't think of any other way to do it.  Any other ideas?  Is there a way to iterate the SqlDataSources in a report?

Thanks,
Darren
Elian
Telerik team
 answered on 31 Jan 2012
1 answer
43 views
Hi.

I have a datasource following this structure:

XNode1
    YNode11 
    YNode12 
    YNode13
XNode2
    YNode21
    YNode22
    YNode23
XNode3
    YNode31
    YNode32

I have created a report that contains a list to the node collection and then a list within that list to bind to the respective nodes' sub nodes.

However, the resulting report is like this

XNode1
    YNode31
    YNode32
XNode2
    YNode31
    YNode32
XNode3
    YNode31
    YNode32

YNode type is a string. XNode type is a class that provides a collection of strings via a iterator (yield return).
I am not using any grouping. This is a list within a list.

My instinct was that the inner list was not bound correctly. However, I cannot think of any way that would produce this behavior. If I dump the bound data object in LINQPad, it displays correctly (so I know the iterators are working).
YNode is displayed by a Textblock using "=Fields.Item".
Tormod
Top achievements
Rank 1
 answered on 31 Jan 2012
3 answers
149 views
I'm trying to connect to a SQL CE database to run a report.  Not trying to design it or anything.

When I connect to a normal database it works but when I connect to:

Data Source=c:\UserProfiles\admin\Datasets\DEMODATASET2011.sdf;Persist Security Info=True;

I get an error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

The CE database is working fine otherwise.

Does my connect string need to be different?

Thanks,
Darren
Darren
Top achievements
Rank 1
 answered on 30 Jan 2012
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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?