Use multiple datasource in one crystal report - crystal-reports

I am using crystal reports 2008, I want to use multiple data sources in one report. One is connecting informix and another is connecting redbrick data source. Both are independent data source and doesnt have any common value to co -relate them. Can we have that option?
Pleae advice?

Have you tried it already? Crystal Reports allows you to add tables, via Database Expert, from multiple datasources. It will warn you that it may not work, but many times it does.

I had the same problem.
But now its OK after using subreport.
ie. Create the subreport with just the details section and put in inside the main report.
According to my colleague,
For "independent data sources", that have no relationship at all,
we should use subreport.

Related

Crystal Reports: export datasource with report definition

I am stepping into a new reporting environment and I don't have a lot of background info yet. But my company utilizes a series of crystal reports.
I want to compare two reports that are identical except that they connect to different data sources. I can click on both reports in the Crystal Reports viewer, go to Database > Set Database Location and I am able to see the data source. If I do this for both reports in question, I can see that they both connect to different data sources, as expected.
However, when I export the two Crystal Reports as text files and then compare them using Notepad++, I don't see the datasource / connection string in the report files, so when I do a compare, they are exactly the same.
If the exported text files are exactly the same, how does Crystal Reports Viewer know to point one report towards a prod data source and another report towards the dev data source? It does not appear to be embedded in the exported metadata / report definition file.
Thank you!!
The connection info is simply not part of the exported report definition text.
But, obviously, it is part of the report definition.
If you need to export more detailed report definition information, including connection properties, consider getting a documentation utility. Ken Hamady maintains a list of those here.

Best approach with Jasper Report

I have a requirement to generate reports in PDF and Excel format. For the same I have chosen Jasper. Now require some help from your side to identify the best approach on the same.
Note - My queries are dynamic in nature.Like in some scenario then will provide name in some scenario they will provide dates not name and in some scenario both.
Approaches I have identified are given below.
We can create data source and query in JRXML and execute the same.But not sure query will be dynamic or not. I am personally not prefer this approach because from java I can pass the connection from pool.
We can pass the query and connection both from the Java side and then Japser will execute the query.
We can query in java and then pass the List of bean to the Jasper for report creation.
Now need some suggestions on the best approach among above and also of any approach suggested apart from the above.
To me, option 3 is best. I did that previously.
For mine, I had a master report containing conditional sub-reports. To do that, I have build sub-report's .jasper from their .jrxml and passed my List of bean so that I don't have to re/compile the .jasper from .jrxml again(My master report was in .jrxml and condition for sub-reports where set there).
Another advantage is, you don't have to change your jasper files if you want to change your logic in query level-just leave them untouched once done.
So, I think , option 3 is good to go.

SSRS 2008 - Expand and Collapse subreports

I am dealing learning SSRS 2008. I want to do a report that is a little bit more complex.
I would like to have a row with information about "Object": name, id, description, etc. And I would like to have a + sign in this row, so I can expand/collapse rows that are regarding "Comments" about that object, with columns like "comment", "date", etc.
I first tried the "Grouping" approach, but I got to a dead end because the groups would use the same header.
Now I am trying to tackle it with a subreport.
The first problem I had is that I couldn't find the query designer in VS2008, so I started the SQL Reporter Builder.
Is there any way to use the Query Designer inside VS2008?
Then I created my report and my subreport as different report files, because I thought I would be able to use the subreport properties to select the subreport file and add it, but I was wrong. How can I add it? Do I have to publish it?
I just found out that I can't use the rdl file from SQL Report Builder in Visual Studio (it doesn't recognize the file extension, in VS2008 it is rdlc).
I am basically lost.
Could someone give me some guidance?
Thanks,
Oscar
This was asked a while ago but you haven't closed the question so I assume you still need an answer.... Are you looking to add the drill down feature to your report?
http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/creating-a-basic-drilldown-report-in-ssr-2005
http://www.sqlservercurry.com/2009/08/creating-drill-down-report-with-sql.html
If not... I am confused at what you are looking for and if what you want is really intended to be done in SSRS.
And... are you using subreports because the Object information and the Comment information is on different servers or data sources? Because it seems like you would want to use grouping for this, and group by the objectID and have the comments below.

Crystal Reports: Using Business Objects xi Datasource

I'm a total Crystal Reports/Business Objects newbie...
I've been tasked with going through 100 or so Crystal Reports to determine which reports are using an 'embedded' connection string vs. one supplied by the BOXi server.
I've installed Crystal Reports and accessed a sampling of the reports, but haven't been able to locate any references to a Repository based connection string/datasource.
Can anyone point me towards where this configuration is managed?
Thanks!
Richard
I don't know if you've already tried this or even if it's too basic for you, but it's been 24 hours, so here's my 2 cents:
To see the data source of each report, open them up and go to the Database at menu at top. There, you'll want to browse through the "Database Expert", "Set Datasource Location", and "Show SQL Query" options. Look at the properties of each data source.
You may also want to make a practice report pulling data from your sources of interest. That can help you get used to CR.
when you deploy the report to BO, you use the CMC (central management console) to set the database connection information. it is here that you will find the answer to your connection-string question.

Replace a database connection for report and all subreports

Is there is any way to change the datasource location for a report and all of it's subreports without having to open each of them manually?
Here is how I set my connections at runtime. I get the connection info from a config location.
#'SET REPORT CONNECTION INFO
For i = 0 To rsource.ReportDocument.DataSourceConnections.Count - 1
rsource.ReportDocument.DataSourceConnections(i).SetConnection(crystalServer, crystalDB, crystalUser, crystalPassword)
Next
For i = 0 To rsource.ReportDocument.Subreports.Count - 1
For x = 0 To rsource.ReportDocument.Subreports(i).DataSourceConnections.Count - 1
rsource.ReportDocument.OpenSubreport(rsource.ReportDocument.Subreports(i).Name).DataSourceConnections(x).SetConnection(crystalServer, crystalDB, crystalUser, crystalPassword)
Next
Next
If you are just doing this as a one-shot deal, my suggestion might not help. But, if you change data sources frequently, it might be useful.
Disclaimer: I haven't worked with Crystal since version 9.0, so I don't know if they have improved on this. I always used UDL files. Basically, it is a pointer to a data source. Set up your report to point to the UDL, and the UDL points to the data source. If the source changes, just update the UDL.
This is incredibly useful if you have multiple reports. You only have to update one file when the server changes.
Linked sub-reports (at least in CR XI) share the main report's datasource - presumably your report is already configured so that's not an option for you?
#Unsliced I think the problem he is getting at is when you take a crystal report someone developed against another database, and you bring it up in Crystal Reports XI, you have to do a Change Datasource for each field, including those in subreports. If you just change source on the top level of the report, it often errors. (I think that is a known issue in Crystal Reports).
I'm guessing you're talking about .rdl files from Reporting Services? (If not, my answer might be wrong)
They're basically just XML, so you could load each one of them in and do an XPath query to get the node that contains the datasource and update it.