Showing posts with label editor. Show all posts
Showing posts with label editor. 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

Monday, February 20, 2012

Report Refresh through code in reporting services

I use some editor to edit the data in the backend. I view the report in sharepoint portal using url access of the report in reporting services with the toolbar disabled by rc:toolbar=false. Now, as and when I edit the data of the report using an editor, I want the report to be updated with the new data. This I want to do it by placing a button or some link in the Sharepoint, clicking which should update the report with the new data. Is there any parameter like rc:refresh which will refresh the report?
--
Message posted via http://www.sqlmonster.comYes, rs:ClearSession=true will refresh the report.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
"Varma via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:9fcebb16b4f6418fb26b01a1a4841f5d@.SQLMonster.com...
>I use some editor to edit the data in the backend. I view the report in
>sharepoint portal using url access of the report in reporting services with
>the toolbar disabled by rc:toolbar=false. Now, as and when I edit the data
>of the report using an editor, I want the report to be updated with the new
>data. This I want to do it by placing a button or some link in the
>Sharepoint, clicking which should update the report with the new data. Is
>there any parameter like rc:refresh which will refresh the report?
> --
> Message posted via http://www.sqlmonster.com