on 11-11-2012 7:17 AM
Hi
How i get the field value from crystal report into my vb.net variable
here in crystal report
1) I binded with a Typed Dataset using a view
2 )Done Grouping in crystal report
3)am doing some calculations in GroupFooter and Report Footer using formula fields and RunningTotal Fields,
calculating
GroupTotalGroupDiscount,GroupTotalAmount in GroupFooter
Total , TotalDiscount, TotalAmount in ReportFooter
and i want to save these values in database table tbl_Invoice and after saving a row in table a invoiceId will generated
and i want to show this Id in Report.
Can i get value and pass Invoice Id to report after setData source
CrystalReportViewer1.ReportSource = Report
If Not ds Is Nothing Then
If ds.Tables(0) IsNot Nothing Then
If ds.Tables(0).Rows.Count > 0 Then
Dim Report As ReportDocument = New ReportDocument
Report.Load(System.Windows.Forms.Application.StartupPath & "/Reports/" & rptName) Report.SetDataSource(ds)
CrystalReportViewer1.ReportSource = Report
Me.Panel1.Controls.Add(CrystalReportViewer1)
Return True
End If
End If
End If
Hello Adil
Obviously, you will have to run the report twice - once to produce the values and second time to show the values. You will have to use the InProc RAS SDK.
E.g.
1) I binded with a Typed Dataset using a view
2 )Done Grouping in crystal report
3)am doing some calculations in GroupFooter and Report Footer using formula fields and RunningTotal Fields,
calculating
GroupTotalGroupDiscount,GroupTotalAmount in GroupFooter
Total , TotalDiscount, TotalAmount in ReportFooter
4) Loop through the report sections looking for the field / object and value
5) Get and save the value
6) Close the report
7) Open the report
😎 Pass the value from (5) into t report object (text field, formula(?))
9) Display the report
Additional resources:
How to Use The RAS SDK .NET With In-Process RAS Server
KB - 1550243 - How can I access a formula fields text using the Report Application Server (RAS) .NET SDK?
Report Application Server .NET SDK Developer Guide
Report Application Server .NET API Guide
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.