How to Import or copy the input controls from 1 topic to another? - ireport

I created a topic using ireport, there are over 10 parameter inputs to the topic. In-order to properly work the parameters we have to create all input controls manually, similar input controls are available in another topic, I was thinking coping the input controls from the old report to new, seems like there is no copy option available in ireport 4.1.1.
Is there a better way to import or copy the input controls from 1 topic to another?

Open your report from which you want to copy parameters.
Go to Window --> Report Inspector
This will open a new tab Report Inspector , from there in Parameter section all the parameters will be listed right click on the parameters which you want to copy(you can also select multiple) and open other report in which you want to copy and paste it in Parameter section.

Related

How do I create a report with edit for every row in oracle APEX?

everyone. I am working on a Oracle APEX application. I want to create a report with edit for every row. I followed that video https://www.youtube.com/watch?v=OqqcO1JKDdM but when I created the report strangely the "Edit-pencil" button opens a create form instead an edit. Does anyone have a clue what should I do to get the edit functionality? Thanks.
I looked many videos on youtube, but when I create a report like this: Create Page -> Report -> Report with Form -> and so on, I encounter the same problem - create form instead edit form.
... strangely the "Edit-pencil" button opens a create form instead an edit.
That's the same form (you use to create a new row and edit existing one). The only difference is the link you use; for editing, you have to go to IR's attributes and set which value you'll pass to the form (that would be the primary key, most probably).

Export data from a list view using a button

I am building a simple admin-on-rest application. One of the features is the user to export the content from a list view. So far I have two possible approaches in mind.
Export based on the selected filters (my favorite).
Export based on the selected rows from the table using check boxes.
I guess two things are necessary to achieve that:
Be able to render a button somewhere in "list view": would be great to add an "export" button inside the "filters" section. I couldn't find a way to render an "export" button keeping the filters.
That "export" button would be able to get the filters (from the list view filter section) for creating my custom URL for downloading the data. Or if using check boxes, detect the selected rows from the table and export that data.
I have been looking for examples or following other colleagues questions and I coundn't come up with anything similar. Any info/example/project will be much appreciated.
This is quite solvable. The filter is stored in the redux form and can be accessed by any connected component. I am guessing you have an API endpoint available that you can ping with the filter data and that can then generate the file and respond with the file URL.
1) Write a connected button component. This should have a mapStateToProps method to access the current filter data
https://marmelab.com/admin-on-rest/List.html#actions
2) It should also dispatch an action that generates a POST request.
https://marmelab.com/admin-on-rest/Actions.html#using-a-custom-action-creator
IMPORTANTLY: You will have to think about how the file itself will get downloaded. Since you are generating the URL on the fly, it will not be embedded in the model data so you do not have access to it. You might have to hard code a file name and path into your components so clicking will always lead to a download. Though this is not as trivial as it sounds, as the file generation itself will be an async operation. I think clicking this button should lead to a redirect to a page where the download link is displayed.
Just to complement krunal's answer, there's a library called FileSaver that can take a json response and start a file save operation with its content, showing a file save dialog, or even download it directly to a file of your choice.

Export Dropdown Selection in Kendo Editor to Word Document

