Telerik Forums
Reporting Forum
0 answers
86 views
Hi There,

I am playing around with the reporting controls for the first time and have a question about the right way to do something. Essentially, I cannot use a normal data source for my report. There is a significant amount of custom work that needs to be done on what is in SQL Server to produce the data needed for the report. This info needs to be combined with parameters entered by the user at the time the report is run.

I assume Object Data Sources are the way to go.

I have created a data set (the .xsd type) and created a data table that mirror the data I plan to feed into the report. I've then used that dataset to build my report design.

Then, to populate the data, I have done the following;

 

 

Dim x As New DataTable

 

 

 

Dim dr As DataRow

 

x.Columns.Add(

 

"Col1")

 

x.Columns.Add(

 

"Col2")

 

dr = x.NewRow

dr(

 

"Col1") = "test1"

 

dr(

 

"Col2") = "test2"

 

x.Rows.Add(dr)

 

 


Dim
g As New Report6

 

g.ObjectDataSource1.DataSource = x

ReportViewer11.Report = g

I have never really used data sets and tables before, generally everything is done using sql querys odbcdatareaders connected to grids and so forth.

Is this the best way forward, or am I missing something more basic or straight forward?

Shane

Shane Clay
Top achievements
Rank 1
 asked on 18 Aug 2010
2 answers
286 views
Hi All,

In my chart Y-Axis values are vary with X-Axis. Since, X-axis values will be date & time values (like 18/Aug/2010 07:15:51:000PM). I would like to know how the date & time values are manually bind to X-Axis and also how to set minimum, maximum and step values for dates.

The attached file is my expected chart.

Thanks in advance,
Regards,
Manoj
manoj
Top achievements
Rank 1
 answered on 18 Aug 2010
3 answers
138 views
Hello,

can a user customize or create its own report in runtime? (eg. adding and removing columns)

Thank you,
Manuel
malcolm
Top achievements
Rank 1
 answered on 18 Aug 2010
4 answers
315 views
I'm pulling my hair out on this problem.

What i need is a report where we have a reportheader and a pageheader.
The Pageheader should not appear on the firstpage, witch can be done using the PrintOnFirstPage=False.
When u use this workingmethod the Pageheader space will be reserved on the first page anyway.
So when my pageheader has a height of 2cm it will have a blank space of 2cm on my first page.
To me thats not a feature but a bugg, i can't see this as logic behavior. When i say, don't show the pageheader on the first page i don't wanne see a blank space :O|. (sorry its frustrating me)

I tried to use a groupheader in the detail section, with a panel in it. Then use the ItemDataBind event to check if i am on the first page or not. I did this with with a bool and i was planning to set the panel visible when i'm not on the first page.
But the ItemDataBind event gets only called once. Not on every page.

So i'm looking for an event that gets called on every page so i can set the panel visible true/false depending on what page i'm at.

Or another solution where i can use a reportheader and a pageheader (that don't show on the first page and don't give me with space).

I like the reporting tool so far tho. I kinda used all the features it has and it works fine. Just this one is annoying me bad.

Kelly Harris
Top achievements
Rank 1
 answered on 17 Aug 2010
1 answer
71 views
Hi I have a set of telerik reports running well form the development environment.  I complied and distributed the app including telerik.reporting.dll and telerilk.reportviewer.webforms.dll in the bin directory.  I also included the .resx file to test if it was a resource problem.  Basically the screen looks like capture.gif  what am I missing?  I'm using Q2 2010.
Steve
Telerik team
 answered on 17 Aug 2010
6 answers
312 views
I am building a report for the following data:
--> FacilitY
--> Assessments
--> Photos

A facility can have multiple assessments and an assessment can have multiple photos. I can get the Facility data and the Assessments data to show up. I can not get the photos to load. I am loading the Photos SubReport during the 'assessmentsTable_Item
DataBound()' event as a subReport in a cell, but it doesn't appear that it is loading. Here's the code:

