I know this question was asked back in 2004 and haven't seen any updates on
it...
Is it possible to lock the report column headers - as in Excel - so as you
scroll, you'll always see the column title/header?
Thanks!!I believe you are looking for either "repeat header on each page" or "header
should remain visible when scrolling" on the table properties.
Jason Massie
www: http://statisticsio.com
rss: http://statisticsio.com/Home/tabid/36/rssid/1/Default.aspx
"A. Robinson" <ARobinson@.discussions.microsoft.com> wrote in message
news:FF3F5EA6-3322-4F32-BCD5-1F35FD562FFD@.microsoft.com...
>I know this question was asked back in 2004 and haven't seen any updates on
> it...
> Is it possible to lock the report column headers - as in Excel - so as you
> scroll, you'll always see the column title/header?
> Thanks!!|||A thousand thank you's , Jason...!!
Don't know how I didn't see that earlier...
"jason" wrote:
> I believe you are looking for either "repeat header on each page" or "header
> should remain visible when scrolling" on the table properties.
>
> --
> Jason Massie
> www: http://statisticsio.com
> rss: http://statisticsio.com/Home/tabid/36/rssid/1/Default.aspx
>
> "A. Robinson" <ARobinson@.discussions.microsoft.com> wrote in message
> news:FF3F5EA6-3322-4F32-BCD5-1F35FD562FFD@.microsoft.com...
> >I know this question was asked back in 2004 and haven't seen any updates on
> > it...
> >
> > Is it possible to lock the report column headers - as in Excel - so as you
> > scroll, you'll always see the column title/header?
> >
> > Thanks!!
>
Showing posts with label back. Show all posts
Showing posts with label back. Show all posts
Wednesday, March 28, 2012
Friday, March 23, 2012
lock database and shrink database log
I need a script or method to lock users out of a database,
shrink it/truncated it and then let them back in....You can try:
ALTER DATABASE SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
This will set the database to dbo_useonly and roll back all current
transactions.
--
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 Programming by Example
"Jamie Elliott" <jelliott@.alexlee.com> wrote in message
news:966501c3eb21$82ec2cb0$a101280a@.phx.gbl...
> I need a script or method to lock users out of a database,
> shrink it/truncated it and then let them back in....|||Hi,
use the below steps in script
1. ALTER DATABASE PUBS SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
2. If it full recovery model Execute , Backup Log command (To backup
transaction log)
3. Execute DBCC SHRINKFILE on Transaction log file
4. ALTER DATABASE PUBS SET MULTI_USER
Thanks
Hari
MCDBA
"Jamie Elliott" <jelliott@.alexlee.com> wrote in message
news:966501c3eb21$82ec2cb0$a101280a@.phx.gbl...
> I need a script or method to lock users out of a database,
> shrink it/truncated it and then let them back in....
shrink it/truncated it and then let them back in....You can try:
ALTER DATABASE SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
This will set the database to dbo_useonly and roll back all current
transactions.
--
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 Programming by Example
"Jamie Elliott" <jelliott@.alexlee.com> wrote in message
news:966501c3eb21$82ec2cb0$a101280a@.phx.gbl...
> I need a script or method to lock users out of a database,
> shrink it/truncated it and then let them back in....|||Hi,
use the below steps in script
1. ALTER DATABASE PUBS SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
2. If it full recovery model Execute , Backup Log command (To backup
transaction log)
3. Execute DBCC SHRINKFILE on Transaction log file
4. ALTER DATABASE PUBS SET MULTI_USER
Thanks
Hari
MCDBA
"Jamie Elliott" <jelliott@.alexlee.com> wrote in message
news:966501c3eb21$82ec2cb0$a101280a@.phx.gbl...
> I need a script or method to lock users out of a database,
> shrink it/truncated it and then let them back in....
lock database and shrink database log
I need a script or method to lock users out of a database,
shrink it/truncated it and then let them back in....You can try:
ALTER DATABASE SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
This will set the database to dbo_useonly and roll back all current
transactions.
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 programming by Example
"Jamie Elliott" <jelliott@.alexlee.com> wrote in message
news:966501c3eb21$82ec2cb0$a101280a@.phx.gbl...
use the below steps in script
1. ALTER DATABASE PUBS SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
2. If it full recovery model Execute , Backup Log command (To backup
transaction log)
3. Execute DBCC SHRINKFILE on Transaction log file
4. ALTER DATABASE PUBS SET MULTI_USER
Thanks
Hari
MCDBA
"Jamie Elliott" <jelliott@.alexlee.com> wrote in message
news:966501c3eb21$82ec2cb0$a101280a@.phx.gbl...
shrink it/truncated it and then let them back in....You can try:
ALTER DATABASE SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
This will set the database to dbo_useonly and roll back all current
transactions.
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 programming by Example
"Jamie Elliott" <jelliott@.alexlee.com> wrote in message
news:966501c3eb21$82ec2cb0$a101280a@.phx.gbl...
quote:|||Hi,
> I need a script or method to lock users out of a database,
> shrink it/truncated it and then let them back in....
use the below steps in script
1. ALTER DATABASE PUBS SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
2. If it full recovery model Execute , Backup Log command (To backup
transaction log)
3. Execute DBCC SHRINKFILE on Transaction log file
4. ALTER DATABASE PUBS SET MULTI_USER
Thanks
Hari
MCDBA
"Jamie Elliott" <jelliott@.alexlee.com> wrote in message
news:966501c3eb21$82ec2cb0$a101280a@.phx.gbl...
quote:
> I need a script or method to lock users out of a database,
> shrink it/truncated it and then let them back in....
Wednesday, March 7, 2012
Local Report not changing back to original report
Hi
I have an aspx page which contains the report viewer control. I am using
this control in local processing mode.
Everything is working correctly except the following case
If I view a report (Report1) and then click on a hyperlink which drills down
to another report (Report2), the new report loads corectly and the
parameters are passed.
However, If I then select my generate report button on the form, it seems to
create the correct datasource and pass the right parameters, but instead of
displaying Report1 again, Report2 is still displayed and the data in the
report is incorrect.
I have dubugged the code and it all seems correct to me.When the generate
report button is clicked, the report path for Report1 is set, the new
collection of report parameters are created (which are correct) and the
datasources are setup.
The only thing that is not changing correctly is the report being rendered.
Here is some of my code
'btnGenerateReport_Click Method
rptReportViewer.LocalReport.ReportPath = MapPath("../Reports/" &
objReport.URL & ".rdlc")
rptReportViewer.LocalReport.DisplayName = objReport.Name
rptReportViewer.LocalReport.DataSources.Clear()
rptReportViewer.LocalReport.DataSources.Add(New
Microsoft.Reporting.WebForms.ReportDataSource("myDataset",
dsData.Tables(0)))
rptReportViewer.LocalReport.SetParameters(objReportParameters)
rptReportViewer.LocalReport.Refresh()
rptReportViewer.Visible = True
Is there anything else I need to do to refresh the report?
Any help would reeally be appreciated as I cannot find any help or examples
on how to do this.
Thanks
Lewis HolmesHi Lewis,
Thank you for your post.
This behavior is by design for the WebForm.ReportViewer control.
It is possible to change the DataSource of the localreport
It is not possible to change the report definition in the WebForms control
in LocalReport mode after it has been set once.
To work around the design limitation of the WebForms ReportViewer control,
you can remove the existing instance and create a new one which uses the
new report definition.
Here is a sample:
//Get the new report definition
StreamReader tr = new StreamReader( < your rdlc file path>);
string sDef = tr.ReadToEnd();
tr.Close();
//Create the new viewer and remove the old one
ControlCollection col = ReportViewer1.Parent.Controls;
int index = col.IndexOf(ReportViewer1);
ReportViewer newReportView = new ReportViewer();
col.AddAt(index, newReportView);
col.Remove(ReportViewer1);
newReportView.Visible = false;
newReportView.ProcessingMode = ProcessingMode.Local;
StringReader sr = new StringReader(sDef);
newReportView.LocalReport.LoadReportDefinition(sr);
newReportView.LocalReport.DataSources.Clear();
newReportView.LocalReport.DataSources.Add(new
Microsoft.Reporting.WebForms.ReportDataSource("DataSet1_DataTable1",
ObjectDataSource1));
newReportView.LocalReport.Refresh();
newReportView.Visible = true;
Hope this will be helpful!
Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
I have an aspx page which contains the report viewer control. I am using
this control in local processing mode.
Everything is working correctly except the following case
If I view a report (Report1) and then click on a hyperlink which drills down
to another report (Report2), the new report loads corectly and the
parameters are passed.
However, If I then select my generate report button on the form, it seems to
create the correct datasource and pass the right parameters, but instead of
displaying Report1 again, Report2 is still displayed and the data in the
report is incorrect.
I have dubugged the code and it all seems correct to me.When the generate
report button is clicked, the report path for Report1 is set, the new
collection of report parameters are created (which are correct) and the
datasources are setup.
The only thing that is not changing correctly is the report being rendered.
Here is some of my code
'btnGenerateReport_Click Method
rptReportViewer.LocalReport.ReportPath = MapPath("../Reports/" &
objReport.URL & ".rdlc")
rptReportViewer.LocalReport.DisplayName = objReport.Name
rptReportViewer.LocalReport.DataSources.Clear()
rptReportViewer.LocalReport.DataSources.Add(New
Microsoft.Reporting.WebForms.ReportDataSource("myDataset",
dsData.Tables(0)))
rptReportViewer.LocalReport.SetParameters(objReportParameters)
rptReportViewer.LocalReport.Refresh()
rptReportViewer.Visible = True
Is there anything else I need to do to refresh the report?
Any help would reeally be appreciated as I cannot find any help or examples
on how to do this.
Thanks
Lewis HolmesHi Lewis,
Thank you for your post.
This behavior is by design for the WebForm.ReportViewer control.
It is possible to change the DataSource of the localreport
It is not possible to change the report definition in the WebForms control
in LocalReport mode after it has been set once.
To work around the design limitation of the WebForms ReportViewer control,
you can remove the existing instance and create a new one which uses the
new report definition.
Here is a sample:
//Get the new report definition
StreamReader tr = new StreamReader( < your rdlc file path>);
string sDef = tr.ReadToEnd();
tr.Close();
//Create the new viewer and remove the old one
ControlCollection col = ReportViewer1.Parent.Controls;
int index = col.IndexOf(ReportViewer1);
ReportViewer newReportView = new ReportViewer();
col.AddAt(index, newReportView);
col.Remove(ReportViewer1);
newReportView.Visible = false;
newReportView.ProcessingMode = ProcessingMode.Local;
StringReader sr = new StringReader(sDef);
newReportView.LocalReport.LoadReportDefinition(sr);
newReportView.LocalReport.DataSources.Clear();
newReportView.LocalReport.DataSources.Add(new
Microsoft.Reporting.WebForms.ReportDataSource("DataSet1_DataTable1",
ObjectDataSource1));
newReportView.LocalReport.Refresh();
newReportView.Visible = true;
Hope this will be helpful!
Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to:
Posts (Atom)