Telerik Forums
Reporting Forum
4 answers
160 views
Hi,

I am using Q1 reporting with ASP.  Specifically, I have created a report within a radwindow which works well, however, you can right click anywhere on the preview and it brings up the full IE quick menu.

I tried to remove this by adding the basic javascript code to disable right clicking but it worked outside of the report but not on the report itself.

Is there any way of restricting the right mouse click?

Thanks,

Jon
AJ
Top achievements
Rank 1
 answered on 29 Mar 2012
2 answers
111 views
Good Morning,

I've worked with Telerik for a couple days now (and wow do Ihave a lot to learn...), and I had a question regarding additional components to place into the report.  I know that in Xcelsius you could instert sliders and dials in order to manipulate the data.  Is there an option similar in Telerik?  I know that I can create Queries in the report for specific parameters, but they mostly look like drop down menus or text boxes.

Is this something that might require a custom solution, or an addon that I am not seeing, or is it a limitation to the program?

I've basically got a week to be an expert on this thing, so I am trying to get as much info as I can to head off potential issues.

Thanks!

Matt
Matt
Top achievements
Rank 1
 answered on 29 Mar 2012
3 answers
140 views
we have developed the Telerik Report Design in the trial version 5.3.12.119 and now it was updated(licensed) to 6.0.12.215.we are unable to view the design in latest version.

please help us in resolving the issue.

Thanks
pavankumar konakondla
Steve
Telerik team
 answered on 29 Mar 2012
1 answer
138 views
Good Morning all,

I've been going through the help files trying to find the steps to host a created report on a web page.  Unfortunately, I am not having a lot of luck.  I come from using Xcelsius, so obviously things are quite a bit different.  How does one take a finished report and host this thing online?

We're creating a prototype for a job that our company has been tasked to do where basically reports are hosted on a website, the user interact with them to create their own "what-if" scenarios, and get their results.  Right now, we are at the "host the created report on a web page" phase. 
Any advice would be appreciated.  Thanks a bunch!

Matt
Elian
Telerik team
 answered on 29 Mar 2012
1 answer
164 views
OK, the basic error message is this: An error has occurred while processing Report 'myReport': The expression contains object 'myField' that is not defined in the current context. 

I've followed the instructions here: http://www.youtube.com/watch?v=t-iA05KpDFM  for adding a partial view to MVC to allow a report viewer, and it works as long as I use a statically defined report.

However, if I go in to the OnLoad method and try to change the report to something else, it throws the above error.

Here is my sample code:

protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
    ReportViewer1.Report = ViewBag.ReportSource;
    ReportViewer1.RefreshReport();
}

Note the use of the ViewBag to provide access to the new report. This seems to work, except that the new report isn't properly linking to its fields.

Thanks for your timely response!
Peter
Telerik team
 answered on 29 Mar 2012
1 answer
101 views
Hello
I have few questions.

Question 1:
Please see attached image. Is this possible with telerik reports? I have telerik reports in my MVC site.

Question 2:
It is possible to download just individual report from report book example along with all the reports in pdf format?
http://demos.telerik.com/reporting/report-book/demo.aspx

Regards
Mac
Elian
Telerik team
 answered on 29 Mar 2012
3 answers
1.1K+ views
I'm trying to display the PageNumber / PageCount in a textbox in the footer area of the main report. The steps I have taken are:
-drag a textbox to the mainpage's footer area
-rightclick the textbox choose expression..
- go to global objects
- double click PageNumber and PageCount
- manually add a string value so I get "= PageNumber + " / " + PageCount"

When I run the report I get the error:
An error has occurred while processing TextBox 'txtPageNumber':
The expression contains object 'PageNumber' that is not defined in the current context.

Why isn't this working?
Koen L
Top achievements
Rank 1
 answered on 29 Mar 2012
1 answer
133 views
I am trying to bind a type CustomerInvoiceLogs ( : List<CustomerInvoiceLog>) to a crosstab in a subreport.
I start by passing on the data in to the subreport in the subreports NeedDataSource event in the main report design window.

private void subPortfolioStatistics_NeedDataSource(object sender, EventArgs e)
{
    Telerik.Reporting.Processing.SubReport subReport = (Telerik.Reporting.Processing.SubReport) sender;
 
    CustomerPortfolios custPortfolio = (CustomerPortfolios) subReport.DataObject.RawData;
    _customerPortfolio = custPortfolio.customerPortfolios;
 
    if (_customerPortfolio != null && _customerPortfolio.Count > 0)
    {
        CustomerInvoiceLogs customerInvoiceLogs = new CustomerInvoiceLogs();
 
        foreach (CustomerPortfolio cp in _customerPortfolio)
        {
            customerInvoiceLogs.AddRange(DFInvoiceStats.InvoicesByCustomerIdWithoutTaxNumberRelation(cp.CustomerId, _startYear, _endYear));
        }
 
        subReport.InnerReport.DataSource = customerInvoiceLogs;
    }
}

