how can I display data fetched from several rows on a crystal report. Im using vb.net. So far i can just display data fetched from only one row. Thanks for answering
The principle of Reporting is to pass some datasource to your report, and on the design, link field with those datasource.
I don't use Crystal Report but the Report viewer from microsoft.
If you want i could explain the bases to you.
Julien
Related
I have a vb.net solution that is developped using vs 2010 and .net framework 4.0.
On a submit button reports are generated using Crystal Reports version 13.0.2. Reports are filled with datasets and some of them are nested reports.
Suppose I have report A, with sub-report B and B contains a sub-report C. I am using the below code to fill data:
MainReport.Load(Server.MapPath("~\Reports\A.rpt"))
MainReport.OpenSubreport("B.rpt").SetDataSource(DsB)
MainReport.OpenSubreport("B.rpt").OpenSubreport("C.rpt").SetDataSource(DsC)
But the third line is throwing an error
Not supported within subreports.
What is the error here? Any suggestions?
Please note that I am not using parameters in subreports.
Nested subreports are not supported in Crystal Reports. This is by design.
See also the following discussions:
https://archive.sap.com/discussions/thread/3348939
https://archive.sap.com/discussions/thread/2142327
http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=193
You'll need to re-design your report(s).
MatSnow precisely made clear what is the error.
As a suggestion, the workaround i usually do is to combine groups and details sections.
I cannot say t is always possible, but the main idea would be to use a group section to show the data of A, use the details section to show the data of B, and use a subreport to show the data of C.
Of course, if your current subreports contains groups, you will have to create more groups.
Another advantage of this approach is because subreports are slow. But it is a problem only for large reports.
Help!
I have a software that needs to print data and i want to use crystal report so that i could have multiple pages. I've tried using the crystal report and when you're using crystal report you need to export the database and its tables. But the problem is that I've coded my software that when it runs for the first time it will create a specific database and its corresponding tables. how can i use crystal report without exporting the database? I've already downloaded the crystal report. please help me.
I am using RDLC Reports and the report viewer control, and I am seeing that the more records there is in the final result the longer it takes to load.
It sounds to me that the RDLC report loads all records at once (and caches them locally) even though it paginates it when sending to the browser.
So I believe the solution should be to cause the report to load only the records needed for the current page.
How can I do this?
Or if there is another solution to optimize then please let me know
If you need to analyze and aggregate a huge amount of records (millions) you can do the work on sql server using a Stored Procedure or a Query and next you can output to the report viewer only the aggregated data.
This is useful when you don't need to show the details of your data in your report.
I have a dynamic pivot request I would like to present in a report of Reporting Services.
As it is dynamic, the number of columns of the result is variable (as is the name of the columns). How could I create a report showing a table handling this variable number of columns ?
You can also use the Matrix control to pivot the results in the report instead of in the query. This way you don't have to use any custom solution.
You will need to implement a dynamic report definition file. Here is a link that will help you get started. It is a VS Project that dynamically creates a RDLC file with a table, via a datatable. I used it as the base of my current report system.
C# Version
VB.NET Version
If you have any questions about this, let me know. I've been generating RDLC files for quite a while now, and encountered pretty much every issue you could think of :)
Does anyone have a recommendation for an excellent reference on Microsoft's ReportViewer (VS 2008 flavour) when used in local mode? I'm currently using it but parts of it are a bit of a black box so I'd like to read up on the entire subject.
Especially want to start using sub-reports to display more complex parent-child reports. I'm assuming they work in a similar mode to Crystal Reports with which I'm reasonably familar.
Thanks, Rob.
The link to http://www.gotreportviewer.com is a good once but it does look like material on local sub reports and ReportViewer 2008 is a little sparse and spreadout across the net. It would be a subject worth blogging about so I will :-)
Here are a few headlines:
A subreport is a completely separate report but is linked to the master report using the standard report parameter mechanism. The master report is configured to pass one or more of it's fields (e.g. the primary key) to the subreport. The subreport typically then uses this parameter as a parameter to it's own query to load a dataset
Even though you may have defined a data source against the subreport when designing it, this isn't used when used in a master report. Instead you have to implement a handler for the SubreportProcessing event. The same handler is called for each subreport you add to your master report so you can query the parameters passed to the handler to determine the dataset to load.
The event handler is called once for each record in master report. For example, if the master report displays 200 records, the event handler is called 200 times but with a different parameter each time.
Because of this, you have to be wary of performance. The first report I ran had 2,000 records (perfectly okay for a flat report) but each of those 2,000 records fetched 20 child records for the subreport. It did run but took several minutes before the report was rendered
If you can structure your data so that a single dataset can be used containing data for both the master and subreport, then nested data regions have better performance - only one query to return 2,000 records not 2,000 individual queries. See http://www.gotreportviewer.com/masterdetail/index.html
Cheers, Rob.
I worked with the ReportViewer control at one point and was able to find some good information at http://www.gotreportviewer.com
Was the documentation insufficient? In what way?
Reporting Services and ReportViewer Controls in Visual Studio
Samples and Walkthroughs
ReportViewer Controls (Visual Studio)