Telerik Forums
Reporting Forum
3 answers
117 views

Hi. This is probably an easy question for somebody to answer but it is driving a noobie like me nuts tonight. I have a report that has 3 parameters (date_start, date_end, worker). I set up the parameters as usual and assigned some default values to them.   I have some tables that use a sqldatasource to  display some data based on those parameters. This works fine. I have absolutley no isues with the tables displayign data using the parameters

What I am trying to do is use some code behind (presumably in itemdatabound event) to do a calculation and display some text in a textbox based on the number of days between start and end date parameters. I can get this calculated data to display. but it always displays values based on the default value of the parameters and not what is selected in the dropdowns for the parameters. if i clear the default values from the parameters, the report errors out because it thinks the default values for the dates are blank or null.
 
Does the itemdatabound event fire before the parameters are available to use and calculate against?

What should I be doing?
Peter
Telerik team
 answered on 27 Jun 2013
3 answers
199 views
I have an existing report that I am working with. The functional request I have is to suppress the automatic page break that occurs when the third group starts to render.

There are 4 groups that are built dynamically. Each group has a crosstab. The first two groups/crosstabs are fairly small and together they take up 25% of the page height. The third group takes up about 90% of the page height and as such defaults it's starting point as the top of the next page.

My client has asked that I suppress this functionality and force the group to start in line with the previous group and then break to another page in the event it will not fit. In some instances I have examples where it takes up 150% of the page space and in those cases it does start right after group#2 and spills onto the next page repeating the headers as expected. 

How can I force this behavior every time?
 
I have set the KeepTogether property to false in TableGroup and CrossTab objects but to no avail.

Are there other properties I need to set in order to insure the desired behavior occurs?
Stef
Telerik team
 answered on 27 Jun 2013
3 answers
155 views
Hi, I have the following problem with the Report Viewer for WPF control . I read the HTML code returned by 'Render' metod next i want to set this code to the reportviewewr control , How can I do it ??

This metdo that i use to get HTML code:

 Dictionary<string, object> lParameters = new Dictionary<string, object>();
 lParameters.Add("IDKON", 101);
var lResult = ReportServiceContext.I.Render("HTML", lRaporty[0].FullName, null, lParameters);

 if (lResult.Error == null)
{
       sring str = System.Text.Encoding.Default.GetString(lResult.DocumentBytes);
 }

Thank for help.

Gregor
Squall
Top achievements
Rank 1
 answered on 27 Jun 2013
8 answers
686 views
Hello,

We have an issue with one of our production systems, where we do not have a great deal of storage space on the primary drive of the server (Primary being C:\, where Windows lives). This causes issues, because we have functionality in place that can generate reports that are actually larger than we have disk space available. In an effort to fight this (without upgrading these servers), I was wondering if there was a way to tell Telerik Reporting use a different folder when it's creating the report? Alternatively, if we knew the size of the report, we could check to ensure that amount of space was available, but, I don't think we can determine the size of a file that hasn't yet been created, the best we could do would be a guestimate based off the amount of data.

Anyone else have an issue similar to this?

Any suggestions would be great!

Thanks,

Travis
Peter
Telerik team
 answered on 27 Jun 2013
3 answers
333 views
Hi,

I have put an HTMLTextBox on a report and inserted a hyperlink into it as follows:
 <a href="Visit'>http://www.w3schools.com/">Visit W3Schools</a>.

When I "Preview" the report the hyperlink works fine but when I switch to "Html Preview" the link just displays as blue underlined text and is not an active link. Also, the link doesn't work at all when I use the reportViewer control in a asp.net webforms web page.

I have tried this in VS2008 and VS2012 . I have also used .Net 3.5 and 4.0 . The Reporting version is Q1 2013 SP1

Is this an issue or am I just doing something wrong?

Thanks
Dan Rizzo
Stef
Telerik team
 answered on 27 Jun 2013
1 answer
139 views
I am running the following code:
and at this.TelSubRptLocations.Report = TelSubrpt; it throws the following error:
"Property or indexer Telerik.Reporting.ReportItemBase.Report cannot be assigned to -- it is read only.