private void assessmentsTable
_ItemDataBound(
object sender, EventArgs e)
{
    if (m_HasRecords)
    {
        Telerik.Reporting.Processing.Table tab = (Telerik.Reporting.Processing.Table)sender;
 
 
        Telerik.Reporting.Processing.ProcessingElement[] elems = tab.ChildElements.Find("textBox16", true);
 
        for (int i = 0; i < elems.Length; i++)
        {
            DataTable dt_assessments = GetAssessments();
            Telerik.Reporting.Processing.TextBox assessmentID = (Telerik.Reporting.Processing.TextBox)tab.ChildElements.Find("textBox16", true).GetValue(i);
 
            Telerik.Reporting.Processing.SubReport rep1 = (Telerik.Reporting.Processing.SubReport)tab.ChildElements.Find("subReport1", true).GetValue(i);
            //Telerik.Reporting.SubReport rep2 = (Telerik.Reporting.SubReport)tab.ChildElements.Find("subReport2", true).GetValue(i);
 
            DataTable dt_photos = GetPhotos();
 
            LoadPhotos(dt_photos, assessmentID.Value.ToString(), m_Counter++, table2.Height.Value + 10, rep1);


private void LoadPhotos(DataTable dt_photos, string assessmentID, int i, float height, Telerik.Reporting.Processing.SubReport subReport1)
{
    DataView dv = new DataView(dt_photos, "photoSourceID='" + assessmentID.ToString() + "'", "PhotoDateTime", DataViewRowState.CurrentRows);
    subReport1.Report.DataSource = new RMReports.AssessmentPhotos(dv, m_PhotoDirectory, m_EventID.ToString());
    subReport1.Location = new PointU(new Unit(0.5, UnitType.Inch), new Unit(m_CurrentYLocation + height + 1, UnitType.Inch));
    subReport1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(7.9999217987060547, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.900000274181366, Telerik.Reporting.Drawing.UnitType.Inch));
}

public AssessmentPhotos(DataView dt_photos, string photo_directory, string eventid)
{
    /// <summary>
    /// Required for telerik Reporting designer support
    /// </summary>
    InitializeComponent();
 
    //
    // TODO: Add any constructor code after InitializeComponent call
    //
    m_PhotoDirectory = photo_directory;
    m_EventID = eventid;
    LoadPhotos(dt_photos);
}
 
private void LoadPhotos(DataView dt_photos)
{
    table2.DataSource = dt_photos;
}

Any help would be appreciated.
Kris
Top achievements
Rank 1
 answered on 17 Aug 2010
1 answer
182 views
Hi,
I try to display a report on both windows app and asp.net page using Telerik ReportViewer. My report is created on the fly. Because it's pretty narrow, I want to show the report in 2 colums in each page. It's working fine for Window app ReportViewer. In Web Browser Reportviewer It only shows 1 column per page, but when i export that to TIFF format, it shows 2 columns just like the windows app. Do I miss something when using Web Reportviewer?
Attaches are some screenshots.

Below are my codes related to this:

ReportTemplate.DetailSection1.ColumnCount = 2

ReportTemplate.Width =

New Telerik.Reporting.Drawing.Unit(3, Telerik.Reporting.Drawing.UnitType.Inch)

 

ReportTemplate.DataSource = dtReportData

ReportViewer1.Report = ReportTemplate

ReportViewer1.RefreshReport()


THanks
Quan

Steve
Telerik team
 answered on 17 Aug 2010
1 answer
70 views
Hi,

    Is there any way to stop the main report, in a drill report from requerying the database when it is reloaded?

thanks
Steve
Telerik team
 answered on 17 Aug 2010
1 answer
100 views
Is there anyway to log exceptions that may occur in the WCF ReportService while it is rendering a report?

there is a ReportServiceOperationException.  I can't see where it is raised or how it can be caught.

thanks

Michele
Top achievements
Rank 2
 answered on 17 Aug 2010
3 answers
387 views
Being a newcomer to Telerik Reporting I don't know if this is a known issue, or a work around is available, anyway.

I've a pretty simple table that renders in the web reportviewer just fine.
There are no header or footer rows, with just two columns of detail information.
The first column is a right justified percentage.
The second column is left justified text.  I've setting padding values so that there's some space between the columns at run time.
As I said, everything looks as expected in the web reportviewer.  When I export the report to PDF, XLS, TIF, XPS the text data is overlapping/overwriting the percentages.  If I change the text column's TextAlign to Center or Right, the overlapping/overwriting stops, but visually this isn't what I want.

Environment:
Windows 7 Pro
VS 2010
Reporting Q2 2010
Jim
Top achievements
Rank 1
 answered on 16 Aug 2010
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?