Friday, March 30, 2012

How to control the report export to a pdf in Landscape mode?

hi,
I have a report and becuase of too many fields, I want to export pdf in
landscape mode. Is there any way to control this?

Thanks

oh, got it.
To do this, need to set the width of the page to 11inchs. And the width of body mostly should be 10 inchs or less. It will export the pdf document as landscape mode automatically.|||

While I am happy to hear that you set portrait and landscape in the width and height properties, it does not work.

I changed my L and R margins to about .2 and put in the width and height as 11 X 8.5.

I set my Body to at least 1/2 inch smaller that my margins to the paper size, and when I preview it, it's landscape. When I view it in PDF, it's portrait and I either have to set the printer or the pdf everytime. It also prints portrait directly to my printer, unless I change the printer setup.

It doesn't work at all with my installed PDF Writer, I have to Export to PDF thru the RS print preview.

Halp!

|||same problem.plz plz help !!!!!!!!!!!!!!!!!!!!|||to solve this you should set PageHeight and PageWidth for element Report in *.rdlc file like this:

<PageHeight>8.5in</PageHeight>
<PageWidth>11in</PageWidth>
</Report>

How to control the report export to a pdf in Landscape mode?

hi,
I have a report and becuase of too many fields, I want to export pdf in
landscape mode. Is there any way to control this?I agree. They should also have a SendTo right from the preview and
hopefully add XPS format before next product.
--
William Stacey [MVP]
"Nick" <nick_1394@.yahoo.com.cn> wrote in message
news:1137696432.086601.318380@.g43g2000cwa.googlegroups.com...
| hi,
| I have a report and becuase of too many fields, I want to export pdf in
| landscape mode. Is there any way to control this?
||||Have you tried changing the Report's Page Size? Change the Height to 21cm (8
Inches?) and WIdth to 29,7 (11?) and you get landscape. It will render as
"landscape" in your Report Manager too, but usually the users' screens are
wide enough so it's not really a problem.
Kaisa M. Lindahl
"Nick" <nick_1394@.yahoo.com.cn> wrote in message
news:1137696432.086601.318380@.g43g2000cwa.googlegroups.com...
> hi,
> I have a report and becuase of too many fields, I want to export pdf in
> landscape mode. Is there any way to control this?
>|||That works. Did not see those. Thanks.
--
William Stacey [MVP]
"Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
news:uqY6ylTHGHA.2064@.TK2MSFTNGP09.phx.gbl...
| Have you tried changing the Report's Page Size? Change the Height to 21cm
(8
| Inches?) and WIdth to 29,7 (11?) and you get landscape. It will render as
| "landscape" in your Report Manager too, but usually the users' screens are
| wide enough so it's not really a problem.
|
| Kaisa M. Lindahl
|
| "Nick" <nick_1394@.yahoo.com.cn> wrote in message
| news:1137696432.086601.318380@.g43g2000cwa.googlegroups.com...
| > hi,
| > I have a report and becuase of too many fields, I want to export pdf in
| > landscape mode. Is there any way to control this?
| >
|
|

how to control the number of row?

i want to contorl the output number of row with a certain number when select data from table that not exceed the number with my setting.

For example,if the result is exceed the 500 rows, then i just require 200 rows, that what is the command of this function?

Thanks for any help...

You can try something like:

SELECT top 500
...
from TableName

another more archaic form is to execute

SET ROWCOUNT 500

However, this will also limit the number of records update or inserted, deleted etc. Turn off the limit by:

SET ROWCOUNT 0

The TOP option is in general the better option. Look the two up in books online.

sql

How to control the loading of SqlDataSource?

I have an SqlDatSource that I have fully setup at design time, but I don't want it to open and load as soon as the page loads, instead I want to open it based on a condition.

How do you do that with a DataSource?

I know that I can simply remove the Select query, and then set it at run time, but I'm looking for something better, that allows me to have the Select query set at design time, in part because I have a lot of parameters.

Usually you have a control such as GridView or DetailsView that is connected to the SqlDataSource through its DataSourceId attribute. This will cause it to execute the query. If you leave the attribute empty the query will not be executed. From code you can set the DataSource and then call DataBind(). That will cause the SqlDataSource to execute:

GridView1.DataSource = SqlDataSource1;GridView1.DataBind();// Now the query is executed
|||