I've been trying to get a selected dropdown option to appear in a Word Document on export.
The current default behavior is that all option tags appear in the exported document with no indication of which was selected. (This makes sense that this behavior would occur since the export function is simply exporting all the html as plain text).
So far, these are the approaches I've tried (none of which work):
-Capture the export event before it is sent to the controller via the javascript execute event (thus being able to strip out any unwanted text). The issue is the execute event and exportas event are asynchronous, so I can't modify the file before the export event call is executed.
-Modify the text on the controller side before it is converted to a Word document and downloaded (the text is sent through without special characters, which makes it nearly impossible to parse)
-Attempt to replace the dropdown with a kendo autocomplete widget (this would also be an acceptable solution). The widget does not render properly inside the document. All of the datasource options are there and even filters corretly, but it does not style correctly or open.
Has anyone else been able to find a solution to this problem or have another approach I could use?
EDIT:
As per requested, here is a screenshot of the base code:
My initial idea on how you could accomplish this:
1. Pull that select list out of your editor.
2. Bind an event handler to the change event of your list to add the value of your list into the editor. Are you using JQuery in your project? It's a dependency for Kendo so this ought to work:
$("#selectListId").on("change", function () {
$("#editor").val( $("#selectListId").val());
});
In reality though I'm guessing this approach will be used to populate some template of text with values selected by the user? In that case, you may want to save the template first before applying the value selected.
Now that you've identified you need that dropdown menu to be usable on the exported word document, attempt the following:
Create a new word document.
In that word document, open the Developer tab. (If you don't know about it, google how to enable it)
Insert a new Dropdown Menu Content Control using the Developer tab.
Select this content control, then open Properties menu item on Developer tab.
Update the content control with your values:
Save this word document.
Use the Kendo Editor Import to import this document containing your template.
Attempt exporting what was just imported.
If that works and the editor has editable dropdowns from that content control, I will be very surprised... Good luck!

How can I set up dropdown lists used to provide Stored Procedure parameters to SSRS reports to accept multiple values?

I need to allow the user to select 1..N of a particular parameter when generating an SSRS report. According to this otherwise very helpful blog post, that's possible, but its instructions in Step 5 to "Set the Properties of both parameters" has me clawing my noggin.
What two ("both") parameters? In the Preview tab I see the dropdown list, but right-clicking doesn't afford any contextual menu items. The other ("Design") tab shows no dropdown list, of course.
So from where is the "Allow multiple values" checkbox Step 5 mentions accessible?
You get to the parameter properties in Design mode (design tab), not preview mode. Double-click on any parameter under the parameters folder in the Report Data pane. (If the Report Data pane is not visible, Ctrl-Alt-D will show it) There, under General, is where you set the Allow multiple values option.

RDLC - Adding a Data Source in VS2010

Greetings.
I have an RDLC file and am wanting to add a data source to it, although without any luck so far. The data source is a custom class written by myself (just to add, we do this all the time). We recently converted over to the VS2010 RDLC format which caused some problems, but we've made some changes to our implementation that workaround the more major issues.
So, back to the issue at hand, when I attempt to add my data source to the DummyDataSource list in the RDLC view in VS2010 it just does nothing, however it does add the data source to the list of data sources, but you can't select it from the drop-down list in the RDLC view which means I can't add the data source at all.
Has anyone come across this problem? Is there anything I need to check? I've searched with fervour and had no luck.
There seems to be a bit of black magic going on here. Or at least I haven't figured out all of the incantation to make this happen reliably.
I think I was having a similar problem. Not sure if this will help you, but here's how I got around it.
In the VS2010 report designer, use view->Report Data to show the Report Data pane.
Click the New button and choose Dataset... to get the Dataset Properties dialog.
Name your Dataset, if you've done this before, you probably know that the dataset name here needs to match the name provided in code when you bind your ReportDataSource.
The new part that I just tried, is to click the New... button next to the Data source drop down list. The resulting wizard walks you through selecting your assembly and CLR class (use the checkbox to select your class).
When the wizard finished, my new dataset appeared.
One thing to note: The first time I tried to reproduce this, the wizard completed without adding my dataset. I went back to my class definition and decorated it with [DataContract] and [DataMember] attributes and then re-ran the wizard and it seemed to work great.
Perhaps someone with deeper knowledge can comment on why those attributes make this work, or why the wizard fails silently without them.
Your data source object must include a native data type as a property on the class, otherwise it doesn't let you add it. Funny, eh!
I could not add the datasource, after following the wizard (new button) the data source did not appear in the drop downlist.
What I did was add a property with a primitive type VS class and then proceeded to show the correct data source.
Strange to have to do this, but I found another way.
If you are using a stored procedure, replace everything inside the procedure with one row select using no source tables/functions. I couldn't get it working with a stored procedure that returned data from temp table or normal table either.
I have seen this happen when your final select in a Stored Procedure pulls from a temp/memory table. You have to fake the designer out by adding a dummy select 0 AS mycol1int, '' AS mycol2string, etc. Once you have created the Dataset, you can then remove that dummy select. Another marvelous, fabulous feature in VS! They own the DB, they own the IDE, but...
If added data source object is not shown on ReportData then:
1. Right click on rdlc and click open with
2. Select xml editor
3. add your needed dataset by hand.
After this refresh ReportData and you will see the datasource object on the list.

Resources