Telerik Forums
Reporting Forum
3 answers
286 views
I have a ReportViewer with a report on a web page.  I want to programmatically open the print dialog.  Can I do this?
Peter
Telerik team
 answered on 27 Jan 2011
2 answers
119 views
As shown in the vedios i have created a class library and added reports and created some class and added wcf service reference and binded the report..

I have taken a silverlight application and created one xaml file and place a reportviewer control and gave the reporturi and report path from classlibrary ...

the report is running fine with static parameters which i have declared in class library class..

But i need to pass the  paramater values dynamically from silverlight application ..to class library class ..

so that it will get the data dynamically from the referenced wcf service.. and bind the report..............


Pls help me
Peter
Telerik team
 answered on 27 Jan 2011
1 answer
90 views
Hello,
Is it possible to auto-condense (like the CanShrink property) text to get nicer formatting in addresses?
For example, having
City, State
On one line will produce 
City,               State
On the report if the city name is short. I'm sure there's a solution, I just haven't found it!

Thanks for your help


Peter
Telerik team
 answered on 27 Jan 2011
1 answer
194 views
I didn't find anything in the forums that seems to match what I am trying to do.  In our web application we are allowing the user to enter HTML tags, scripts, etc. into text entry widgets and we handle it as plain text.  However, this is causing me a problem when I get to the reports.

Project Name              Job Name            #Contractors
-----------------------------------------------------------------
<br>                          <p>                         10



This is how I want the report to look on the screen and when exported to PDF and CSV.  We are storing the text in our DB as HTML Encoded data.    If I don't decode the strings when they are sent to the report, I see what I want on the screen, but the exported formats show:


Project Name              Job Name               #Contractors
-------------------------------------------------------------------
&lt;br;&gt;                   &lt;p;&gt                   10



Now conversely, if I decode the strings before sending them to the report, I see this on the screen.

Project Name              Job Name               #Contractors
-------------------------------------------------------------------
                                                                   10


I see this in the exported formats (PDF/CSV):

Project Name              Job Name               #Contractors
-------------------------------------------------------------------
<br>                             <p>                        10


Is there any way to get everything to be consistent and show what I want in all cases?  Maybe some kind of escaping technique for the strings?

Thanks,

John
Steve
Telerik team
 answered on 27 Jan 2011
1 answer
87 views
i make telerik report like invoice
in other page i have one button
and invoice number
i want when user click button telerik report open
and pass invoice number to telerik report
thanks for your help
niloofar
Top achievements
Rank 1
 answered on 27 Jan 2011
9 answers
1.2K+ views
Following the example in Getting Started, we have been able to create a report class, set a data connection, preview it, then drop the class into a form in a web application project and view it.  OK for a simple prototype, but no good in production on client's server since data connection string will be different and sql select string will vary based on user input.

So we need to bind the data source to the report at runtime.

The explanations on p 34 of pdf documentation and FAQ of chm help file capture the idea, but we need some additional detail.

This is a web application project.  The code we are trying to use to bind a data adapter to the report is below. It was copied from the documentation.  It is in the aspx hosting the report viewer which was defined in a separate class project and imported via the references tab.  The report has a data  source defined in that class.

Where does this code go?  It would have to be in the aspx page hosting the report viewer, right? If so, where?   The documentation says 'in the report's constructor'.  If so, could you please provide an example?

namespace OurWebApp
{
  public partial class TelericTest : System.Web.UI.Page
  {
    protected void Page_Load(object sender, EventArgs e)
    {
      String s = "";
      String sSelect = "Select * from jvClaim where Createdt >= '09/01/2008'";
      s = cms.sqlClass.getConnString();
      SqlConnection conn = new SqlConnection(s);
      SqlDataAdapter adapter = new SqlDataAdapter(sSelect, conn);
      DataSet dataSet = new DataSet();
      adapter.Fill(dataSet);

      //this.DataSource = dataSet;  ???
      //this.DataMember = "Table";  ???
    }
  }
}

Many thanks,
Mike Thomas







Steve
Telerik team
 answered on 27 Jan 2011
2 answers
127 views
Hi,

I have two subreports within a report. I need to some calculation in the second subreport based on the property in the first subreport.

The way I did this is:
  • Created a public property in first report
  • Assigned a value of a textbox using Itemdatabound event
  • Assigned the value to a variable in the master as var = report1.propertyName
  • Assigned this variable to a parameter in the second report as : report2.parameter[0].value
  • Trying to perform calculation in the report2 using the parameter value.

This isn't working. Any suggestions?
Thanking you in advance.

Deepak Shakya
Top achievements
Rank 1
 answered on 27 Jan 2011
