Telerik Forums
Reporting Forum
1 answer
161 views
If the table adapter in dataset use connection string stored in Web.config, the report works OK when running the web page but show no data while previewing in Design mode.

I tried the solution proposed in forums but didn't work.
            ConnectionStringSettings connSettings = ConfigurationManager.ConnectionStrings["myConnectionString"]; 
            if ((connSettings != null) && (connSettings.ConnectionString != null)) 
            { 
                this.hospitalDataSetTableAdapter1.Connection.ConnectionString = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString; 
            } 
 

I debug Design Preview with a MessageBox like this...
            } 
            catch (System.Exception ex) 
            { 
                // An error has occurred while filling the data set. Please check the exception for more information. 
                MessageBox.Show(ex.Message); 
                System.Diagnostics.Debug.WriteLine(ex.Message); 
            } 

and I get "Object not set to an instance of an object"

What am I missing?
Thanks a lot!
Jorge
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
130 views
Hello,

I have a line chart in my report and want to show dates on the x-axis. Unfortunately the X-axis item labels don't show up. I tried to do it with the following code:

 

private void _gideonChart_NeedDataSource(object sender, EventArgs e)

 

{

_gideonChart.Series.Clear();

_gideonChart.PlotArea.XAxis.Clear();

_gideonChart.PlotArea.XAxis.AutoScale =

false;

 

_gideonChart.PlotArea.XAxis.AutoShrink =

false;

 

 

ChartSeries msciUsdSeries = new ChartSeries();

 

msciUsdSeries.Name =

"MSCI World USD";

 

msciUsdSeries.Type =

ChartSeriesType.Line;

 

msciUsdSeries.Appearance.FillStyle.MainColor =

Color.Purple;

 

msciUsdSeries.Appearance.FillStyle.SecondColor =

Color.Purple;

 

 

ChartSeries msciEurSeries = new ChartSeries();

 

msciEurSeries.Name =

"MSCI World EUR";

 

msciEurSeries.Type =

ChartSeriesType.Line;

 

msciEurSeries.Appearance.FillStyle.MainColor =

Color.FromArgb(203, 216, 254);

 

msciEurSeries.Appearance.FillStyle.SecondColor =

Color.FromArgb(203, 216, 254);

 

 

foreach (var entry in _dataSource)

 

{

 

ChartSeriesItem msciUsdItem = new ChartSeriesItem();

 

 

ChartSeriesItem msciEurItem = new ChartSeriesItem();

 

msciUsdItem.YValue = (

double)entry.MsciUsdQuote;

 

msciUsdItem.Label.Visible =

false;

 

msciUsdSeries.Items.Add(msciUsdItem);

msciEurItem.YValue = (

double)entry.MsciEurQuote;

 

msciEurItem.Label.Visible =

false;

 

msciEurSeries.Items.Add(msciEurItem);

 

ChartAxisItem chartAxisItem = new ChartAxisItem(entry.QuotesDate.Date.ToShortDateString());

 

_gideonChart.PlotArea.XAxis.AddItem(chartAxisItem);

}

_gideonChart.Series.Add(msciUsdSeries);

_gideonChart.Series.Add(msciEurSeries);

}

If you see some mistakes or know something else that might help, please let me know.

Thanks in advance and kind regards,
Gerald

Gerald
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
1.1K+ views
Hi,

Is it possible to generate a report from code behind and then send this pdf as an email.

I would like to achieve this without the user having to generate the report so I would need to do it using the api.

The scenario is if a user clicks a button 3 reports will get generated and sent to the user;s email address.
I want to do this on the fly.

I guess I might have to save the generated pdf in a temp folder while I send the email and then delete the reports.

Thanks,

Ronan
rmoynihan
Top achievements
Rank 1
 answered on 23 Jul 2009
2 answers
293 views

I am having trouble with a ReportBook.  The reports I am using are in a class, and they work fine if I set them up to show in a regular Report Viewer with the below code (the parameters are used in the NeedDataSource in the report):

    Dim report As Telerik.Reporting.Report = Nothing
        report = New LRSummary()
        If Not report Is Nothing Then
            If Not Me.txtPolNum.Text Is Nothing Then
                report.ReportParameters(0).Value = Trim(Me.txtPolNum.Text)
            End If
            If Not Me.txtAcctNum.Text Is Nothing Then
                report.ReportParameters(1).Value = Trim(Me.txtAcctNum.Text)
            End If
            If Not Me.txtSaleNum.Text Is Nothing Then
                report.ReportParameters(2).Value = Trim(Me.txtSaleNum.Text)
            End If
            If Not Me.Linid.Text Is Nothing Then
                report.ReportParameters(3).Value = Trim(Me.Linid.Text)
            End If
            If Not Me.txtParentAgent.Text Is Nothing Then
                report.ReportParameters(4).Value = Trim(Me.txtParentAgent.Text)
            End If
            If Not Me.txtSubAgent.Text Is Nothing Then
                report.ReportParameters(5).Value = Trim(Me.txtSubAgent.Text)
            End If
            If Not Me.LimitEffective.Text Is Nothing Then
                report.ReportParameters(6).Value = Trim(Me.LimitEffective.Text)
            End If
            If Not Me.LimitExpiration.Text Is Nothing Then
                report.ReportParameters(7).Value = Trim(Me.LimitExpiration.Text)
            End If
        End If
        Me.ReportViewer1.Report = report

