Showing posts with label number. Show all posts
Showing posts with label number. Show all posts

Friday, March 23, 2012

Report Viewer - add table

Is it possible to add tables (like in the report editor) programmatically to a report ?

I want to use 1 report for an infinite number of datatables.

Hi Friend,

I think this will give you some idea....... Thanks

publicvoid logonInfo()

{

TableLogOnInfo logOnInfo =newTableLogOnInfo();

logOnInfo = oRpt.Database.Tables["<table>"].LogOnInfo;

logOnInfo.ConnectionInfo.ServerName ="<name of Server>";

logOnInfo.ConnectionInfo.DatabaseName ="<name of DB>";

logOnInfo.ConnectionInfo.UserID ="<user>";

logOnInfo.ConnectionInfo.Password ="<pwd>";

logOnInfo.TableName ="<table>";TableLogOnInfos infos =newTableLogOnInfos();

infos.Add(logOnInfo);

CrystalReportViewer1.LogOnInfo = infos;

}

Thank you for reading my reply.

HGONE

|||

Sorry, I forgot to metion that I am using the Microsoft Reports , not Crystal Reports.

Thanks for the reply though!

Drew

Wednesday, March 21, 2012

Report Versioning

Is there a way to add a version number to an rdl file? If so can someone give me pointers on how to do it.

Thanks

-JW

You can add custom properties to RDL under the CustomProperties element. We met a similar requirement by adding a Version property. However, custom properties are not surfaced to the UI (neither Report Manager nor SSMS) so you have to parse the RDL to get to them. Implementing a standard Version property could be a welcome addition to a future release.

|||

You can also add hidden (internal) "Version" parameter with default value, and use it within your report.

Maciej

Report used as attachment to e-mail

Hi,
I have a report in RS that give me information about a number of persons, one page pr. person. Does anybody have suggestions on how I can set up an e-mail to each person, where the page with the person's data is attached to the e-mail?
(If there are 20 people, 20 e-mails shall be generated to Outlook)
Thanks,
TryMUse the data-driven delviery feature and parameterize your report.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"TryM" <TryM@.discussions.microsoft.com> wrote in message
news:EFF4FE4A-4B56-44E3-8878-2AEC48D3CA08@.microsoft.com...
> Hi,
> I have a report in RS that give me information about a number of persons,
> one page pr. person. Does anybody have suggestions on how I can set up an
> e-mail to each person, where the page with the person's data is attached
> to the e-mail?
> (If there are 20 people, 20 e-mails shall be generated to Outlook)
> Thanks,
> TryM
>sql

Report template with totals?

Hello All,

Can someone tell me how to achieve this template of the report:

Initially when not expanded

+Item number

- - - - - -(these are summed values)

After expnading the fields(+)

-Item number

-item name

[ (details)

[ (details)

[ (details)

- - - -(summed values)

Right now, I can achive the second scenario (expanded one) but initially my report just comes up with

+Item number

and the second line (summed values) are not in there . Any sort of help will be appreciated.

Thanks,

Rashi

I'm not able to figure out the actual senario so that i can out work out on this but i'm sure that you can achive this by drill down option. and place the summed value at the group footer so that each time you will get summarize for that group (Item Number).

Will this help you ?

Regards,

Manoj Verma

|||

You are right! A footer will also be a good option however, I figured out using a table group. That too works!

Thanks!

Rgds,

Rashi

Monday, February 20, 2012

Report Record Count in Header Section

Do anyone know how to do a count on the number of records in a data set and
display the information in the header section of the report? I can easily
perform this operation in the data section using the Count() method against
the data set, but RS does not allow datasets/fields to be referenced in the
header section. By required design, this record count textbox is above a
page count textbox (which must also be in the header since it's a global
variable), so I can't cheat by moving the field to the data section - it must
live in the header. Any help would be appreciated.
The only alternatives that I can think of are:
-Somehow reference a textbox that is using the Count() method in the data
section, and display the same text in the header section. (I have no idea
how I would do this.)
-Determine the record count and page count in SQL to move both fields to the
data section. I didn't want to do this because if the report layout changes,
the page count might not be correct.You can achieve this by using scope. Get the count of records for the table
level as follows:
In the header section add an expression as follows:
=Count(<field>, "<table name>")
Regards,
SaraS|||Unfortunately, you can't use Count() or CountRows() in headers or footers.
"saras" wrote:
> You can achieve this by using scope. Get the count of records for the table
> level as follows:
> In the header section add an expression as follows:
> =Count(<field>, "<table name>")
> Regards,
> SaraS
>|||Have you tried to use Report!Items.whatever.Value?
These fields are used in headers and footers. If you manage to get this data
in data section you can copy it to header section by
Report!Items.fieldname.Value.
"Bryan" wrote:
> Do anyone know how to do a count on the number of records in a data set and
> display the information in the header section of the report? I can easily
> perform this operation in the data section using the Count() method against
> the data set, but RS does not allow datasets/fields to be referenced in the
> header section. By required design, this record count textbox is above a
> page count textbox (which must also be in the header since it's a global
> variable), so I can't cheat by moving the field to the data section - it must
> live in the header. Any help would be appreciated.
> The only alternatives that I can think of are:
> -Somehow reference a textbox that is using the Count() method in the data
> section, and display the same text in the header section. (I have no idea
> how I would do this.)
> -Determine the record count and page count in SQL to move both fields to the
> data section. I didn't want to do this because if the report layout changes,
> the page count might not be correct.
>