Data Controls :: Crystal Reports Using DataSet - Use Fields From Multiple Tables
Apr 23, 2014
I have a report which is runnin fine as it is using singe table Dataset(.xsd) . I want to expand the report and use more tables in it to show more information .
How can I do so. I am attaching my present code with this.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim stdate, enddate As Date
Dim sql As String
start_date.Text = Session("startdate")
end_date.Text = Session("endate")
Dim dt As DateTime = DateTime.Parse(start_date.Text, System.Globalization.CultureInfo.GetCultureInfo("en-gb"))
using vs.net 2005, sql server 2005, creating windows form appI have a dataset that I bound to a crystal report as follows:
and in the Crystal Report in design view I added a Text Object called "myTxtObj".I am assuming that I can do something like this
However I'm not seeing the "myTextObj" with intellisense in the code behind in the form.so my question is: after binding a dataset to a report how to you bind column values to text objects on your crystal report?and actually one mor thing:I just ran the project and found out when I try to do the databind that i'm getting an error:"The report has no tables"how to solve this too?
I have a report displaying the data for an employee. If I wish to generate report for 2 employee, how I can do to make a single report contains both the data? (e.g.: 1st page display data for 1st employee; 2nd page display data for 2nd employee and so on) I need them to be in the same report/pdf file.
I am working on Crystal Reports 8.5 and SQL Server 2000 as backend. I have a stored procedure which has been added to the Crystal Report. So that fields are visible in the Fields object section from where i can drag and drop the fields on the report and display it. But now as they want more fields i have written two select statements for displaying required fields. But these newly added fields are not visible in the Fields object section in the Crystal Reports. I have done verify database, removed and again attached the SP but the problem is not solved.
I'm having a lot of trouble with this, and all the examples that I've found online tell me different things, so II added a DataSet to my project and added my database table to it. (DataSet should be ready)I added a CrystalReport to my project and in the Details section, I right clicked and chose "Database Expert" under "Database". I expanded "Project Data" and found my DataSet...I selected my table and added it to the "Selected Tables" list.In the CrystalReport designer, I used the "Field Explorer" to add 5 of my database fields (just for testing purposes). The report added their names to the "Page Header" and the fields to the "Details" section.On some button click, I use the following code to show the report:
where "conn" is my global SqlConnection.where "CrystalReportViewer1" is obviously the viewer I have put in my aspx page.where "DataSet1" is the DataSet I created and holds my table.where "CrystalReport.rpt" is obviously the report I created.and I used the following code to make sure that myDS actually was loaded with the data:
So the DataSet is definitely loaded with data, the CrystalReport is found (because before I was having trouble with loading into oRpt), and no exception is being thrown because the "Catch" section is never reached.I'm sure it's something dumb I'm doing, but does anyone have any suggestions? I know if I can figure this little problem out, I can expand it to the more complex things I want it to do. But currently, I can't get anything to show,
can we build a crystal report with variable fields. that is, choosing multiple fields from the same table from a previous page through check box, and these chosen fields are the ones to be shown in the report.
I want to display a crystal report in my vb.net application. Suppose I have tables named student details, student marks, student address, etc... Nowif I want to display all these details (fields of all tables) in one crystal report (with page breaks if necessary) then how will I achieve it. I will be providing a combo box in my application that contains list of student names.How can I link this combo box with the cystal report to dynamically display report for different student on selected index change of combo box?
I want to export dataset to Excel. I did the following ways:
1) bind a dataset to a crystal report, 2) export crystal report to Excel Can it be done without displaying crystal report and only Excel file? Or, I have to find out a way export to Excel directly from dataset?
I have a dataset with 3 tables that are inner joined. Thsi dataset is connected to an object datasource which is connected to a gridview. So at runtime it displays data from the database. The problem is when I click on a save button to add information to the database it throughs me an error saying Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. But if i have two tables in my dataset it works 100%. But the problem i need that 3 tables in order to pull the required information. And if i populate the gridview using code to select the information from the database and insert information it also works 100%.
I have a stored procedure that returns 3 tables within the single recordset it returns. If I set a SqlDataSource to get data from this procedure, it works, but it only returns the first table. I want to have a GridView display the data from the 2nd or 3rd table using a SqlDataSource, but I can't figure out how to specify a particular table.
While there are some posts discussing this out there, I can't get a definitive answer about whether or not this is even possible (?). In a worst-case scenario, I can create another SP that only returns the 3rd table - but that creates a little maintenance headache that I would prefer to avoid.
I have a dataset that comprises of multiple tables (about 20) linked together with constraints to reflect the relational database. My question(s):
1) Will having multiple tables affect performance? I'm asking this as there are often times I would not need to get data for all the tables, but only for specific tables.
2) If it does affect performance, would breaking up the tables into their own datasets be the best solution. It seems to me that by doing that, you would lose the ability to apply constraints among tables and tables that might exist in multiple datasets will be subjected to replication.
I would like to have everything in one dataset as I get a view of the related tables and their relationships and also because the Fill method allow me to fill tables, maintaining the hierarchy of the data, but performance is still a key factor.
Is there a way to dynamically create a report?I have the following tables:
Obviously, this is quite straight forward if I could restrict the limit of the sizes, but they want the flexibility to add sizes, particularly with footwear or if they should need to add women's dress sizes.So the problem is that I'm generating dynamic table columns (the number unknown) during run-time.
in my project iam providing users to send sms acrooss india..in admin panel the admin have a feature to check the usersent sms details on the basis of userid.. when admin selects the userid then corresponding send sms details are details are displaying.. my requirement is generating the crystal report for that table..the users are displaying from one table and sent sms details are displaying detaials from another table.. how to generatye crystal report for that..and how to give formula fields in crystal reports
using vb.net 2005 and crystal reports I added a server and db to my crystal report and I can see the table and fields in the server explorer. Also in "database expert" I added the table that I want to display data from. The question I have now is how to I display fields from this table on my report? I thought I remembered simply dragging and dropping a field onto the report from the table but not able to do that now