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.
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.
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);
}
}
We let the user choose between single spacing, 1.5x spacing, and double spacing of the report rows. For the detail rows this is pretty easily accomplished by setting the Height of the detail section to (font size) * (line spacing) * (1.3). Line spacing is 1, 1.5, or 2. This makes all the detail rows space out correctly. But, we have reports with multiple total rows and these total rows need to be following the same spacing; we have not been able to get this to work.
For example I have two total rows in the footer section:
Sum <col 1 sum> <col 2 sum>
Average <col 1 ave> <col 2 ave>
When I set the location of the text boxes in the second row to y=0.01 points to y=1.99 points then this second row shows up as "single spaced"; in other words the top row text boxes push the second row down with no additional space added between then. Like "Sum" would be at (0, 0) and "Average" would be at (0, 1 point).
But as soon as I set the location of the second row text boxes to y=2 points or more the second row get pushed WAY down to basically double spaced (15 pixels between the rendered rows to 29 pixels between the rendered rows). Font size here was 8.25 points. I don't understand what is going on here. My plan was to sec the Y location of the second row to (font size) * (line spacing) * (1.3) which logically seems like it should work; but given this weird behavior I get double spaced all the time (for 1, 1.5 or 2).
Do I need to add a "spacer row" between these two rows to accomplish this or something similar? Is the Y component of the text box location interpreted in some weird way?