Can you update a data table, without losing your columns in your report in Crystal Reports? - crystal-reports

I have a Crystal Report that contains numerous fields and functions that all reference one SQL Server data view. Recently, I've had to make a copy of the underlying SQL data view and make a few modifications. I need to use my new data view as my data source within my Crystal Report.
My problem is that I need to keep the original data view, without changing it's name, but I need my Crystal Report to reference the new data view.
Is there an easy way for me to update my report's data source without having to update all of my columns and formulas? Otherwise, I'm starting from scratch and might as well create a new report, which I'd prefer not to do.

Yes. I haven't used CR in a while, but I used to do that frequently. There's actually a built-in option to change your data source and remap any fields it can't find in the new data source.
Check out #1 of Todd Watson's answer:
How do I point Crystal Reports at a new database

Go to Field Explorer -> Right click on Database fields -> Go to Set Datasource location -> In lower section (Replace with) -> Go to My Connections -> Right click on New Dataset (go to Refresh).

Related

How to find what tables are used in SAP Crystal Report 2013?

I am trying to debug missing data in an existing report.
I see the database it is connected to, but I do not find any table or stored procedure or view in that database with the same name that I see in the record selection part of the Crystal Report.
Is there a way to find which table/view/stored procedure is used as input for the Crystal Report?
Thank you
Never mind. I found it. Rt click on Database Fields and select Set Datasource location...
You need to set up first what type of connection you need.
This will help you using ODBC connection.
Ideally you can set this when first time confiugre the data, but suppose if you update the table or procedure and that will not impacted in your crystal report.
To update the updated db element / object in crystal report, simply "Update datasource" option click which pull the changes and update in crystal report.
May be helpfull in future.

Replacing Crystal Report data source with store procedure

I used to create crystal reports by going into database expert, selecting tables and specifying the link manually. As I get a bit more comfortable with CR, there is a need for me to put the underlying SQL query into a store procedure to provide data to the report. But doing so will require me to rewrite the whole report which is time consuming.
So, my question is if there are any guru in the community that could and/or have tried to replace the underlying SQL (created by manually add table and links) with a store procedure or cmd without having to rewrite the whole report? I would love to get some hint of how to do that as I have a couple dozen of reports that need "adjustments" and time does not permit me to rewrite them all.
My Crystal Report versions are CR 2008 and CR 2012.
Thank you in advance.
In case you can use an existing software : this feature is available in a free Crystal reports viewer. Here is the documentation, which explains the use :
http://www.r-tag.com/Documents/RTag%20DataSource.pdf
... and here is where you can get your free license:
http://www.r-tag.com/Pages/FreeCrystalReportsViewer.aspx
Crystal does an absolutely horrible job of migrating from many tables to a single DB object, be it a Command or stored procedure.
You might be able to Database | Set datasource location... to map your SP to one of the many tables in the report (choose the one that has the most fields in use); I've never been able to get this feature to work trying to map a Command to a table.
'Best practice' for a really-poor 'feature' set:
create a formula field for each field that will be on the canvas, but isn't grouped (these fields won't be removed when you change datasources)
add the Command to the report; link tables if desired
manually switch grouping, record-selection formula, sorting, etc.

crystal report field explorer not showing newly added field

I have created a crystal report with datasets(xsd) , it is working fine. Then i added a new field in xsd and when i open the field explorer it do not show that field, i added source again through database expert but still it is not showing that field. Any other person faced such issue then please help.
After waiting a lot for right answer and searching on internet i tried different options by myself and the problem was solved by right clicking on database fields and then click on verify database. If some one have some better option then please suggest.
I had the same problem and resolved it by adding parameter input and running the report from the designer. Crystal report popped up and said that it was fixing the report and refreshed the connection to the database for the most current fields.
I had a similar easy where Log on or Log off server and Verify Database wouldn't update the database fields list in Crystal Reports. The only thing that worked for me was to physically move the typed dataset to a different location. After creating a new connection within Set Datasource Location I updated the datasource and there it was....
Sap Crystal report has a problem while refreshing database changes to crystal report. I found this solution and it works like a charm:
First go to refresh data base option and then it will ask you to enter parameter values to the stored procedure
then without passing any values just press escape button it will suddenly ask you to confirm the changes made to database when you do it on second time it will say database is up to date
Don't forget to rebuild your solutions before validate your database.
Restarting the Machine did the trick for me.
Some data types in dataset can't show in crystal reports try to change data types ( example don't use System.DateTimeOffset use datetime only)
Verity database in database fields
If your DataSet (.xsd) came by "Add Existing File" and not create one, then you will encounter a problem like mine. to fix this:
-Find the DatasetName.xsd file and all of its name-like file . Copy it EXCEPT THE DESIGNER (DatasetName.Designer.cs) and paste it somewher, you will re-paste it later
-In your VS. Delete the DataSet (xsd File) in your project by right click it in your Solution Explorer. This will delete any traces of file.
-Re-paste the files that you copied in the same location. Then in VS. And add the xsd file that you re-paste.
-Then you can now add columns. And it will update the DataSet, and also the Crystal Report will see the updated column
Reason: For i-dont-know-what-the-heck-happened, if you include the designer file then add it in you project, then you add columns to it, the VS will create new designer.cs file instead of overwriting the existing file. So the column registers only in original but the newly created one only recognized as valid (which is no traces of new added column)
You can press F5 to see preview, if crystal report find out new fields it will verify all field in database, and your new fields will appear.
Hope this will help you!
Log off from server, then verify database, that did the trick for me!
By just updating the entire datasource location did not work for me. I had to expand the source location and then update the individual table. Hope this helps someone.
Right click REPORTDATASET then select Set Datasource Location.
click database files and select your existing *.xsd. then you will see REPORTDATASET.
select it.
update
close
Now you will be seeing the new fields in your *.rpt :)
I use the following technique:
Select datadese expert in crystal report
Select previous added datatable.
Press "<<" to remove it from reporting, its related columns are removed from report automatically.
Then select Project Data>>ADO .Net DataSets>> your updated dataset
Press ">>" to add and click the OK button.
New added field also shows in dataBase fields and then added in report.