In the NeedDataSource above I pass on the customerInvoiceLogs collection class to the subreport. Which I can use if I drag properties from the ObjectDataSource to the Design detail section of the subreport.

If I try using the same ObjectDataSource to fill in values in the crosstab control the cells stay blank (they don't contain values like the textboxes, however there is a crosstab created for every value in customerInvoiceLogs (the headers are displayed). Could anyone let me know why this is and how I can resolve this problem.
Koen L
Top achievements
Rank 1
 answered on 29 Mar 2012
0 answers
105 views
I've been asking for this for a long long time, but I thought I'd just mock up what I mean (see attached)...

Everytime I need to find the syntax for the filter to only use the parameter if there's a value, I need to google it...and that sucks :)  This checkbox could solve that...so internally it gets handld\filtered without me needing to remember the proper IsNull syntax inside those boxes.

What do you think?

sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 asked on 28 Mar 2012
1 answer
141 views

How to group table programically?

I’m using AutoGenerateColumns project  

And add code for group table but I getting  error  “.object reference not set to an instance of an object”

 

  SqlConnection cn = new SqlConnection("Data Source=PC\\SQLEXPRESS;Initial Catalog=test;Integrated Security=True");
 
     cn.Open();
 
                SqlCommand command = new SqlCommand(“ProcName”, cn);
                command.CommandType = CommandType.StoredProcedure;
 
                SqlDataAdapter sqlAdapter = new SqlDataAdapter(command);
                DataSet ds = new DataSet();
                sqlAdapter.Fill(ds);
 
                Telerik.Reporting.Processing.Table processingTable = (sender as Telerik.Reporting.Processing.Table);
                processingTable.DataSource = ds.Tables[0];
 
                Telerik.Reporting.HtmlTextBox textboxGroup;
                Telerik.Reporting.HtmlTextBox textBoxTable;
 
                this.table1.ColumnGroups.Clear();
                this.table1.Body.Columns.Clear();
                this.table1.Body.Rows.Clear();
                this.table1.ColumnHeadersPrintOnEveryPage = true;
                int i = 0;
                float widthMid = 0;
 
                if (PageSettings.Landscape)
                    widthMid = (this.PageSettings.PaperSize.Height.Value - GetAsMm( this.PageSettings.Margins.Left) - GetAsMm( this.PageSettings.Margins.Right) ) / (ds.Tables[0].Columns.Count);
                else
                    widthMid = (this.PageSettings.PaperSize.Width.Value -  GetAsMm(this.PageSettings.Margins.Left) - GetAsMm(this.PageSettings.Margins.Right) ) / (ds.Tables[0].Columns.Count);
 
                ///////////////////////////////////////////////////////////////
               
                for (int x = ds.Tables[0].Columns.Count - 1; x >= 0; x--)
                //foreach (DataColumn dc in ds.Tables[0].Columns)
                {
                    DataColumn dc = ds.Tables[0].Columns[x];
                    Telerik.Reporting.TableGroup tableGroupColumn = new Telerik.Reporting.TableGroup();
                    this.table1.ColumnGroups.Add(tableGroupColumn);
                    this.table1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Unit.Mm(widthMid)));
 
                    textboxGroup = new Telerik.Reporting.HtmlTextBox();
                    textboxGroup.Style.BorderColor.Default = Color.Black;
                    textboxGroup.Style.BorderStyle.Default = BorderType.Solid;
                    textboxGroup.Value = Equivalent.GetEquivalent(dc.ColumnName.ToString());
                    textboxGroup.Size = new SizeU(Unit.Cm(0.2), Unit.Inch(0.3));
                    textboxGroup.Style.TextAlign = HorizontalAlign.Center;
                    tableGroupColumn.ReportItem = textboxGroup;
 
                    textBoxTable = new Telerik.Reporting.HtmlTextBox();
                    textBoxTable.Style.BorderColor.Default = Color.Red;
                    textBoxTable.Style.BorderStyle.Default = BorderType.Solid;
                    textBoxTable.Value = "=Fields." + dc.ColumnName;
                    textBoxTable.Size = new SizeU(Unit.Cm(0.2), Unit.Inch(0.3));
                    textBoxTable.Style.TextAlign = HorizontalAlign.Right;
                    this.table1.Body.SetCellContent(0, i++, textBoxTable);
                    this.table1.Items.AddRange(new ReportItemBase[] { textBoxTable, textboxGroup });
                }
 
              ///////////////////////////////////////////////////////////////
///grouping part
                 
              Telerik.Reporting.TableGroup group1 = new Telerik.Reporting.TableGroup();
              group1.Name = "IDGroup";
              group1.Groupings.Add(new Telerik.Reporting.Data.Grouping("=Fields.ID"));
              
              Telerik.Reporting.TextBox textBox1 = new Telerik.Reporting.TextBox();
              table1.Items.Add(textBox1);
              group1.ReportItem = textBox1;
 
              table1.RowGroups.Add(group1);           
                  
              ///////////////////////////////////////////////////////////////

 

This code have error only I using a grouping part

Elian
Telerik team
 answered on 28 Mar 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?