Telerik Forums
Reporting Forum
1 answer
100 views

Hello.

I am trying to dynamically create a report, without any designer, just c# code. I am using instance report source with a report document, to which i add items on the fly, based on a custom report definition containing the user required report format (columns, rows, sorting, etc). 

No matter what i do, the final report gets rendered on pdf with an empty page. The problem is that with the same report items, i am getting results when using visual studio designer. I am referring to teleric report examples in C# (ListBoundReport). I have modified the designers class report items to just include a singe section with a table having one column and row. The output in the designer preview is an empty table having only visible borders.

I have copied the report items from the above example in my reporting library implementation. The difference is that the items are constructed in a custom builder class instead of the report item constructor as in your example. The outcome is a pdf with no visible table. 

I can post the builder class that creates the report items, but it has a lot of custom information that will get you confused. Instead, i will post the modified code from the designer file in your example. I can attach my builder class code, as well, if needed.

Please let me know what i am doing wrong because i have created a whole infrastructure in the idea of creating on the fly reports based on some user configuration.

john
Top achievements
Rank 1
 answered on 01 Nov 2018
1 answer
5.8K+ views

Hi All,

I have a date field in my sql query.

I want to create a report in which i want to show Current year(2016) and previous year(2015) data only.In the same way i want to show current month and previous month data.

 

So can someone tell me how i can convert my date to current year and the previous year or current nonth and previous year.

 

I am using Standalone report designer.

 

Thanks,

 

Narender

Ivan Hristov
Telerik team
 answered on 31 Oct 2018
1 answer
322 views
Hi. I try to select report engine for my application and play with Telerik reporting. Almost all clear and working as expected.
One question. In what way I can get selected page size, orientation etc in reportViewer?
After call ShowPageSetupDialog for example...
Silviya
Telerik team
 answered on 30 Oct 2018
1 answer
122 views

New to Reporting.  Trying to evaluate for our product launch.  

Context:

1. Visual Studio 2017

2. WPF App

3. Data is "contained in" our library

4. I would like to use the designer by editing a trdp file for setting up the report

5. Configuration is AnyCPU

No matter how I modify the app.config file, I can't get any object entities to show up anywhere in the designer.  what am I doing to prevent that?  Examples of this anywhere would be helpful.  Couldn't find anything using Google.

Todor
Telerik team
 answered on 30 Oct 2018
1 answer
192 views

Hi,

 

I have a main report and 3 sub reports. I referred to the telerik documentation and the forum. I have a objectdatasource in the main report and the sub report relies on the parent datasource --> =MainReport.objectDataSource1. I have also set field value to =MainReport.objectDataSource1.FieldName in the subreport.

The report loads successfully but there is no data. It's very frustrating and I have a spent of lot of time trying to resolve the issue.

I will appreciate it, if you can please assist me with this. 

 

Thanks,

Ashith.

Todor
Telerik team
 answered on 30 Oct 2018
1 answer
724 views

I've looked through other posts, and I think I'm doing this correctly...but I must be missing something. I have a report that I created within VS2015 using 2018 R2. I don't want to show the report in a viewer. When I click a button, I have it rendering straight to a PDF. I only want the report to show info for the record I'm on in the application, so I created a parameter. When I pass the parameter, it doesn't use what I'm passing. Maybe I'm not understanding parameters. I want the report to pull info using the following SQL: select id, employee_id, employ_badge from employee where id = @id. (this is an example of what I want). I've included the code below. What am I missing? Am I loading the report wrong? Have I misunderstood parameters? Also, how do I set the datasource in the code behind? I've looked at the example that attached with a similar post and it looks like what I have.

protected void btnPrint_Click(object sender, EventArgs e)
{
Telerik.Reporting.Processing.ReportProcessor reportProcessor =
new Telerik.Reporting.Processing.ReportProcessor();
// set any deviceInfo settings if necessary
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
Telerik.Reporting.TypeReportSource typeReportSource = new Telerik.Reporting.TypeReportSource();
// reportName is the Assembly Qualified Name of the report
typeReportSource.TypeName = typeof(Report1).AssemblyQualifiedName;
int RowID = Convert.ToInt32(ViewState["FORMROWID"]);
typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("id", RowID));

Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", typeReportSource, deviceInfo);
string fileName = result.DocumentName + "." + result.Extension;
string path = System.IO.Path.GetTempPath();
string filePath = System.IO.Path.Combine(path, fileName);
using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
{
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
}
WebClient User = new WebClient();
Byte[] FileBuffer = User.DownloadData(filePath);
if (FileBuffer != null)
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-length", FileBuffer.Length.ToString());
Response.BinaryWrite(FileBuffer);
}
}

Todor
Telerik team
 answered on 30 Oct 2018
3 answers
895 views
Hi,

I need to build a report which has its DataSource a List<Object1>
Object1 has a List<Object2>
Object2 has a List<Object3>

All objects have a property Name(and some other details)

Report should show like:

Object1.Name
* Object2.Name
** Object3.Name
** Object3.Name
* Object2.Name
** Object3.Name
** Object3.Name

Object1.Name
* Object2.Name
... and so on.

I`ve created a list1 which has the datasource - List<Object1>, but after this I got stuck, I can't find a way to set the datasource for the next list which would need to show Object2 list, and after that, Object3 list. How can I achieve this without building the controls from code?

I must mention i`m new in working with telerik, in case this was not found out yet.

Thanks in advance.
Todor
Telerik team
 answered on 30 Oct 2018
3 answers
164 views
Hello,

I have a problem with the group footer section. My objective is to stick it to the last printed row of a table in the detail section.

I have it configured to PrintAtBottom = false

On the page i have only 2 groups and in the detail i have a table. 

When the table row is too height and it doen't fit in that page, the group footer section is printed always on bottom of the page, and i do not want that, i want it to be printed right below the last row of that table in that page.

I already play it around with the keeptogether and it didn't work.

Can somebody help me?
Thanks,
Nuno
Silviya
Telerik team
 answered on 29 Oct 2018
14 answers
2.9K+ views
I'm trying to evaluate some fields inside a table in my report, however I see that the table has its own datasource property, I want to set the datasource property to be the same as the report's datasource, how can I do so? thanks!
Silviya
Telerik team
 answered on 29 Oct 2018
1 answer
71 views
We've upgraded to 12.2.18.912 and now, in the HTML viewer, when an option (ie PDF) is selected for Download, nothing downloads and no error is thrown.  Are there upgrade steps that we have missed?  Please advise.
Veronika
Telerik team
 answered on 26 Oct 2018
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?