Can I Only Export the visible items in a DevExpress Grid - asp.net

We have data using DevExpress Grid on a web application, and the users are asking to only export the visible data from the page. At the moment, if we do an export, it exports everything from the grid, whether it is shown on the current page, or on a future page (200 items, 20 pages, showing only page 4, we export everything).
We are using the WritePdfToResponse (if its a PDF file as an example) and tried using the PdfExportOptions PageRange, but it seems to only work for Pages of the PDF file, not the data... For example, if there are 200 items to display, on the site it shows as 20 pages, but in PDF, it shows up as 4 or 5 pages. If we want only page 4, we get page 4 of the PDF, not of the site... Can this be done? Ideally, for PDF, CVS, RTF and XSL...

The grid exporter exports the entire data from the ASPxGridView control. However, if you temporarily bind the grid to a visible page only, and then export it, you will get the same result.
For example, you can get the grid's page index to determine what user sees on the screen and that fetch these records from the datasource.

I assume that you can select required range of rows and set the ExportedRowType property of the ASPxGridViewExporter to Selected.
Please also review the following help topics:
- Export Overview
- Selection

Related

How can i use a common header in Cognos among many report pages?

I have a Cognos report and i have created 3 pages and 1 common prompt page. According to a radio selection in the prompt page i show the appropriate among these 3 pages.
In each page i have a block that is the header and there i just show title, current date and the selected values of the prompt controls (parameter values).
This header is the same among all pages and i want to find a way to create only 1 header section and then assign it on the top of each page. So if later i want to change anything in the header i will do it in one place.
Any ideas?
Re-using parts of a report (either from the report or other report in Cognos Connection) can be achieved with the help of layout component refenrences which are inserted into your report page and which refer to other existing components.
To use them proceed as follows:
Indentify the layout component(s) to be re-used (e.g. a table or a text or more or less anything less).
In the property list of that component go to the name and give it a unique name.
In the report page that is supposed to re-use the component drag an instance of the layout component reference to the appropriate location in the page.
Specify the target of the reference by choosing the report and within the report the named component (same name as given above).
Example
A block component (which could be incorporated into a header) is to be re-used. Give the block a name, e.g. my_block:
From the toolbox drag the layout component reference
to the report page. A dialog box opens which permits choosing the target component:

How can i limit one group per page in Cognos?

I have a block with a list with 5 columns and i have grouped it on the first column. I have added sum aggregation below each group.
How can i limit results to show one group per page?
You can achieve this by using a Page Set as follows:
Go to the Report Pages in the Page Explorer
Drag a Page Set from the toolbox into Report Pages
Drag your current report page into the Detail Pages folder of the new Page Set
Click on the new Page Set
In the properties of the Page set:
Select the query of your report page
Click on Grouping and Sorting (a small dialog box appears)
From the data items on the left drag the grouping criterion into the Group folder on the right.
Close dialog.
Run the report.
The following figure shows the Report Pages windows after successful configuration.

The page size was not large enough to format the contents of an object in the report

I'm trying to generate a report using Crystal Reports which contains data of two tables. So I tried to add another header page and put each table in a sub-report for each header page. This works very nicely when I have a single page in my report. It works here:
But when I had many lines of data( table 1) ( more than 10 lines ), I got this error:
Page header or footer longer than a page.
Got to your main report
Right-click on the subreport you added
Click Format sub-report
Uncheck the Can Grow option
Right Click on Details in crystal report
Detail ->Paging
Control Number of Rows

how to display image in a grid view or data list?

I've uploaded some data and images into the database. I want to retrive them by search button and show the searched values in DataList.
database
anil image
anil k image
kishore image
And the WebPage looks like this:
textbox[search button]
If Users enters anil in the search box the correspondent name and image should be displayed in DataList.
How can I get the data from database and build a DataList from it using asp.net and sql?
If you had a link to click that would open a new window to show the image, you could just return the image directly by changing the page response to stream the image bytes (and change the content type of the response appropriately). Since you need to display the image within the grid, the only way I can think of doing this (since you can't change the response of the request) is to request all of the files, save it temporarily on the server, and set an image link to the downloaded file.
this is webforms 101. there are numerous examples online. the "advanced" part is displaying images from a database. but again there are a number of examples on the web about displaying images stored in a database.

Getting grid view on button click event

Hello on page load we get two buttons while clicking on 1st button one grid view and while clicking on 2nd grid view,2grid views put in 2 DIV's.there is lot of records so need paging requirement and have to convert each page in to Document or pdf by exporting my code
Any useful links or perfect code to implement in my project
Have a look at this: http://msdn.microsoft.com/en-us/library/aa479347.aspx

Resources