how to use main report data set as table's dataset? - jasper-reports

I had generated a report using ireport Designer v5.1. For generating it i had used jrbeancollection data which is passed from java program .now i want to use this main data source as data set for ireport table.
could any one please help me to know how to do this.
thanking in advance...

Below steps help you to show JRBeanCollection data in the Jasper report.
Create the Java Bean data source using the report Data Source creation functionality which is the on top side of the iReport.
You can display the data coming from the Java Bean data source, in table format.
List item JR table
Normal table structure which is created by drag and drop from the fields.
JRTable -
Create subDataset from a Java Bean Data source you have created, It will return you the fields which you can use in the table.
From iReport palette window drag and drop the Table. It will open the window and ask you for the dataset. Provide the dataset you have created along with other necessary information.
Normal table on report -
Open main data source report query window, you will find multiple tabs
Select Java bean data source tab, provide the class name or data source you have created above. You can find below the window field name and data type.
The same field information you can find in the report inspector window below the Fields label in tree format.
Drag and drop which field you want to display in the report in the detail band or other custom band.

Related

Issue with repeating static text in Detail band

I am using iReport to make a jrxml file. When I create a file and click on "Launch report wizard" it load some sql query from my database, configured with iReport.
I write some static data and also use some image to make a sample pdf file. I write some string in title field and also in column and detail1. Title section show once but value of column header and detail1 repeat many times. My repeated data is equals to the number of data in my table which I load at creation time. How can I stop to repeat my data?
whatever you write in your detail1 it will repeated until your query ends

Can you update a data table, without losing your columns in your report in Crystal Reports?

I have a Crystal Report that contains numerous fields and functions that all reference one SQL Server data view. Recently, I've had to make a copy of the underlying SQL data view and make a few modifications. I need to use my new data view as my data source within my Crystal Report.
My problem is that I need to keep the original data view, without changing it's name, but I need my Crystal Report to reference the new data view.
Is there an easy way for me to update my report's data source without having to update all of my columns and formulas? Otherwise, I'm starting from scratch and might as well create a new report, which I'd prefer not to do.
Yes. I haven't used CR in a while, but I used to do that frequently. There's actually a built-in option to change your data source and remap any fields it can't find in the new data source.
Check out #1 of Todd Watson's answer:
How do I point Crystal Reports at a new database
Go to Field Explorer -> Right click on Database fields -> Go to Set Datasource location -> In lower section (Replace with) -> Go to My Connections -> Right click on New Dataset (go to Refresh).

Two SQL query inside single JasperReport

We are generating reports based on iReports and JasperReports for web application.
Using iReports I found I am struck with big problem.
I want to use two SQL query to fill up my main report...
In query designer I can only write one query..
For another query I cannot use sub-reports...
How do I write second query which will return different fields and include them in my report..
Please guide...
I cannot use sub-reports...
Yes, adding a table to your report is as easy as adding a field. Just drag it from the palette and drop it in the report where you need to have it.
Add a new Table data source. I assume this was done.
Once the data source is configured, you could design your table UI using the wizard.
just click on next or finish to close the wizard.
To add a parameter in data set (if needed), Navigate to your data set using the report inspector. Expand your data set. You would find the parameters menu. Right click to add the new parameter.
Now right click on your table and select edit table data source. Here you will find options to pass parameters to your table from the main report. Passing parameters to your table should be as simple as you do in sub reports. Select the parameter just created from the drop down list box and pass the required value.
In the Data set run Dialog box that appears, please make sure of the data set and the report connection you are using.
You are done configuring the table with this, next you will place the fields in the cells of table for displaying the data.
You are getting your document has no pages since the main report query does not return any rows i guess. For your table to be executed your main report must return at least a row
Hope this helps you.
Good Luck!!
As far as Ireports are concerned, the main report can comprise only one query. And if you wanna use multiple queries in your report, it is possible in the following ways.
Sub Report
Table Dataset.
sub Dataset.
since you don wish to use a sub report, you can go for a Table Dataset. Anything you would do with a sub report is possible with table dataset too(Except for returning variables). You can use sub datasets with charts and graphs. Table set will be of use to you i hope.

Crystal Reports - Change DataSource name

We are using a 3rd party HR Tool (NuView) and are creating custom reports in Crystal. The source data is a csv file. In order for NuView to process the Crystal Report it REQUIRES that the:
csv file name
datasource name in Crystal
the report name
be the same.
For example, if it was a report on ADDRESSES - Address.csv, Address#csv.fieldname, Address.rpt
Here's our dilemma - we are creating some complex reports and want to REUSE them. So, we want to take an existing CR report and copy it and then * CHANGE THE DATASOURCE * name - and we can not figure out how to to this?!?
We can change the source file (e.g., Address.csv) and the report name - but for some reason can not figure out how (or if it is possible) to change the Address#csv (which I'm calling the datasource name.
Just trying to save our dev staff some time from having to re-create very similar reports from scratch. We are using MS ACCESS/Jet to read the csv file (per NuView)
Any help is greatly appreciated.
From the Database Expert you can simply right click on it in the right hand pane selected tables and choose rename. Is that what you're looking for?

In SSRS 2008, is there any way to add all dataset fields to a table at once?

I'm working with SSRS for the first time. When adding a table to a report, is there any way to add all fields of a dataset to it at once or does it have to be done individually? Drag & drop, insert column -> right is a pain when there are a lot of fields that are being displayed.
It's a bit of a workaround, but the "Add new report" wizard automatically creates a table with the specified columns and groups from your given dataset. I don't believe there's a way to trigger this functionality from within an existing report, but you could create a "sacrificial" report to get what you're looking for - run through the wizard, generate the table, and copy / paste it into your original report. As long as your datasets are the same, it should work just fine...
Hope this helps.
I have a similar problem as the op and am new to SSRS/BIDS. And, I am updating a previously created report which (for me) is too complex to just quickly re-create using the "wizard generation" as the datasource is a web service (with code-generated web service parameters, lots of calc'd datasource fields, etc). It is faster to just copy the .rdl, delete all, and create the table manually.
I thought I would add that (only a little better than op's method, but nonetheless it is time-saving) you can just drag and drop to populate columns w/o the "right click > insert column > right". Just drag the dataset field to the place you want it in the table and BIDS/SSRS will automatically insert a new column. It also helps to drag the latter columns first (i.e. always inserting a previous column) so you don't have to scroll to the right all the time.
I was looking for the similar thing and I have figured this out. Open your report in Report Builder 3.0 which is a free BI tool by Microsoft. Go to Insert > Table wizzard. Then just follow the wizard steps to generate auto columns. Save and reopen the file in your visual studio, file will refresh itself.
Ved
#Kevin Fisher actually there is no need a workaround. There is way to do this out of the box of Report Builder 3. Open your existing favorite report template. on the tool bar, click on INSERT tab, look for TABLE icon, click on the down-ward arrow at the bottom of the TABLE icon, then choose TABLE WIZARD. Then I guess you know what to do from here. -hope this help.
I agree that there is no way to bring all of the columns over from the data set to a table easily. But I came up with a method that helped me:
Insert a blank table (this usually gives you 3 columns). Then insert columns to the right of the table (right click, Insert Column, To the Right), as many times as you need in order for it to equal the number of columns in your data set.
Once you have all the blank columns created in your table, click inside a table cell box and use the drop-down to select the field. This has the added benefit of allowing you to get the fields in the correct order, since I've noticed that the field names in the dataset don't always appear in the same order as the SQL stored proc output.