Crystal Report || Unable to add Stored Procedure as Data Source in crystal rpeort - crystal-reports

I have an old Crystal report which has a data source with some other database. I have added a few more columns in the stored procedure and trying to update the data source with the new server address.
When I am updating the data source through Database Menu -> Set Data Source Location and selecting New server (from replacing section) then it is not updating instead the older one is getting deleted.
Also I tried Field Explorer -> Database Fields -> right click choose Database Expert -> Select Connections from My Connections Box -> Select the procedure -> Click on the > button to add to selected table
In the above steps, I am not to add a particular stored procedure which I have modified and added 3 new columns. When I am trying to select any other stored procedure then it is allowing me to add. I tried to execute the procedure in the database and it is running without any issues and producing data results as expected.

Related

Update fields in rpt from stored procedure

My .rpt file gets fields (field1, field2, ... ,fieldn) from a stored procedure.
I have since added 2 field to the stored procedure (field1_new, field2_new).
How can I update the old fields (field1->field1_new, field2->field2_new) in the .rpt file?
Here is a snippet of my project. As you can see in the Group #1 Name, "siteid" from GetCRFData stored procedure is used. I want to change that "siteid" with "siteid_new". I have already clicked "Verify database" and I can see "siteid_new" in Database fields.
Before and after #4444 proposition (I just changed site but everything is lost now):
Before
After
Open your .rpt in the Crystal Reports editor. Then go to Database -> Verify Database.
This will force the report to refresh and validate the stored procedure, as well as any other tables it might be using at any level. If you've only added new fields, and not removed or replaced any, this should be all you need to do.
If you have replaced or removed other fields, you might be prompted to manually map a suitable replacement field from the ones it can find.

OpenOffice Calc: Fill Dropdown from Database?

Is it possible to fill a dropdown list for a cell in OpenOffice Calc with entries from a database using a query?
I've found how to create the dropdown list using Data -> Validity and I created an .odb file to connect to by postgresql database using File -> New -> Database, but I can't find any input on what to do from that point on.
What I want is for example that when the Calc file is opened, the dropdown for the cell is populated by executing a select query against the database I created the .odb file for.

How to change new database name in crystal report

I had created crystal report by using x database and i updated it to some other database i.e y (In i had added Some New Columns) by(Verify database and SET DATA SOURCE LOCATION ). I am Getting the old data which was in x database
Please give me some help Regarding This
1>wright click on Set Database Location option..
2>After selecting ur existing Database in crystal report select new connection for Database.
3>select new Database and click on update.
4>similarly update ur existing procedures/tables with procedures/tables of new database.

How to create Cubes in SpagoBI?

I am new to SpagoBI.
I am using SpagoBI studio to connect with MYSQL server.
I can able to upload my Business models into SpagoBI server.
I want to create a cube i.e., fact table using the database tables (MySQL) which I have connected in my studio.
Please suggest some fruitful solutions to do.
There are some steps that you have to follow to create cube:-
Select file -> New -> Project -> create project under SpagoBI
Then , create report under Report Desgin.
Create data source , data set connection.
Click on Business model -> Create new model -> select connection (as per data source connection all the tables will be shown to you) -> then finish
5.then select table , Right click on table x and -> OLAP -> select Cube -> then finish.
x -> Expand Attribute -> Create measure
Write click on y table -> Create Dimension
On the Top , Business Model:- Right click -> Choose add relationship
Rename Business Relationship Name (if you want) -> select table in both side and column that you want to put relationship between them.
Right click on store -> click Edit Hierarchy -> then Add hierarchy -> then select as you want to add on hierarchy.

How do I point Crystal Reports at a new database

I have a Crystal Reports 2008 user that has over 100 custom developed reports.
The reports all query Sql Server databases (SQL 2005).
This database server is getting replaced with a new system (running SQL 2008 R2) and the existing databases will be moved to the new server.
The new database server will have a different name (which I can address via the Crystal Reports Connections),
however, one of the applications is also being upgraded at the same time. The old database (DB_A) will be restored on the new server for historical reporting and a new database (DB_B) will be created.
The new DB_B will have a very similar schema, so I would expect that most of the Crystal Reports should be able to run against the new DB_B with little or no modification other than pointing the report definition at the new DB_B.
Of course, the majority of my users custom developed reports query against DB_A.
My question is: How do I modify existing Crystal Reports files to point at the new database name (DB_B) instead of the old database (DB_A) ?
Use the Database menu and "Set Datasource Location" menu option to change the name or location of each table in a report.
This works for changing the location of a database, changing to a new database, and changing the location or name of an individual table being used in your report.
To change the datasource connection, go the Database menu and click Set Datasource Location.
Change the Datasource Connection:
From the Current Data Source list (the top box), click once on the datasource connection that you want to change.
In the Replace with list (the bottom box), click once on the new datasource connection.
Click Update.
Change Individual Tables:
From the Current Data Source list (the top box), expand the datasource connection that you want to change.
Find the table for which you want to update the location or name.
In the Replace with list (the bottom box), expand the new datasource connection.
Find the new table you want to update to point to.
Click Update.
Note that if the table name has changed, the old table name will still appear in the Field Explorer even though it is now using the new table. (You can confirm this be looking at the Table Name of the table's properties in Current Data Source in Set Datasource Location. Screenshot http://i.imgur.com/gzGYVTZ.png) It's possible to rename the old table name to the new name from the context menu in Database Expert -> Selected Tables.
Change Subreports:
Repeat each of the above steps for any subreports you might have embedded in your report.
Close the Set Datasource Location window.
Any Commands or SQL Expressions:
Go to the Database menu and click Database Expert.
If the report designer used "Add Command" to write custom SQL it will be shown in the Selected Tables box on the right.
Right click that command and choose "Edit Command".
Check if that SQL is specifying a specific database. If so you might need to change it.
Close the Database Expert window.
In the Field Explorer pane on the right, right click any SQL Expressions.
Check if the SQL Expressions are specifying a specific database. If so you might need to change it also.
Save and close your Formula Editor window when you're done editing.
And try running the report again.
The key is to change the datasource connection first, then any tables you need to update, then the other stuff. The connection won't automatically change the tables underneath. Those tables are like goslings that've imprinted on the first large goose-like animal they see. They'll continue to bypass all reason and logic and go to where they've always gone unless you specifically manually change them.
To make it more convenient, here's a tip: You can "Show SQL Query" in the Database menu, and you'll see table names qualified with the database (like "Sales"."dbo"."Customers") for any tables that go straight to a specific database. That might make the hunting easier if you have a lot of stuff going on. When I tackled this problem I had to change each and every table to point to the new table in the new database.
Choose Database | Set Datasource Location... Select the database node (yellow-ish cylinder) of the current connection, then select the database node of the desired connection (you may need to authenticate), then click Update.
You will need to do this for the 'Subreports' nodes as well.
FYI, you can also do individual tables by selecting each individually, then choosing Update.