so how do i get around this?
Telerik.Reporting.Report TelSubrpt = new TelSubRptContract();
((TelSubRptContract)TelSubrpt).UOM = "GAL";
((TelSubRptContract)TelSubrpt).RinsPrice = RinsPrice;
TelSubrpt.DataSource = dtLocations;
this.TelSubRptLocations.Report = TelSubrpt;
Squall
Top achievements
Rank 1
 answered on 27 Jun 2013
1 answer
85 views
If =fields.ContractedQty > 0 I want my value to show
txtQty.Value = Convert.ToDouble(txtQty.Value).ToString("###,###,##0") + " Gal"
if =fields.ContractedQty = 0 I want my value to show

txtQty.Value = Convert.ToDouble(txtQty.Value).ToString("###,###,##0") + " Gal (Optional Delv. Location)"
How can this be done.  I have tried txtQty.DocumentMapText but it is empty so that does not work.
Squall
Top achievements
Rank 1
 answered on 27 Jun 2013
2 answers
139 views
Hello,

I use Silverlight reports. I would like to change property Visible of report parameters "on fly" from Silverlight Report Viewer. For example in the method RenderBegin. Because on design time I do not know what parameters of report have I to display and what to hide.

In the MainPage.xaml.cs I am having:

private void reportViewer1_RenderBegin(object sender, Telerik.ReportViewer.Silverlight.RenderBeginEventArgs args)
{
    args.ParameterValues["StartDate"] = DateTime.Now.AddDays(x);

     // I would like someting like that
    args.ParameterValues["StartDate"].Visible = false;
}

How can I set property "Visible" of report parameters programmatically?

Thank you,
Andrew
Thomas
Top achievements
Rank 1
 answered on 27 Jun 2013
1 answer
527 views
Hello

My report table header includes two rows. Something like this:
row 1:  Column Name 1 |  Column Name 2 |  Column Name 3 |
row 2:                1          |          2                |               3           |
with data rows following that header.

When I set ColumnHeadersPrintOnEveryPage field of Telerik.Reporting.Table object to true, only the first row (row 1) is printed on every page. Can I include row 2 into table header to print both rows on every page?
Timur
Top achievements
Rank 1
 answered on 27 Jun 2013
1 answer
118 views

I have some reports embedded in an ASP.NET Razor View.

Everything works perfectly on my dev box, but as soon as I deploy to live I get the following error:

Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'.;

I’ve checked the versioning in the web.config, and it is using the web.config, and I have reinstalled the telerik reporting on the server, but to no avail.

The controller is:

public ActionResult Dashboard(int id)
        {
            var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
            instanceReportSource.Parameters.Add(new Telerik.Reporting.Parameter() { Name = "BidId", Value = id });
            instanceReportSource.ReportDocument = new BidSummary();
            return View(instanceReportSource);
        }

And the view is

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Telerik.Reporting.InstanceReportSource>" %>
<%@ Import Namespace="BidGovernance.Reports" %>
<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=7.0.13.521, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>
<%@ Register assembly="Telerik.Reporting, Version=7.0.13.521, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.Reporting" tagprefix="telerik" %>
<!DOCTYPE html>
<html>
<head runat="server">
    <meta name="viewport" content="width=device-width" />
    <title>Dashboard</title>
</head>
<body>
    <div>
        <form id="form1" runat="server">
        <telerik:ReportViewer ID="ReportViewer1" runat="server"  Width="100%" Height="800px"></telerik:ReportViewer>
    <div>
        <script runat="server">
             public override void VerifyRenderingInServerForm(Control control)
              {
             // to avoid the server form (<form runat="server"> requirement
              }
             protected override void OnLoad(EventArgs e)
              {
             base.OnLoad(e);
             //Telerik.Reporting.ObjectDataSource data = new Telerik.Reporting.ObjectDataSource();
             //data.DataSource = Model;
             //Telerik.Reporting.Report report = new Telerik.Reporting.Report();
             //report.DataSource = data;
             //     var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
            //     instanceReportSource.ReportDocument = report;
             //     instanceReportSource.ReportDocument = new DSTest();
                  ReportViewer1.ReportSource = Model;
              }
       </script>
         
    </div>
            </form>
    </div>
</body>
</html>

Please help.

Eddie
Squall
Top achievements
Rank 1
 answered on 26 Jun 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?