Hi all,
I need to create exactly like this report format shown from the attachment.
Is there any tutorial on how to create this kind of report?
My report need to be 11 rows x 4 column. So maximum is 44 data in 1 page.
I'm using Telerik Reporting Q2 2015 - 9.1.15.624
Please help.

1.var typeReportSource = new TypeReportSource() { TypeName = typeof(Tegma.CSA.TelerikReportLibary.Saida.ProtocoloBook).AssemblyQualifiedName };2.int count = 0;3.foreach (int itemId in myListInt32)//MY LIST INT324.{5. typeReportSource.Parameters.Add("reports(" + count + ").protocoloId", itemId);6. count++;7.}@(Html.TelerikReporting().ReportViewer() .Id("rptProtocolo") .ServiceUrl(Url.Content("~/api/reports")) .ReportSource(typeReportSource) .ViewMode(ViewMode.PrintPreview) .ScaleMode(ScaleMode.Specific) .Scale(1.0) .PersistSession(false) .PrintMode(PrintMode.AutoSelect))
MY BOOK CONSTRUCTOR
public ProtocoloBook(){ List<int> myListInt32 = new List<int>();//MY FAKE LIST - NEED WITH PARAMETER myListInt32.Add(2000108); myListInt32.Add(2000111); AddReports(myListInt32);}void AddReports(List<int> listaIdProtocolos){ for (int i = 0; i < listaIdProtocolos.Count; i++)//Add equivalent with list receive { var typeReportSource = new TypeReportSource() { TypeName = typeof(Tegma.CSA.TelerikReportLibary.Saida.ProtocoloRetirada).AssemblyQualifiedName }; this.ReportSources.Add(typeReportSource); }}Any way to get in the constructor Make a list of Id's that I should generate the reports?
If possible with exampleHi I have some Issues with an expression that should be working but its instead outputting an empty result and I'm sure it should be working because it actually works for 1 of the 4 tables I'm printing on the report but not for the other 3.
the expression is the following:
=IIf(Fields.BankMovementType = "TRANSFER", Exec("table1",Sum(NetPayment)),"")
which makes use of this calculated field:
NetPayment (Double) =IIf(Fields.BankMovementType = "TRANSFER", (Fields.Perception - Fields.Deduction),0)
this actually gives me a sumatory of the NetPayment for all the "TRANSFER" movement types and leaves out the rest of the movement types, now I have tested this Expression multiple times and it works perfectly, however it only seems to be calculating for the "TRANSFER" movement type, in one table only.
the other tables for the different forms of payment use the exact same formula, the only thing that changes is the condition:
=IIf(Fields.BankMovementType = "EFFECTIVE", Exec("table5",Sum(NetPayment)),"")
NetPayment (Double) =IIf(Fields.BankMovementType = "EFFECTIVE", (Fields.Perception - Fields.Deduction),0)
however this time around the field that is supposed to contain the sumatory is completely empty and I simply don't understand how this is possible, I know the parameter and the settings for the tables are exactly the same as I just copied and pasted the table and simply changed the condition for each different table.
I have also tried changing the expression to something like:
=IIf(Fields.BankMovementType = "EFFECTIVE", Exec("table4",IIF(NetPayment > 0,Sum(NetPayment),"")),"")
but it still shows empty and I just simply don't understand what is wrong with it, it doesn't even give any errors, it just simply doesn't do what its supposed to do...
I have attached images of the resulting tables to better understand what I'm trying to say, the first one is from the table that actually works and the second one is form the one that doesn't do its job. The final image is a picture of how they are structured on the designer.
I'm trying to make a textbox in the footer the difference of two textbox value.
One is a sum value of a data item, the other is a value generated via codebehind.
I've tried this:
Private Sub ReportFooterSection1_ItemDataBound(sender As Object, e As EventArgs) Handles ReportFooterSection1.ItemDataBound oConn.Open() Dim ocmd As New SqlCommand("SELECT * FROM tblDynamic", oConn) ocmd.CommandType = SqlDataSourceCommandType.Text Dim reader As SqlDataReader reader = ocmd.ExecuteReader If reader.HasRows Then reader.Read() _txtLoansPerFinancial.Value = reader("TotalLoansPerFinancials").ToString() _txtLoanDifference.Value = _txtLoansPerFinancial.Value - _txtTotalLoanBalance.Value End If oConn.Close() End Sub
Where the expression on _txtTotalLoanBalance is = Sum(Fields.PctRiskTierGT1) , however rather than get the value that the expression brings, it incorporates _txtTotalLoanBalance.value as the string "= Sum(Fields.PctRiskTierGT1)" and it gets an error.
How can I get the value of this text box, or the value of Sum(Fields.PctRiskTierGT1) in the codebehind?
Hello all reporting gurus.
I've been using Telerik reporting in Silverlight for 5 years, acctually with no serious issue.
Now we need to send a report via Mail w/o passing thru printing it to pdf and manually attaching it to a mail. So I've googled a little and found a way thru RepoerRender. The problem is that I'm NOT able to pass any parameter (all I get is a page with just fixed fields and DataSource is not used anytime (I have a breakpoint in report's rptPraticaPreventivo_NeedDataSource event, and it's never hit), so I guess I'm doing it the wrong way.
Can you pls help me in passing parameters the right way?
code I'm using is right after (both in VB and C#). Thank you in advance!
======================================VisualBasic=======================================================
Public Sub SendByMail(nomeRpt As String, parList As String, codTesti As String, adresses As String, sender As String, subj As String, body As String, mailPwd As String)
Dim rptSrc As New InstanceReportSource()
Dim exRpt = Assembly.GetExecutingAssembly
Dim tcw As Type = Type.GetType("UGO_Rpt." + nomeRpt)
Dim rp As New rptPraticaPreventivo
Dim pars() As String = parList.Split(";")
For Each par In pars
Dim idVal() = par.Split("=")
Dim id As String = idVal(0)
Dim val As String = idVal(1)
rptSrc.Parameters.Add(id, val)
Next
rptSrc.ReportDocument = rp
Dim rpt = TryCast(rp, Telerik.Reporting.Report)
Dim reportProcessor As New ReportProcessor()
Dim result As RenderingResult = reportProcessor.RenderReport("PDF", rpt, Nothing)
Dim ms As New MemoryStream(result.DocumentBytes)
ms.Position = 0
Dim attachment As New Attachment(ms, rpt.Name + ".pdf")
Dim msg As New MailMessage(sender, adresses, subj, body)
msg.ReplyToList.Add(sender)
msg.Attachments.Add(attachment)
Dim SmtpServer As New System.Net.Mail.SmtpClient()
Dim netCred As New NetworkCredential
netCred.UserName = "security@mydomain.com"
netCred.Password = mailPwd
SmtpServer.Credentials = netCred
SmtpServer.Port = 587 'Porta standard SMTP/TSL
SmtpServer.Host = "name.server.com"
SmtpServer.SendMailAsync(msg)
End Sub
========================================C#===========================================================
public void SendByMail(string nomeRpt, string parList, string codTesti, string adresses, string sender, string subj, string body, string mailPwd)
{
InstanceReportSource rptSrc = new InstanceReportSource();
dynamic exRpt = Assembly.GetExecutingAssembly;
Type tcw = Type.GetType("UGO_Rpt." + nomeRpt);
rptPraticaPreventivo rp = new rptPraticaPreventivo();
string[] pars = parList.Split(";");
foreach (void par_loopVariable in pars) {
par = par_loopVariable;
[] idVal = par.Split("=");
string id = idVal(0);
string val = idVal(1);
rptSrc.Parameters.Add(id, val);
}
rptSrc.ReportDocument = rp;
dynamic rpt = rp as Telerik.Reporting.Report;
ReportProcessor reportProcessor = new ReportProcessor();
RenderingResult result = reportProcessor.RenderReport("PDF", rpt, null);
MemoryStream ms = new MemoryStream(result.DocumentBytes);
ms.Position = 0;
Attachment attachment = new Attachment(ms, rpt.Name + ".pdf");
MailMessage msg = new MailMessage(sender, adresses, subj, body);
msg.ReplyToList.Add(sender);
msg.Attachments.Add(attachment);
System.Net.Mail.SmtpClient SmtpServer = new System.Net.Mail.SmtpClient();
NetworkCredential netCred = new NetworkCredential();
netCred.UserName = "security@mydomain.com";
netCred.Password = mailPwd;
SmtpServer.Credentials = netCred;
SmtpServer.Port = 587;
//Porta standard SMTP/TSL
SmtpServer.Host = "name.server.com";
SmtpServer.SendMailAsync(msg);
}
As described in this forum question, I have created a dynamically-sizable page footer by creating an unbound group and enabling PrintAtBottom and PrintOnEveryPage. The problem I am having now, however, is that the resizing isn't playing nicely with the text of the report in the Detail section, and on one page is hiding half a line of text with the whitespace at the top of the footer (defined as padding above the horizontal line, but removing the padding and moving the horizontal line down in the footer section creates the same effect); see attachment.
I have created the footer as belonging to an unbound group instead of creating a PageFooter section in order to enable text in the footer to wrap as necessary without requiring the footer to be enormous all the time.
I have a printer named XER. How can I print directly to a printer? I'm sharing my code here.
I want to print directly from my printer named XER without previewing..
thank you for your help?
private void reportViewer1_Load(object sender, EventArgs e)
{
try
{
var mfrm = (Frm_Giris) Application.OpenForms["Frm_Giris"];
if (mfrm != null)
{
mfrm.datacenter();
var rap = new Prt_AYazdir();
rap.a.Value = alma.ToString();
rap.b.Value = bal.ToString();
rap.c.Value = tarih.ToString();
rap.borc.Value = borc.ToString();
rap.sqlDataSource1.ConnectionString = mfrm.serveryolu;
var ss = "a";
ss = "select * from xxxx where id='" + aid + "' order by id asc; ";
rap.sqlDataSource1.SelectCommand = ss;
var reportSourcea = new Telerik.Reporting.InstanceReportSource();
reportSourcea.ReportDocument = rap;
reportViewer1.ReportSource = reportSourcea;
reportViewer1.RefreshReport();
}
}