0 answers
73 views
hi guys, i generated a report with a lot of charts inside, the problem is that i need only two chats per page
This is my code:

        txtArea = New Telerik.Reporting.TextBox
        txtMeta = New Telerik.Reporting.TextBox
        progchart = New Telerik.Reporting.Chart


        detail.Height = New Telerik.Reporting.Drawing.Unit(0.60019993782043457, Telerik.Reporting.Drawing.UnitType.Cm)
        detail.Items.AddRange(New Telerik.Reporting.ReportItemBase() {txtArea, txtMeta, progchart})
        detail.Name = "detail"
        detail.PageBreak = Telerik.Reporting.PageBreak.None

        'Area

        If op Then
            txtArea.Location = New Telerik.Reporting.Drawing.PointU(New Telerik.Reporting.Drawing.Unit(0.3, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))), New Telerik.Reporting.Drawing.Unit(yPos - 1, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))))
            txtArea.Name = "txtGrupo" & row("AREA")
            txtArea.Size = New Telerik.Reporting.Drawing.SizeU(New Telerik.Reporting.Drawing.Unit(25.0, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))), New Telerik.Reporting.Drawing.Unit(0.5, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))))
            'textBox1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid
            txtArea.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center
            txtArea.Style.Font.Bold = True
            txtArea.StyleName = "Data"
            txtArea.Value = row("AREA")
        End If

        'Meta

        txtMeta.Location = New Telerik.Reporting.Drawing.PointU(New Telerik.Reporting.Drawing.Unit(0.3, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))), New Telerik.Reporting.Drawing.Unit(yPos - 0.5, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))))
        txtMeta.Name = "txtGrafico" & row("META") & " (" & row("Unidad") & ")"
        txtMeta.Size = New Telerik.Reporting.Drawing.SizeU(New Telerik.Reporting.Drawing.Unit(25.0, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))), New Telerik.Reporting.Drawing.Unit(0.5, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))))
        'textBox1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid
        txtMeta.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center
        txtMeta.StyleName = "Data"
        txtMeta.Value = row("META") & " (" & row("Unidad") & ")"


        ' Grafico

        progchart.BitmapResolution = 96.0F
        progchart.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf
        progchart.Name = "progchart"
        progchart.PlotArea.EmptySeriesMessage.Visible = True

        progchart.Location = New Telerik.Reporting.Drawing.PointU(New Telerik.Reporting.Drawing.Unit(0.3, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))), New Telerik.Reporting.Drawing.Unit(yPos, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))))
        progchart.PlotArea.EmptySeriesMessage.Appearance.Visible = True
        progchart.Size = New Telerik.Reporting.Drawing.SizeU(New Telerik.Reporting.Drawing.Unit(27.0, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))), New Telerik.Reporting.Drawing.Unit(6, (DirectCast((Telerik.Reporting.Drawing.UnitType.Cm), Telerik.Reporting.Drawing.UnitType))))
        progchart.SeriesPalette = "Web"
        progchart.ChartTitle.Visible = False
        progchart.PlotArea.DataTable.Visible = True
        progchart.PlotArea.XAxis.AutoScale = False

        Dim titulos As List(Of String) = New List(Of String)

        Dim Serie1 As New Telerik.Reporting.Charting.ChartSeries
        Serie1.Type = Charting.ChartSeriesType.Bar
        Serie1.Appearance.ShowLabels = False
        Serie1.Name = "Target"

        Dim Serie2 As New Telerik.Reporting.Charting.ChartSeries
        Serie2.Type = Charting.ChartSeriesType.Bar
        Serie2.Appearance.ShowLabels = False
        Serie2.Name = "Actual"


        Dim serieItem As Telerik.Reporting.Charting.ChartSeriesItem

        For i = 1 To 12

            serieItem = New Telerik.Reporting.Charting.ChartSeriesItem
            If IsDBNull(row("VAL_PRY" + RTrim(i))) = False Then
                serieItem.YValue = row("VAL_PRY" + RTrim(i))
            End If
            Serie1.AddItem(serieItem)

            serieItem = New Telerik.Reporting.Charting.ChartSeriesItem
            If IsDBNull(row("VAL_EJE" + RTrim(i))) = False Then
                serieItem.YValue = row("VAL_EJE" + RTrim(i))
            End If
            Serie2.AddItem(serieItem)

            titulos.Add(obtenMes(i))


        Next

        progchart.Series.Add(Serie1)
        progchart.Series.Add(Serie2)
    
        progchart.PlotArea.XAxis.AddRange(1, titulos.Count, 1)

        For i = 0 To titulos.Count - 1
            progchart.PlotArea.XAxis(i).TextBlock.Text = titulos(i)
        Next
oscar andre
Top achievements
Rank 1
 asked on 26 Jan 2011
2 answers
672 views
Is there someplace I can download the demo project?  It use to be part of the install program but I can't seem to find it now.
Tina
Top achievements
Rank 2
 answered on 26 Jan 2011
1 answer
316 views
I'm having some trouble with my sub report. I have a master report that I use to pass some parameters to a sub report.

I created a report parameter on the sub report called "ReportTitle" and I can pass it a hard coded value from the master report.

What I need to do is be able to pass some values to the sub report so I can use those values to dynamically, from code, pull a dataset for the subreport.

I'm not sure how to pass a value to the subreport and then access it in code.

Any help is appreciated.
Peter
Telerik team
 answered on 26 Jan 2011
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?