But if I use the below code to try to use the same report in a report book, it doesn't work.

       Dim reportBook As New ReportBook()
        Dim report As Telerik.Reporting.Report = Nothing
        report = New LRSummary()
        If Not report Is Nothing Then
            If Not Me.txtPolNum.Text Is Nothing Then
                report.ReportParameters(0).Value = Trim(Me.txtPolNum.Text)
            End If
            If Not Me.txtAcctNum.Text Is Nothing Then
                report.ReportParameters(1).Value = Trim(Me.txtAcctNum.Text)
            End If
            If Not Me.txtSaleNum.Text Is Nothing Then
                report.ReportParameters(2).Value = Trim(Me.txtSaleNum.Text)
            End If
            If Not Me.Linid.Text Is Nothing Then
                report.ReportParameters(3).Value = Trim(Me.Linid.Text)
            End If
            If Not Me.txtParentAgent.Text Is Nothing Then
                report.ReportParameters(4).Value = Trim(Me.txtParentAgent.Text)
            End If
            If Not Me.txtSubAgent.Text Is Nothing Then
                report.ReportParameters(5).Value = Trim(Me.txtSubAgent.Text)
            End If
            If Not Me.LimitEffective.Text Is Nothing Then
                report.ReportParameters(6).Value = Trim(Me.LimitEffective.Text)
            End If
            If Not Me.LimitExpiration.Text Is Nothing Then
                report.ReportParameters(7).Value = Trim(Me.LimitExpiration.Text)
            End If

        End If
        reportBook.Reports.Add(New LRSummary())
        Me.ReportViewer2.Report = reportBook
       
        I add more reports, but in the same way.  I get either no data or errors on the parameters.  If I set some sample parameters in the report class itself, the reports work, but with those sample parameters instead of the ones I set in code.  I almost feel like I should rebind the datasource somehow, but I don't seem to be able to access the report's datasource.  Plus why would I have to do that on the report book but not the report viewer?  Any ideas what I am doing wrong?

Thanks, Amy 
       

Amy
Top achievements
Rank 1
 answered on 22 Jul 2009
1 answer
302 views
Hiya Folks,

I'm evaluating the Telerik products.

I have a requirement to write a report that (concurrently) uses data from BOTH an ODBC MySQL Database Connection AND a MS SQL Database.

Will Telerik's Report Writer support this requirement?

The ODBC MySQL uses the MySQL 3.51 ODBC client and is read only using Views.   The MS SQL is current 2008.  VS 2008 and .NET 3.5 is the development environment.   I'd like to wrap the reports in a SL 3 app (yes, I saw the recent TK example on how to do this - very nice).

If so, is there an example that demonstrates this?

If the Report Writer doesn't support multiple data sources on a single report, is there a fuctional work around with OpenAccess to combine tables from separate sources into a single data connection/source?  If so, I'll follow through with a post in the ORM forum.

FYI: My last resort would be to create a data warehouse for the MySQL data in MS SQL - I would like to avoid having to do that.

I'm always open to alternate solutions.

Thanks,
     Garth

*********** Later Update  *********
I am looking into ORM example:
http://www.telerik.com/ClientsFiles/112754_classlibraries.zip

to access multiple databases.

I would appreciate hearing from experienced users or TK on best practices in creating multi-database applications.
Steve
Telerik team
 answered on 22 Jul 2009
1 answer
138 views
Hello telerik team,

I whas busy with a news module where I use the image editor to crop images to the size of 100x100. I tried but the result whas like this

http://i30.tinypic.com/jkkjzr.jpg

The crop area you see is supose to be 100x100 but it exualy is 98x114.

This only occourse in IE when I set the width & height in the textboxes but when I use the selection field to drag it works perfect.

Hope this is solved soon

Greetings,
Jeroen Speldekamp
Rumen
Telerik team
 answered on 22 Jul 2009
6 answers
226 views
Hi,

-When will the next version of Telerik reports be released?
-Will the next release of Telerik reports have a wpf viewer? Will I perhaps have the capability to use my own wpf controls in the report if that is the case? (I'd like to use some of my own chart controls in the report)

Regards.
Jacobus
Henrique Duarte
Top achievements
Rank 1
Veteran
 answered on 21 Jul 2009
1 answer
149 views
Hi All,

I am using 3 reports
1. rptMain
2. rptOldReport
3. rptNewReport

I am using rptSubreport1 and rptSubReport 2 as subreports in rptMain.

I am using datatable to bind both the reports.

 

Public Sub New(ByVal dtOld As DataTable, ByVal dtNew As DataTable)

 

InitializeComponent()

 

RptOldReport1.DataSource = dtOld

RptNewReport1.DataSource = dtNew

End Sub

 

It shows the data for both the reports but the problem is that it is not showing the column headings in both the reports.

If I run both the reports seperately from my aspx page directly ( i.e. not opening report as a subreport) then the columns headings are visible.
e.g
Public Sub ShowReport(Byval dt as DataTable)
 Dim objRpt  as OldReport = New OldReport()  // Or Dim objRpt  as NewReport = New NewReport()
 objRpt.DataSource = dt
End Sub


Can anyone please let me know what could be the problem?
Steve
Telerik team
 answered on 21 Jul 2009
3 answers
89 views
I found a problem related to tables and the report system in general. If a need to make different row cell formats in a table there's no way to do it (I didn't find the way).

For example, if a have a listing of vehicles and I have several formatting-subreport types one for each type of vehicle I can't find the way do it in Telerik (without adding controls by code).

Is there any clean way to do it?

Thanks in advance

Steve
Telerik team
 answered on 21 Jul 2009
4 answers
90 views
If I have to present a report from a DataSource with several DataTables and I want to create one report with 2 grids then how can I do it?
Servando
Top achievements
Rank 1
 answered on 21 Jul 2009
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?