Subreports are not getting printed - jasper-reports

I tried to create a very simple report with a subreport. The subreport was created separately and was embedded in the data group. The subreport separately gives me the relevant data. and the other main report gives me the intended partial data. But the data intended in the place where the subreport has been embedded is not appearing. It is appearing as blank in the output. Can anybody advise ?

You are probably not sending the sub report the data/parameters it needs to be generated.

maybe there is no data to your query in the subreport?
by default in ireport, a report has no page when the query returns no records.
you could setup a NoDataMessage, i have outline the steps in my other question/post

Today I had faced the same situation using ireport 3.0.0 and Oracle JDBC.
The work around (kludge) was to set at query at the master report: select * from dual.
Yeah, I do realize that definetely is not the right way, but it help me out. Seems that the master (main) report was not open the data base connection, then the subreport that was configured to use the same connection was not finding anything!
Hope that it help someone else...

Related

Crystal report shows blank data

I have crystal report that was working before database upgrade. It is only one report that doesnt work. So I would not think of a driver issue.
I am able to test this report using CRs client tools, design and then preview. The preview does not bring any data. A single parameter is used and I am sure there is data because the data is retrieved if I create a new crystal report and also verified the SQL. (So there is no question about the no data or any missing links -- its a simple view).
This cannot be a driver issue as well, as all other old reports still work.
Have also tried deleting all the field's from the report, then add a single/simple new table and preview, still no data is showing.
Are there any logs inside crystal to investigate ? have tried ODBC.logs doesnt help as doesn't say what happens inside crystal reports after retrieving the data from database.
Thanks.
Zain
I've had this problem multiple times where my report comes up with empty fields. This may not be your cause, but what fixes it for me is to make sure that the dataset/table matches is referred to by the same name everyplace. In the xxxxxxDataset.xsd file, that table that's pictured should be the same name that's used in the function GetData() As System.Data.DataSet in your .NET object that uses the stored procedure to get the data. (You may call your function something other than GetData().) So try changing the ds.Tables(0).Tablename = "xxxxxxxTable" to match what the table in the xsd file is called.

Crystal Reports : This group section cannot be printed

I'm currently modifying an existing report and replacing the data source used in the report. The reason I'm not creating a new report is because the report is laid out exactly how I would like it to be laid out. I've updated every field with the new data source fields and checked that the formulas are all correctly formatted.
Everytime I attempt to view the report (I'm using the Crystal Reports tool in VS 2010), I get the error "The group section cannot be printed because its condition field is nonexistent or invalid. Format the section to choose another condition field."
I've read another question from stackoverflow but still can't seem to find out what is wrong with my report.
First of all, why doesn't Crystal tell you more specifically what is wrong?
Any suggestions or hints?
My first thought is that you didn't update the Groups correctly when you switched backends. Go into your Group Expert. Do you see any groups simply labeled with question marks? If so, there's your problem. Go into the options for that group and choose an appropriate grouping field.
Also, use the Database->Verify Database command to look for other possible errors.
As for your question about Crystal's design, I believe that it does give reasonably accurate error messages, especially considering everything that can go wrong with any one report.

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.

Use multiple datasource in one crystal report

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.

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.