In Eclipse, I try to create entity classes based on an existing database schema.
The wizard works until the end and creates the appropriate classes.
Except for one thing. Some classes are not being found by code as they're not generated.
In the "Customize individual entities" dialog, all the tables show up. Some of them don't have any columns being displayed in this dialog.
What works:
I can create relationships, even to these "missing" columns
I see these tables in Eclipses "Data Source Explorer"
The exact same columns don't appear in the JPA conversion dialog. The table has no arrow to further expand the item in the GUI.
I've already created a new workspace - without the success I'm looking for.
Why?
I'm using Microsoft SQL Server with the original sqljdbc4.jar
Although I have no idea why it happens, I finally know how to fix it:
In the Data Source Explorer, just expand the nodes in the tree until you see all the tables and their respective columns.
Somehow, they don't get loaded in the wizard. But they seem to do when opened in the data source explorer.
Afterwards, they also show up in the wizard.
Disconnecting and reconnecting using the Data Source Explorer fixed it for us.
Related
I have changed the location of several datasets in bigquery. The final names have not been changed after the operation.
I can query them in the bigquery UI but data studio is raising an error (BigQuery error: Not found: Dataset xxx:yyy)
It seems that data studio is not changing the processing location.
Is there a fix or solution for this?
Here is how I solved this bug without breaking my dashboards.
Click on "Resource" -> "Manage added data sources";
Find the data source that you need to reconnect and "Edit" it;
Click on "Edit Connection" on top-left;
Click on "Custom Query" and use this template: SELECT * FROM `{project}.{dataset}.{table}`
Click on "Reconnect";
By doing this, you can preserve all your fields & tables.
After that, you can use it just like that or move back to selecting the dataset and table and reconnect again.
I've seen this and "Reconnect" does not work. The fix is to Copy the report, then it will work. Rename the old report with a (Do Not Use) suffix, then remove "Copy of" from your new report name.
You will need to reset the Share permissions to the same as the old report. Of course any links to the old report need to change too.
When I try to use the New Database Diagram tool in SSMS, it appears to use old cached table data. Columns and keys that I have dropped from tables somehow continue to appear in the diagram. When I select the tables for the diagram, I hit the Refresh button, but the problem still occurs.
I have checked [INFORMATION_SCHEMA].[COLUMNS] and the dropped columns are not there anymore. I have refreshed the Object Explorer as well, by right clicking the database and selecting "Refresh".
How can I force the tool to clear its cache? Or is something else happening?
I just had to restart the application.
I created a database on access and added the data source to my visual studio vb project. However, I have recently added some new fields and tables on my database, how do I update it on my visual basic project without having to delete it and add it as a new data source which caused problems to my programs integrity ?
You can re-run the wizard and update the DataSet schema from the Data Sources window. I'm not in a position to test right now but, if memory serves, you can right-click the specific Data Source and select the appropriate item from the menu. If not, it would be a button on the toolbar in that window.
I don't think you need to change the data source, as the data source just refers to the database which has not changed. Ideally, the changes within the database should have reflected in the appropriate DataSet or DataCoulmn in your code. Can you post the code here, so that we can understand exactly what is going wrong?
I've got an .rpt file that I did not write and can find no documentation about. I want to be able to review the SQL that is generated from this report so that I can figure out, well, what data it was pulling and what WHERE clause parameters were used.
I can open it up and see the report layout. But when I select Database|Show SQL Query... the report tries to connect to the data source. The problem is, the data source being used is unknown to me, probably an ODBC connection used by whoever wrote the query. All I can do at that stage is 'Cancel' and I'm back to looking at the report designer.
Am I missing something? Can I get to the SQL query without connecting to the datasource? It seems like viewing the selection criteria shouldn't be dependent on a data connection.
Thanks.
version: Crystal Reports 2008
I know that this is an old thread, but I encountered this same problem. Effectively we used to have a database/application that has since been aquired by an external agency.
Although they now have the database/application they don't have access to crystal reports, so we can't just send them the old report that we used to run. Likewise we can't run it as we don't even have the database set up anywhere.... So instead our plan was just to extract the SQL code generated by the report and forward that on.
We experienced the same problem, but the solution is actually pretty simple.
If you don't have access to the original data source, just create a new 'blank' datasource (such as an ODBC connection). As long as the connection to the datasource works (i.e. it is some kind of valid datasource this it works fine). When running the 'Show SQL' option point the report to this datasource. As long as you don't try to actually run the report (and only show the SQL) the operation wont fail. This worked for our situation anyway. (Crystal Reports 2008)
(I can give more details if it helps in any way.)
It should be possible to find out some details about the existing datasource, by selecting Database > Set Datasource Location... .
As well as enabling you to change the datasource location, this should show you some information about the current datasource, such as which type of datasource is being used, and possibly (dependant on the type of driver) the name of the database. It is likely to be less helpful if (as you surmise) the datasource is ODBC, but if it uses a native driver there may be something useful.
Without the password, I'm not sure how much you can do. It seems "Show SQL Query" requires to report to run first, then generate the SQL plan.
It's not ideal, but you could go to Database > Visual Linking Expert to at least see the tables and how they are joined, and the go to the Record Selection Formula Editor and see what the custom WHERE statements are.
Viewing the SQL of a Command in a Crystal Report File
There are times you have just the report file, but not the associated database structure that the report uses.
This is common when dealing with example reports of functionality you wish to mimic.
This is a workaround ONLY to allow you to see the SQL of a Command that a Crystal Report is based on, when you don't have the underlying database connection that the report is based on.
In essence, the dialog box has to be satisfied before it will show the SQL, so we fool it with a legitimate Data Source, just not one that would work with the SQL that is actually in the SQL Command.
Why does a report use a command? Doesn't Crystal Reports have the ability to link tables?
When a Crystal Report is based on a record set that is too complex for the table linking functionality within Crystal Reports, the report can instead be based on a SQL Query, usually developed/tested in another editor tool and pasted into the command. This allows advanced SQL functions to be utilized.
If you don't already have a Data Source on your computer set up that you can connect to, you will need to build one first.
A simple Microsoft Access .mdb file saved in a simple location will suffice.
I placed mine with the path C:\A_test\test.mdb to make it easy to find.
If you don't have one, google for a sample mdb file and download it, saving it with a name and location you can remember. (You won't ever actually open this file, but just connect to it.)
Once you have the file saved, open the ODBC Administrator and create a New Data Source.
(you can get to the ODBC Administrator quickly from Start > type ODBC in the Search)
On the User DSN tab, click the Add button.
Scroll down the driver list to Microsoft Access Driver (*.mdb), select it and click the Finish button.
In the Data Source Name box, type a name (I used MyTest).
Click the Select Button and select the mdb file you saved from a previous step, click OK.
Click OK again. You will see your new Data Source listed by the name you gave it. Click OK.
You now have the data source you will need for the next steps.
Open the Crystal Report you want to see the SQL command for, and click on Database Expert button or Database>Database Expert Menu.
Under Selected Tables, right click on the Command and choose View Command
The Data Source Selection Box appears. Select the Data Source you created (or one you already use) and click the Finish button. The View Command box should open with the SQL in the left pane. Copy the SQL into your favorite text editor.
Whats happening is that the crystal reports needs a database to connect to regardless if its the original source DB or not.
Create a local database or use a database stored on a server, added it to your ODBC Datasources and use it when connecting. After a successful connection you should be able to view the SQL query without an error.
I've inherited a project (without a handy handover) that contains reports published to a Reporting Server (2005).
MY SSRS knowledge is 4 years stale, so I need your help.
I need to edit one of the published reports, is this possible?
I also want to peek into the Data Source on the RS, because that's probably where I can change stuff.
I'll add more info as I get a better understanding of what exactly to ask.
EDIT: I found a project for some of the reports, opened up in VS2005 BI.
Still, how do I see where the Data Source gets its data?
It brings back 56 fields but I don't know which tables/stored procs/queries are used to get these.
Yes you can.
1st - to edit the published reports: Browse to the folder containing the report source you want on report server (web server). On the right side click 'Show Details'. Now click the properties icon under the 'Edit' column. Near the bottom you will see two links: Edit & Update. Click edit and the source RDL file will start to download. This is the actual report source.
You can import this right into a VS2005 report project and have full access for modifications.
2nd - As to the project you found: After opening an RDL file for editing, click the 'Data' tab. directly under that you will see a drop down list labeled 'Dataset:'. A report can have one or more datasets. These are the actual queries that generate report data. Also clicking '...' will allow you to see other properties of each dataset, such as parameters, etc.
You can run a profiler on your server, then run your report. The profiler give you most info about your query or stored procedure.