Can I print the data source name on Jasper Report using Jasper Studio's? - jasper-reports

I am using TIBCO JasperSoft Studio to create my jasper report. I will pass different data sources to the same report. I tried to use $P{REPORT_DATA_SOURCE} but only get something like "net.sf.jasperreports.engine.fill.SortedDataSource#...". Can I print the data source name on Jasper Report using Jasper Studio's parameters / fields / variables expression ?
My Data Source is "SUNNYSZ" as shown
And My Report Layout is
And My result is
My Question is how can I print my real data source name "SUNNYSZ" ???

Related

Reports in Jasper have no results when export in XLSX

I have a JRXML with an SQL query inside the template. If I try to generate report (from java and Tibco Jasper Report) the preview and the pdf show me the correct data. The Excel version instead show me only the tables, without any rows (that I see in the preview). Alle the tables are designed with jr:table.
Anyone know why this happens?
Thanks
Luigi
Solved!
The issue was a tiny text field (most probably a type during cut and paste inside the jasper report tool) overlapped on the jr:table.
Removed this, the report is correctly rendered also on xlsx.

Openerp using subreport by Jasper Report

I want to create a sale order report with Jasper Report. So, I took xml of sale_order object by Jasper's data template of openerp and I set depth 3 in that xml file. And then, I created report by using Jasper Report. After that, I added this report by using new Jasper Report of openerp. My report has a dataset in the main report for sale_order_lines. So that, I have an error below:
openerp.netsvc: Report Error Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: Error evaluating expression : Source text : $P{REPORT_DATA_SOURCE}.subDataSource("//sub_report")
How to fix this error? If you don't mind, please explain me step by step.

Create Report using Crystal Report XI from DataSet

*STEP 1.*My program get Crystal Report (XI sp6) templates from admin. It parses the templates to get SQLs from that and then populate it to get DataTables for each SQL.
*STEP 2.*After that, it push the DataTables back into the ReportDocument to create the report by using the following code:
// there no subreport in our template
//mainDS include all populated DataTable having the same name of related CR Command Alias
foreach (Table tab in doc.Database.Tables)
tab.SetDataSource(mainDS.Tables[tab.Name]);
The problem is (I wonder if it is a Crystal Report Bug): if there is 2 Command in the template, when the code tab.SetDataSource(mainDS.Tables[tab.Name]); is executed for doc.Database.Tables[0] then doc.Database.Tables[1].Fields is become the same to doc.Database.Tables[0].Fields and ofcause I get an error.
I do not get this error with all templates, just some :(. All templates worked well in Crystal Report GUI!!!
Please help if it not bug or please show me how to work around!
I am using Crystal Report XI Developer Edition with latest pack, VS2005. Oracle 10g, Devart DotConnect for Oracle Free version.
After mining SAP document and test many times, I think that it is a bug of CR XI R2 sp6. So I on report I only keep 1 Command, If there is a need for other commands, I will create subreports and put the commands in these.

Open Crystal Report with a parameter

Normally, I use Microsoft report and I can call parameter.
But for Crystal Report 2008 I want to call the report with a parameter to see the data from my bd on the report.
My report is bound to a data set.
Hope the following links will help you
How to pass parameter in crystal report using dataset in vb.net
Crystal Report Basics and Integration with DataSet
Display GridView in Crystal Report

JasperReports: reports XLSX export worsksheet names

I have a JR report being run from JR Server that I am exporting to Excel. It's 7 subreports that each get their own worksheet. If I export to XSL then the worksheet names I've created by setting the net.sf.jasperreports.export.xls.sheet.name property works correctly. If I export to XLSX format, which is about 1/3rd the size of XLS, the page names come out as page1, page2, etc.
Is there a way to format the worksheet names for XLSX output the same way there is for XLS?
I'm using iReport and JasperReports Server for creation and generation of the reports.