Within the SqlSataSource.Selecting event, you will have access to the Cancel property which you can set based on your conditions. If Cancel is set to True, then the Select event will not occur.

|||

while michielvoo's way is probably better, another way you can get the date to not display is to just set the GridView's Visible="false" initially, if you want the datasourceID property of the sqldatasource to be defined in the contol creation. Then, in your button_click event or whatever you do to get the data, you do:

VB:

GridView1.DataBind()
GridView1.Visible = True

C#:

GridView1.DataBind();
GridView1.Visible = True;

how to control the distance between the two matrix? or (matirx and table )

hi everyone:

the report show two tables two matrixs

how can i control the distance between them

I want to set the same distance between the table and matrix

or (table and table )

Younger,

You could possible place your tables and Matrix each inside of a rectangle and then maintain the distance between your rectangle should get you to your desired results.

Ham

|||

Ham

Thank you very much

Your idea is good, that is worked well.

Younger

How to control SqlDataSource if we know only DataSourceID ?

Anyone can help me ?Smile

Can you explain your issue? The DataSourceID points to the ID of your SqlDataSource. The SqlDataSource defines a SelectCommand which builds the collection of items which are bound to your databound control.

You can even have more than 1 databound control on the page with the same DataSourceID, like a GridView and a DetailsView. As you select a row in the GridView you can use the DetailsView to edit the row. There are many examples online for databound controls.

Try this...

http://www.asp.net/learn/dataaccess/default.aspx?tabid=63

|||

In context I have an DataSourceID, I want to change SelectCommand of SqlDataSource(before I don't know how to do this-this is my problem)

But now I know -the decision is using method FindControl

anyway Thank you very much !

Now I have a new question !

The question is how to know column's name of DataSource(not DataSet) ?

Do you know this ?

|||

To update the SelectCommand you can do it manually in the code view as opposed to design view. You can also use the wizard to update the SqlDatasource.

For knowing the column's name, that all depends on the Datasource. If the Datasource is not a DataSet and is instead a collection of objects the column name could be one of the properties on the objects.

Or are you thinking of a DataTable? When a SQL result is bound to a GridView using a SqlDatasource it does return a DataSet and it assumes it will use the first DataTable on the DataSet.

ds.Tables[0]

Is this what you needed to know?

|||

offwhite:

To update the SelectCommand you can do it manually in the code view as opposed to design view. You can also use the wizard to update the SqlDatasource.

For knowing the column's name, that all depends on the Datasource. If the Datasource is not a DataSet and is instead a collection of objects the column name could be one of the properties on the objects.

Or are you thinking of a DataTable? When a SQL result is bound to a GridView using a SqlDatasource it does return a DataSet and it assumes it will use the first DataTable on the DataSet.

ds.Tables[0]

Is this what you needed to know?

reality I don't understand you !

All I have :that is SqlDataSource

All I need :that is names of columns

But I don't know how...

:(

How to control SQL Server 2005 Express installed as a "prerequisite"


Suppose I check "SQL Server 2005 Express Edition" as one of the prerequisites for a custom app in a Windows Setup project.

From reading whatever docs I could get my hands on, it's still not clear to me how to control the installation of SQL Server Express with respect to things like instance name, service account, etc, etc.

In other words, this is stuff that's normally the domain of template.ini. However, there's no clear indication of where I should put template.ini so that the install of "prerequisite" SQL Server Express will see it and configure accordingly...

Thanks in advance to anyone who can help solve this...

Josh

Josh, template.ini is not used for configuration settings (as the .iss files were in SQL 2000). This file merely is used as documentation for creating silent installs by describing which flags are used in various situations.

As for another application installing SQL 2005 Express, I would assume that the application is controlling the install (instance name, accounts, etc) so that it can connect after install. If they are not exposing these install features during their install, they probably are using some default values for all installs.

Thanks,
Samuel Lester (MSFT)

|||

Samuel:

Yep, it looks like the parameters (at least, all the ones I tried) are recognized when supplied on the command line.

One parameter I haven't been able to find, though, is one that tells SQL Server Express Edition to use port 1433 instead of dynamic ports. I know about DISABLENETWORKPROTOCOLS (and it, too, works as expected), but it only activates TCP -- it doesn't affect the port-assignment scheme.

Thanks,
Josh