Telerik Forums
Reporting Forum
1 answer
145 views

 

Hi

I'm trying to fill a HTMLTextBox on a subreport programatically in order to change appearence depending on the data. I managed to get line breaks working by changing from BR to DIV tags, but I can't get the styles to work. Since I have a lot of subreports I really don't want to include FONT tags into the code and risk creating a maintenance nightmare. Is there a way to set styles programatically?

I've tried adding the HTML using a script that is called from the HTMLTextBox, such as
...
PositionLine = "<DIV Class='PositionCompany>'" & PositionLine & "</DIV>"
Return PositionLine

but this only gives me linebreaks, not the formatting. "'PositionCompany" is a style rule defined in the master report.

How do I call the CSS formatting? (By the way, I can't set it directly since I use several different style rules inside the same HTMLTextBoc depending on data.

Thanks in advance!

Re
Dennis

   Public Shared Function Position(ByVal Company As StringByVal City As StringByVal Country As StringByVal CompanyType As StringByVal Title As StringByVal DetailLong As StringByVal DetailShort As StringAs String 
 
        Dim PositionLine As String = Company.ToString  
 
        If City <> "" Then 
            If PositionLine <> "" Then 
                PositionLine += ", " & City.ToString  
            Else 
                PositionLine = City.ToString  
            End If 
        End If 
        If Country <> "" Then 
            If PositionLine <> "" Then 
                PositionLine += ", " & Country.ToString  
            Else 
                PositionLine = Country.ToString  
            End If 
        End If 
        If CompanyType <> "" Then 
            If PositionLine <> "" Then 
                PositionLine += " (" & CompanyType.ToString & ")" 
            Else 
                PositionLine = CompanyType.ToString  
            End If 
        End If 
        If PositionLine <> "" Then 
            PositionLine = "<DIV Class='PositionCompany'>" & PositionLine & "</DIV>" 
        End If 
        If Title <> "" Then 
            If PositionLine <> "" Then 
                PositionLine = PositionLine & "<DIV Class='PositionTitle'>" & Title.ToString & "</DIV>" 
            End If 
        End If 
        If DetailShort <> "" Then 
            If PositionLine <> "" Then 
                PositionLine = PositionLine & "<DIV Class='PositionDetails'>" & DetailShort.ToString & "</DIV>" 
            End If 
        End If 
 
        If DetailLong <> "" Then 
            If PositionLine <> "" Then 
                PositionLine = PositionLine & "<DIV Class='PositionDetails'>" & DetailLong.ToString & "</DIV>" 
            End If 
        End If 
 
 
        Return PositionLine  
 
    End Function 
 
Steve
Telerik team
 answered on 05 Nov 2009
1 answer
142 views
Hello there!
           When i export my generated report to Web Archive format in IE7 all my datas are exported correctly How ever when i try to export it to Web Archive format in Mozilla3.5 format it is displaying binary datas. Is there any solution for this problem? I have attached images for your understanding.
Kindly help me ASAP...

Many thanks
Steve
Telerik team
 answered on 05 Nov 2009
0 answers
110 views
Our application allows a user to generate a Telerik report.  Sometimes when the report is generated, the application is not fully maximized.  When in fact the application does get fully maximized, the top of the report has fallen off the page and there is no way to close it.  The functionality we are aiming to achieve is to implement a context menu that can be accessed by a right click, so when this happens they can simply right click and close the report.  Any suggestions?
Lindsey Kelly
Top achievements
Rank 1
 asked on 04 Nov 2009
4 answers
284 views
I am looking for a way to make the size of the parameter window always large enough to show the parameter input controls. Currently I have some reports that work nicely and others that generate a scroll bar that must be used to see all the parameter input controls. I cannot seem to find the setting or property that controls this. Can someone point me in the correct direction? Thanks!!
Bryan Strader
Top achievements
Rank 2
 answered on 04 Nov 2009
2 answers
208 views
Hi,


  I would like to apply the skin for Report Parameters.Report parameters may be date picker, dropdownlist.

Please help me how to do it?

Thanks for your help,
Steve
Telerik team
 answered on 04 Nov 2009
1 answer
183 views
Hi

string id = Request.QueryString["id"];
 Value Get

Telerik Report Parameters
 Value Set

Example
Q2 2009
using Telerik.Reporting;

string reportName = Server.UrlDecode(this.Request.QueryString["ReportName"]);
string id = Request.QueryString["id"];

if (!string.IsNullOrEmpty(reportName))
{
    Type reportType = Type.GetType(reportName);
    IReportDocument report = (IReportDocument)Activator.CreateInstance(reportType);

    ?????  report.ReportParameters

    this.ReportViewer1.Report = report;
    this.Page.Title = reportType.Name;


Kwon OhJong
Top achievements
Rank 2
 answered on 04 Nov 2009
2 answers
156 views
Hi,

is it possible to do something similar to this http://www.telerik.com/community/forums/aspnet-ajax/grid/self-referencing-hierarchy-in-programmatic-grid-with-a-xmldatasource.aspx

With some data in a xml format like this

<Lines>  
    <Item ID="IDI-1-17" ParentID="" UserCode="B24R" Description="Base"/>  
    <Item ID="IDI-1-75" ParentID="IDI-1-17" UserCode="FL.TOE" Description="Flush Toe Kick"/>  
    <Item ID="IDI-1-20" ParentID="" UserCode="B24L" Description="Base"/>  
    <Item ID="IDI-1-57" ParentID="IDI-1-20" UserCode="FL.TOE" Description="Flush Toe Kick"/>  
    <Item ID="IDI-1-63" ParentID="IDI-1-20" UserCode="FD.SH" Description="Full Depth Shelf"/>  
    <Item ID="IDI-1-53" ParentID="IDI-1-20" UserCode="CT2" Description="Knife Section Kit"/>  
    <Item ID="IDI-1-26" ParentID="" UserCode="B36-2" Description="Base"/>  
    <Item ID="IDI-1-81" ParentID="IDI-1-26" UserCode="FL.TOE" Description="Flush Toe Kick"/>  
    <Item ID="IDI-1-36" ParentID="" UserCode="SBFD36" Description="Sink Base FHD"/>  
    <Item ID="IDI-1-83" ParentID="IDI-1-36" UserCode="FL.TOE" Description="Flush Toe Kick"/>  
    <Item ID="IDI-1-40" ParentID="IDI-1-36" UserCode="SK.21-1TUB" Description="21&quot; 1 Tub Sink"/>  
    <Item ID="IDI-1-22" ParentID="" UserCode="W2424" Description="Wall"/>  
    <Item ID="IDI-1-24" ParentID="" UserCode="W2424L-GL" Description="Wall w/Glass"/>  
</Lines>  

I want to be able to create a hierarchical report. I know that I have to convert my xml into a dataset, but I'm stuck with the hierarchy part. Is there something similar to the ASP.NET AJAX Radgrid I can use ?

Thanks


pylacroix
Top achievements
Rank 1
 answered on 03 Nov 2009
39 answers
1.8K+ views
All,

I am just slightly confused about the PDF output described in the information available so far.

We are using ActiveReports 2.0 for .NET to report data that has been entered using RAD Editor and are having fits because of the insane limitations of their HTML rendering in PDF documents. What has happened is their engine will encounter HTML tags it can't understand so it just quits rendering.

1) How will PDFs be handled? As an export from the visible report? As a native viewer with the document directly rendered to PDF (like ActiveReports)?
2) Currently HTML code is very limited in ActiveReports. Will Telerik Reporting handle all the tags the RAD Editor supports? This is KILLER important. We have users importing into RAD Editor from MS Word and half the time AR just chokes and dies. To top it off, we are left to guess as to where the error occured in the report since their stack trace is totally encrypted.

Suffice it to say after absolutely pulling our hair out with ActiveReports, we would love something that works as advertised. If you hit a homer as you have with RAD Editor and RAD Combo, which we also use, we are in...

Thanks,
B
Diederik
Top achievements
Rank 1
 answered on 03 Nov 2009
3 answers
646 views
Hi there,

I'm trying to format a particular textbox on the first and subsequent pages differently. Specifically, on page 1, I'd like to format the textbox as centered, bold Cambria font, size 14. On pages 2 and up, I'd like to format it as center, bold Cambria, size 10.

The rules I've entered for the textbox are
= PageNumber > =1 ------- center, bold, Cambria, 10
= PageNumber = 1   ------- center, bold, Cambria, 14

Unfortunately, regardless of page number, the textbox is always formatted according to the second rule.

Notably, if the second rule is removed, the textbox is formatted properly.

I also tried formatting the textbox first as size 14, then adding conditional formatting with the first rule only, but that doesn't work. I assume that's expected behavior because as governed by another post, conditional formatting is designed to only change default behavior.

I've already tried switching the order and different combinations of the "Stop If True" setting.

Any ideas of what I'm doing wrong?

Thanks,
Mark
Steve
Telerik team
 answered on 03 Nov 2009
2 answers
306 views
I'm trying to pass a DataSet to a SubReport. I don't want the DataSet to be the SubReport's DataSource. The SubReport has a chart and table in it which will display the contents of the passed DataSet.

The only way I see to pass values to a SubReport is via ReportParameters. That, however, does not allow passing objects. Doing SubReport.ReportSource on DetailSection.ItemDataBound leaves the first detail section without a DataSet.

 
private void detail_ItemDataBound(object sender, EventArgs e) 
    Telerik.Reporting.Processing.DetailSection detailSection = (Telerik.Reporting.Processing.DetailSection)sender; 
 
    DataRow row = (DataRow)detailSection.DataObject.RawData; 
 
    TUsageSubReport subReport = (TUsageSubReport)this.UsageSubReport.ReportSource; 
 
    DataSet ds = null
 
    DB.Reports_GetAccountUsages(Convert.ToInt32(row["UserId"]), new DateTime(2009, 10, 1), new DateTime(2009, 10, 31), m_ConnectionString, out ds); 
 
    subReport.Usages = ds; 
 

Is it possible to get to the actual report object (SubReport.ReportSource) per detail section?
Steve
Telerik team
 answered on 02 Nov 2009
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?