Wednesday, March 21, 2012
displaying vertical text in details section using sql reporting service
U can change the "WritingMode" property of text box to set display
vertically.
I have another problem with the same, i want to display a text in the
details section spanning multiple rows.
below is example
S_NO NAME VERTICAL_TEXT
_______________________________
1 ABC S
2 CDE A
3 FGH M
4 IJK P
L
E
Appreciate any help!!..
VenkatCan anyone help on this?..
venkat.oar@.gmail.com wrote:
> Nico,
> U can change the "WritingMode" property of text box to set display
> vertically.
> I have another problem with the same, i want to display a text in the
> details section spanning multiple rows.
> below is example
> S_NO NAME VERTICAL_TEXT
> _______________________________
> 1 ABC S
> 2 CDE A
> 3 FGH M
> 4 IJK P
> L
> E
> Appreciate any help!!..
> Venkat
Monday, March 19, 2012
Displaying the MessageDLL option on Event property.
I don't know much about Event log viewer, so I am asking
for help. According to my project Requirement, I have to show the
Event Message DLL option on the property dialog box of the Event log
viewer.
following is the series of msgs shown in event viewer: The description
for
: Event ID (17055 ) in Source ( MSSQLSERVER). Category is (2) ,Time
,Date ,User and Computer is RASHEED.
There are some options which I can see the Event Properties but I cant
see the MessageDLL option. Suppose if I want to see this so what I
need to do.
Any help would be very much appreciated.
Thanks,
Rasheed.I'm not sure how this question is related to SQL Server but the name of the
EventMessageFile is stored in the registry. See
http://technet2.microsoft.com/Windo...3.mspx?mfr=true
Hope this helps.
Dan Guzman
SQL Server MVP
<sk.rasheedfarhan@.gmail.com> wrote in message
news:1149501206.800615.73740@.y43g2000cwc.googlegroups.com...
> Hey all,
> I don't know much about Event log viewer, so I am asking
> for help. According to my project Requirement, I have to show the
> Event Message DLL option on the property dialog box of the Event log
> viewer.
> following is the series of msgs shown in event viewer: The description
> for
> : Event ID (17055 ) in Source ( MSSQLSERVER). Category is (2) ,Time
> ,Date ,User and Computer is RASHEED.
> There are some options which I can see the Event Properties but I cant
> see the MessageDLL option. Suppose if I want to see this so what I
> need to do.
> Any help would be very much appreciated.
> Thanks,
> Rasheed.
>
Displaying Selected Report Parameter on Report
submits? I actually want to display the label property of the report
parameter on the report, not the value behind the scenes.
If I just drag and drop from the tool bar, nothing displays.
If I use =Fields(Parameters!P1.Value).Value, I get an error saying the value
for the textbox refers to an non-existing report parameter.
Can anyone helpTry Parameters!P1.Label
Sanjeev
"dillig" <dillig@.discussions.microsoft.com> wrote in message
news:D9904481-F4B3-4585-A832-936F89C80817@.microsoft.com...
> Can you display the selected report parameter on the report after the user
> submits? I actually want to display the label property of the report
> parameter on the report, not the value behind the scenes.
> If I just drag and drop from the tool bar, nothing displays.
> If I use =Fields(Parameters!P1.Value).Value, I get an error saying the
> value
> for the textbox refers to an non-existing report parameter.
> Can anyone help
Sunday, March 11, 2012
Displaying MDX result in GridView
Hello all.
I'm trying to use GridView to display a simple MDX query result. If I set AutoGenerateColumns property to true, then it fails on GridView1.Databind(); while executing the following code:
AdomdConnection conn = new AdomdConnection ("Provider=MSOLAP.3;etc., doesn't really matter");
conn.Open ();
AdomdCommand cmd = new AdomdCommand (
"SELECT" +
"{" +
"[Org Structure].[Organization Tree].&[14], " +
"[Org Structure].[Organization Tree].&[15], " +
"[Org Structure].[Organization Tree].&[16], " +
"[Org Structure].[Organization Tree].&[17] " +
"} ON COLUMNS " +
"FROM Test2 " +
"WHERE [Data Levels].[Data Levels].&[0]", conn
);
DataTable dt = new DataTable ();
dt.Load (cmd.ExecuteReader ());
GridView1.DataSource = dt;
GridView1.DataBind ();
conn.Close ();
I get a System.Web.HttpException with the following message:
"The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. Ensure that your data source has content."
I am sure that DataTable is not empty, since after I set AutoGenerateColumns to false and make some changes in code (manually bind DataTable to GridView), everything is displayed fine.
dt.Load (cmd.ExecuteReader ());
// -- BEGIN PATCH --
GridView1.AutoGenerateColumns = false;
foreach (DataColumn dc in dt.Columns)
{
BoundField bf = new BoundField ();
bf.HeaderText = bf.DataField = dc.Caption;
GridView1.Columns.Add (bf);
}
// -- END PATCH --
GridView1.DataSource = dt;
GridView1.DataBind ();
However, this approach seems to be quite wrong... I suppose, the databinding could be done automatically in this case.
Do I miss something? Any help appreciated.
hello Vladimir,
it seems to be some sort of limitation in System.Web.UI.WebControls.GridView related to types of columns present in the DataTable and the auto-generation of the columns in the grid (System.Windows.Forms.DataGridView does not seem to have the same limitation). For example, if the column might contain varying data, and DataType on it is set to System.Object, then i think the column in the System.Web.UI.WebControls.GridView is not created. The limitation on column types used to be explicitly specified (http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.datagrid.autogeneratecolumns.aspx) in docs for System.Web.UI.WebControls.DataGrid class. I don't think the same is stated for the GridView, so maybe most types are supported in the GridView. However, i think i saw it not creating grid columns for the object-typed columns in the DataTable.
i don't think it is specific to adomd.net or executing mdx, but has to do with types of the columns in the DataTable and the System.Web.UI.WebControls.GridView auto generation of columns. If what you see indeed looks like this, i'd suggest perhaps posting a question on http://forums.asp.net/24/ShowForum.aspx. maybe they could clarify more.
hope this helps some,
|||
Thanks for your response, Mary.
I didn't notice that moment about auto-generated columns limitations in DataGrid. In spite of the same is not stated in GridView documentation, it seems to be the case. I have just tested DataGrid with the same example, and I have a pretty same exception. So, I'm starting to think that workaround I have is ok. Anyway, I didn't see any underwater rocks there in my solution, it works as I expected, it just seemed to be quite unlogical to me.
You are right, my table contains only columns of System.Object type. However, I thought it wasn't a big problem to display those data automatically, simply using ToString () method.
Well, thank you for pointing me to some right direction.
|||What is the work around for this? I'm getting the same error? How do I reformat it?|||Hello Dan,
There is a workaround code in the second part of the first post. Just create columns manually...
|||doesn't likedt.Load(command.ExecuteReader());
Can't load the executed query into a DataTable. The structure of my result set might be wrong. Is there anything I should try?
I get the following error:
ExceptioneSystem.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. at System.Data.DataTable.EnableConstraints() at System.Data.DataTable.set_EnforceConstraints(Boolean value) at System.Data.DataTable.EndLoadData() at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) at System.Data.Common.LoadAdapter.FillFromReader(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) at System.Data.DataTable.Load(IDataReader reader, LoadOption loadOption, FillErrorEventHandler errorHandler) at System.Data.DataTable.Load(IDataReader reader) at _Default.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\parkerd\My Documents\Visual Studio 2005\WebSites\WebSite10\Default.aspx.cs:line 77
The following does work to execute and read my data though:
AdomdDataReader reader = myKPICommand.ExecuteReader();
while (reader.Read())
{
// for each item in the resultset, print the value
for (int i = 0; i < reader.FieldCount; i++)
{
Response.Write(reader.GetValue(i));
Response.Write("<br>\n");
}
}
|||Oh I'm using columns and rows. Anyway to convert the rows in to a DataTable?
Or should I just build it manually, I need to customize the columns and rows anyway.
Displaying MDX result in GridView
Hello all.
I'm trying to use GridView to display a simple MDX query result. If I set AutoGenerateColumns property to true, then it fails on GridView1.Databind(); while executing the following code:
AdomdConnection conn = new AdomdConnection ("Provider=MSOLAP.3;etc., doesn't really matter");
conn.Open ();
AdomdCommand cmd = new AdomdCommand (
"SELECT" +
"{" +
"[Org Structure].[Organization Tree].&[14], " +
"[Org Structure].[Organization Tree].&[15], " +
"[Org Structure].[Organization Tree].&[16], " +
"[Org Structure].[Organization Tree].&[17] " +
"} ON COLUMNS " +
"FROM Test2 " +
"WHERE [Data Levels].[Data Levels].&[0]", conn
);
DataTable dt = new DataTable ();
dt.Load (cmd.ExecuteReader ());
GridView1.DataSource = dt;
GridView1.DataBind ();
conn.Close ();
I get a System.Web.HttpException with the following message:
"The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. Ensure that your data source has content."
I am sure that DataTable is not empty, since after I set AutoGenerateColumns to false and make some changes in code (manually bind DataTable to GridView), everything is displayed fine.
dt.Load (cmd.ExecuteReader ());
// -- BEGIN PATCH --
GridView1.AutoGenerateColumns = false;
foreach (DataColumn dc in dt.Columns)
{
BoundField bf = new BoundField ();
bf.HeaderText = bf.DataField = dc.Caption;
GridView1.Columns.Add (bf);
}
// -- END PATCH --
GridView1.DataSource = dt;
GridView1.DataBind ();
However, this approach seems to be quite wrong... I suppose, the databinding could be done automatically in this case.
Do I miss something? Any help appreciated.
hello Vladimir,
it seems to be some sort of limitation in System.Web.UI.WebControls.GridView related to types of columns present in the DataTable and the auto-generation of the columns in the grid (System.Windows.Forms.DataGridView does not seem to have the same limitation). For example, if the column might contain varying data, and DataType on it is set to System.Object, then i think the column in the System.Web.UI.WebControls.GridView is not created. The limitation on column types used to be explicitly specified (http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.datagrid.autogeneratecolumns.aspx) in docs for System.Web.UI.WebControls.DataGrid class. I don't think the same is stated for the GridView, so maybe most types are supported in the GridView. However, i think i saw it not creating grid columns for the object-typed columns in the DataTable.
i don't think it is specific to adomd.net or executing mdx, but has to do with types of the columns in the DataTable and the System.Web.UI.WebControls.GridView auto generation of columns. If what you see indeed looks like this, i'd suggest perhaps posting a question on http://forums.asp.net/24/ShowForum.aspx. maybe they could clarify more.
hope this helps some,
|||
Thanks for your response, Mary.
I didn't notice that moment about auto-generated columns limitations in DataGrid. In spite of the same is not stated in GridView documentation, it seems to be the case. I have just tested DataGrid with the same example, and I have a pretty same exception. So, I'm starting to think that workaround I have is ok. Anyway, I didn't see any underwater rocks there in my solution, it works as I expected, it just seemed to be quite unlogical to me.
You are right, my table contains only columns of System.Object type. However, I thought it wasn't a big problem to display those data automatically, simply using ToString () method.
Well, thank you for pointing me to some right direction.
|||What is the work around for this? I'm getting the same error? How do I reformat it?|||Hello Dan,
There is a workaround code in the second part of the first post. Just create columns manually...
|||doesn't likedt.Load(command.ExecuteReader());
Can't load the executed query into a DataTable. The structure of my result set might be wrong. Is there anything I should try?
I get the following error:
ExceptioneSystem.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. at System.Data.DataTable.EnableConstraints() at System.Data.DataTable.set_EnforceConstraints(Boolean value) at System.Data.DataTable.EndLoadData() at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) at System.Data.Common.LoadAdapter.FillFromReader(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) at System.Data.DataTable.Load(IDataReader reader, LoadOption loadOption, FillErrorEventHandler errorHandler) at System.Data.DataTable.Load(IDataReader reader) at _Default.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\parkerd\My Documents\Visual Studio 2005\WebSites\WebSite10\Default.aspx.cs:line 77
The following does work to execute and read my data though:
AdomdDataReader reader = myKPICommand.ExecuteReader();
while (reader.Read())
{
// for each item in the resultset, print the value
for (int i = 0; i < reader.FieldCount; i++)
{
Response.Write(reader.GetValue(i));
Response.Write("<br>\n");
}
}
|||Oh I'm using columns and rows. Anyway to convert the rows in to a DataTable?
Or should I just build it manually, I need to customize the columns and rows anyway.
Sunday, February 19, 2012
Display Report AUTHOR and DESCRIPTION
fields within a textbox on the report header ?These properties are not exposed in the Report Object Model (which is
accessible from expressions within a report).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> What is the syntax to display the report property
> fields within a textbox on the report header ?|||"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> These properties are not exposed in the Report Object Model (which is
> accessible from expressions within a report).
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Dave" <davidldoyle@.yahoo.com> wrote in message
> news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > What is the syntax to display the report property
> > fields within a textbox on the report header ?
I did not understand your reply in parenthesis....Do you mean
properties are not available, or that they are within expressions
within a report.
Thank you.|||The author and description properties are not available to textboxes. Your
choices are to either hard code the values into a textbox(es) or to add the
information to a table and pull it into the report using a dataset.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406221148.7468775@.posting.google.com...
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> > These properties are not exposed in the Report Object Model (which is
> > accessible from expressions within a report).
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> >
> > "Dave" <davidldoyle@.yahoo.com> wrote in message
> > news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > > What is the syntax to display the report property
> > > fields within a textbox on the report header ?
> I did not understand your reply in parenthesis....Do you mean
> properties are not available, or that they are within expressions
> within a report.
> Thank you.|||I meant that expressions in reports can only access information and metadata
that is exposed in the Report Object Model. This object model contains the
following collections: Fields, Reportitems, Parameters, Globals, User.
The properties for Author and Description are not exposed there. So you
cannot access them.
BTW: these properties are exposed in the Rendering Object Model, but you
would need to write your own custom rendering extension to take advantage of
that and it would still be very hard to solve your initial problem (show
these properties in header / footer).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406221148.7468775@.posting.google.com...
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> > These properties are not exposed in the Report Object Model (which is
> > accessible from expressions within a report).
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> >
> > "Dave" <davidldoyle@.yahoo.com> wrote in message
> > news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > > What is the syntax to display the report property
> > > fields within a textbox on the report header ?
> I did not understand your reply in parenthesis....Do you mean
> properties are not available, or that they are within expressions
> within a report.
> Thank you.