Two SQL query inside single JasperReport

We are generating reports based on iReports and JasperReports for web application.
Using iReports I found I am struck with big problem.
I want to use two SQL query to fill up my main report...
In query designer I can only write one query..
For another query I cannot use sub-reports...
How do I write second query which will return different fields and include them in my report..
Please guide...
I cannot use sub-reports...
Yes, adding a table to your report is as easy as adding a field. Just drag it from the palette and drop it in the report where you need to have it.
Add a new Table data source. I assume this was done.
Once the data source is configured, you could design your table UI using the wizard.
just click on next or finish to close the wizard.
To add a parameter in data set (if needed), Navigate to your data set using the report inspector. Expand your data set. You would find the parameters menu. Right click to add the new parameter.
Now right click on your table and select edit table data source. Here you will find options to pass parameters to your table from the main report. Passing parameters to your table should be as simple as you do in sub reports. Select the parameter just created from the drop down list box and pass the required value.
In the Data set run Dialog box that appears, please make sure of the data set and the report connection you are using.
You are done configuring the table with this, next you will place the fields in the cells of table for displaying the data.
You are getting your document has no pages since the main report query does not return any rows i guess. For your table to be executed your main report must return at least a row
Hope this helps you.
Good Luck!!
As far as Ireports are concerned, the main report can comprise only one query. And if you wanna use multiple queries in your report, it is possible in the following ways.
Sub Report
Table Dataset.
sub Dataset.
since you don wish to use a sub report, you can go for a Table Dataset. Anything you would do with a sub report is possible with table dataset too(Except for returning variables). You can use sub datasets with charts and graphs. Table set will be of use to you i hope.

In SSRS 2008, is there any way to add all dataset fields to a table at once?

I'm working with SSRS for the first time. When adding a table to a report, is there any way to add all fields of a dataset to it at once or does it have to be done individually? Drag & drop, insert column -> right is a pain when there are a lot of fields that are being displayed.
It's a bit of a workaround, but the "Add new report" wizard automatically creates a table with the specified columns and groups from your given dataset. I don't believe there's a way to trigger this functionality from within an existing report, but you could create a "sacrificial" report to get what you're looking for - run through the wizard, generate the table, and copy / paste it into your original report. As long as your datasets are the same, it should work just fine...
Hope this helps.
I have a similar problem as the op and am new to SSRS/BIDS. And, I am updating a previously created report which (for me) is too complex to just quickly re-create using the "wizard generation" as the datasource is a web service (with code-generated web service parameters, lots of calc'd datasource fields, etc). It is faster to just copy the .rdl, delete all, and create the table manually.
I thought I would add that (only a little better than op's method, but nonetheless it is time-saving) you can just drag and drop to populate columns w/o the "right click > insert column > right". Just drag the dataset field to the place you want it in the table and BIDS/SSRS will automatically insert a new column. It also helps to drag the latter columns first (i.e. always inserting a previous column) so you don't have to scroll to the right all the time.
I was looking for the similar thing and I have figured this out. Open your report in Report Builder 3.0 which is a free BI tool by Microsoft. Go to Insert > Table wizzard. Then just follow the wizard steps to generate auto columns. Save and reopen the file in your visual studio, file will refresh itself.
Ved
#Kevin Fisher actually there is no need a workaround. There is way to do this out of the box of Report Builder 3. Open your existing favorite report template. on the tool bar, click on INSERT tab, look for TABLE icon, click on the down-ward arrow at the bottom of the TABLE icon, then choose TABLE WIZARD. Then I guess you know what to do from here. -hope this help.
I agree that there is no way to bring all of the columns over from the data set to a table easily. But I came up with a method that helped me:
Insert a blank table (this usually gives you 3 columns). Then insert columns to the right of the table (right click, Insert Column, To the Right), as many times as you need in order for it to equal the number of columns in your data set.
Once you have all the blank columns created in your table, click inside a table cell box and use the drop-down to select the field. This has the added benefit of allowing you to get the fields in the correct order, since I've noticed that the field names in the dataset don't always appear in the same order as the SQL stored proc output.