Showing posts with label group. Show all posts
Showing posts with label group. Show all posts

Wednesday, March 28, 2012

numerate group

I would want to number the groups of reportviewer

es.

1) Articles

2) categories

-

etc you can help me

Have a global count variable in your report code and write a function to increment that variable and return the same variable. Call the function from your textbox expression. A sample looks like this:

Public GroupNumber As Integer = 0

Public Function IncrementCount() As String

GroupNumber = GroupNumber + 1

IncrementCount = CStr(GroupNumber)

End Function

And in any of your textbox in your grroup header, use an expression something like this:

=Code.IncrementCount()

Shyam

|||Thanks for help|||Can you please mark the post as answer?

Numbering of records in a Group

I just started learnig CR.
1) I want to know how to serially number records which form part of a particular group. "Group Number" gives the group a num and "Record Number" gives a global num. I want each list in a group should have a distinct set of numbers.
Sorry if the question is very silly, I enquired couple of people but no help!

2) I also want to know how do we display a CR from VB and print it to deskjet printer.

Version info:
CR 9 & CR 4.2
VB6Write your own formulas to count them.
e.g. in group header
whileprintingrecords;
numbervar x := 0;

in detail:
whileprintingrecords;
numbervar x := x + 1;|||Like I said in the first instance Iam a novice in CR (that explains my username). Though you have stated to add some variables in group header and increment in detail section, I donot see any "code window" as in VB where I can add the code suggested. I would be happy if you could take some pains to explain me that as well.

Also let me know how to connect, open & print CR9 report through VB6, the database being Access 2003. The connection needs to be dynamic i.e. I should be able to manipulate the connxn programatically through VB6.|||Nobody has responded. Can moderators help me.|||right click on formula fields in field explorer, select new then code window for the formula will be opened. u need to do this in crystal desinger not in vb6 form designer.

numbering in group

I want to add numbering in group in the reports.(number each row in the detail)

when I worked with access it was possible.

can I do it in the report services?

thanks!Ok I find it:

=rownumber("MyGropName")

thankssql

Friday, March 23, 2012

Number of Nodes and Instance on Windows 2003 Cluster

How many Ressource group or Virtual SQL server may I run on on Windows 2003
cluster node ?
How many nodes can I have for an SQL Cluster architecture ? Apparently Four
? May someone confirm this number ? and is it four active instances or 3
active/ 1 passive ?
What happend if I have four SQL resource group with a eight nodes Windows
2003 cluter ?
answers inline below...
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
"Jean-Michel Remiche" <jmr@.visionitgroup.com> wrote in message
news:B59BD2B2-E7DF-4642-9613-78722FA27374@.microsoft.com...
> How many Ressource group or Virtual SQL server may I run on on Windows
> 2003
> cluster node ?
>
SQL supports a 4 node cluster on a 32-bit OS. Each SQL supports 16
instances. Given that you have monster machines and an A/A/A/A cluster you
could have 64 databases in the cluster.
I am not aware of a limit to resource groups in clustering. Files shares
have been limited in the past
(http://support.microsoft.com/default...NoWebContent=1)
but I have not seen anything on Groups.

> How many nodes can I have for an SQL Cluster architecture ?
Windows 2000 = 2
Windows 2003 32 bit = 4
Windows 2003 64 bit = 8

>Apparently Four
> ?
With the 32-bit OS, yes.
May someone confirm this number ?
I just did

>and is it four active instances or 3
> active/ 1 passive ?
>
You can do all 4 Active, though I would never do this.

> What happend if I have four SQL resource group with a eight nodes Windows
> 2003 cluter ?
SQL will only install on any 4, though I have not tested this.
Source of information:
http://www.microsoft.com/usa/webcasts/ondemand/1751.asp
|||Under Windows 2003 and SQL 2000 here are the rules.
Each cluster can have 8 host nodes.
Each cluster can have 16 instances. (Note that this is a Cluster-wide limit,
not a host node limit.
Each SQL instance can be installed on up to 4 nodes. (8 for 64-bit, it is an
installer limitation)
Each SQL Resource group = 1 instance.
Each SQL instance = 1 Resource group.
You can have non-SQL resource groups in the cluster, but it is generally a
bad idea except for the MSDTC resource group.
Forget you ever heard of 'active/active' or 'active/passive' or any
variation of those. Those terms referred to some technical limitations of
SQL 7.0 clustering and have no real meaning for SQL 2000 clustering.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:%23ojM6JOkEHA.644@.tk2msftngp13.phx.gbl...
> answers inline below...
> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering
> "Jean-Michel Remiche" <jmr@.visionitgroup.com> wrote in message
> news:B59BD2B2-E7DF-4642-9613-78722FA27374@.microsoft.com...
> SQL supports a 4 node cluster on a 32-bit OS. Each SQL supports 16
> instances. Given that you have monster machines and an A/A/A/A cluster you
> could have 64 databases in the cluster.
> I am not aware of a limit to resource groups in clustering. Files shares
> have been limited in the past
>
(http://support.microsoft.com/default...microsoft.com
:80/support/kb/articles/Q185/2/12.ASP&NoWebContent=1)[vbcol=seagreen]
> but I have not seen anything on Groups.
>
> Windows 2000 = 2
> Windows 2003 32 bit = 4
> Windows 2003 64 bit = 8
>
> With the 32-bit OS, yes.
> May someone confirm this number ?
> I just did
>
> You can do all 4 Active, though I would never do this.
Windows
> SQL will only install on any 4, though I have not tested this.
> Source of information:
> http://www.microsoft.com/usa/webcasts/ondemand/1751.asp
>
sql

Monday, March 12, 2012

Nulls when summing a group in an expression

Hi guys,

I know this has been discussed before, but not in a way that solves this particular problem. I have some data in a table that is grouped by rows, but when i sum the fields in the group i am getting an error because one of the grouped rows contains a null.

Now when i have a one to one relationship between a dataset field and a table cell, checking for a null is easy. But how do you do it when you have several fields that are being summed for that table cell?

In this particular case, i have a work around - there are only two data rows per row group (paid revenue, and unpaid revenue), so i can check them individually for nulls by using First(Fields!Revenue.Value) and Last(Fields!Revenue.Value). This is the expression i used:

=IIf(

Not IsNothing( Fields!Revenue.Value) and isnumeric(Fields!Revenue.Value),

FormatCurrency(

IIf(

Not IsNothing( First(Fields!Revenue.Value)),

First(Fields!Revenue.Value),

0

)

+

IIf(

Not IsNothing( Last(Fields!Revenue.Value)),

Last(Fields!Revenue.Value),

0

),

0,

true,

false,

true

),

"-"

)

The first expression in the outer IIf is worthless, because using Fields!Revenue.Value only checks the first row in the group, and in my case it is always the second row that contains the null.

What is the best way to account for the null values?* It seems i can't access the .Value field like an array (i.e. Fields!Revenue.Value(1)). Should i be passing Fields!Revenue.Value through to a piece of custom code to sum it?

Thanks!

sluggy

*The data i am working with is sourced from a cube with an mdx query. The query uses a COALESCEEMPTY(<measure>, 0) function, but it seems the data provider being used is changing the fields that were coalesced back into nulls. Which is ok - at least i am getting the rows, prior to using the coalesce the rows were being dropped. I'd rather have nulls than have the row missing from the dataset.

Not sure if I understand your question completely, but you can use IIF inside of an aggregate function if you want to skip null values. For example, =Sum(IIF(IsNothing(Fields!Revenue.Value), 0, Fields!Revenue.Value)).

|||

Hi

can you try this out and check whether it is working or not.

=IIf(

Not IsNothing( Fields!Revenue.Value) and isnumeric(Fields!Revenue.Value),

FormatCurrency(

IIf(

Not IsNothing( Cint(First(Fields!Revenue.Value))),

Cint(First(Fields!Revenue.Value)),

0

)

+

IIf(

Not IsNothing( Cint(Last(Fields!Revenue.Value))),

Cint(Last(Fields!Revenue.Value)),

0

),

0,

true,

false,

true

),

"-"

)

Thanks,

Srinivas Reddy.

|||

Srinivas, Fang,

thanks for your answers, but neither work. In this case casting the fields has no effect, as they are already being returned as ints, and you can't typecast a field that is already null.

I have noticed something further, and consequently some of my original information was incorrect. What i have noticed is that nulls are NOT being returned - zeros are. So if i code this expression:

=First(Fields!Revenue.Value) + Last(Fields!Revenue.Value)

it gets evaluated no problem - i get the revenue from the first row plus zero from the second. But if i do any sort of aggregation type function on it, like Sum or Avg etc, then i get an error.Can anyone explain what is happening here, or suggest how i can determine exactly what error is occurring?

Thanks,

sluggy

|||

If you are designing and previewing the report in the report designer, you can check the error message in the task bar.

What's the data type of the Revenue field? One possible reason could be you are summing mixed types. Aggregate functions require all the values passed in are of the same type.

|||

Thanks Fang, i will check into that.

sluggy

Friday, March 9, 2012

NullProcessing and Reference Dimensions

Have a Measure group in a fact table. This fact table links to the project dimension and the time dimension. In the project dimension there are some additional dates like ProjectStartDate and ProjectDueDate. So I create a new time dimension for these dates.

So for the Measure Group / Time (ProjectStartDate) combination, I define the dimension usage as a reference to the project dimension.

But when I process I get som errors on ProjectStartDate that date values (the NULL date) not exist time dimension (which is correct).

To solve this I try to set up the NullProcessing for these dimensions. But in contrast with a regular dimension there is no advanced section for reference dimensions.

Also the following don't solve the problem: setting NullProcessing on the ProjectStartDate attribute in the Project Dimension, setting NullProcessing on the Time dimension or setting NullProcessing on the project dimension.

Anyone know how to achieve NullProcessing:UnknownMember on a reference dimension ?

tx /Dirk

Try and solve this problem by defining Named Query in your DSV.

Replace your dimension table in DSV with Named Query that filters out NULL's.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights

|||

Filtering out the NULL's is not really an option since it would remove data from the cube.

I could fill in the NULL with dummy values (although for a time dimension this stays stange) but that's exactly what the NullProcessing should do. Put in a (black, zero, are UnknownMember) where there is a Null in the attribute or related key field.

For attibutes you specify it in the properties and this works fine.

For regular dimensions you specify this in the advanced options and works.

But what to do for a referenced dimension ? There is no such option, so I thought that specifying it in the referenced dimension might do the trick but it doesn't.

|||

You are right. In this case Analysis Server behaves differently.


But taking this aside. In general you are running into age old problem of having clean data and good referential integrity. Telling Analysis Server to hide some data that you have no keys for under Unknown member is not such a good practice. You will see your totals not summing up when try and sum child nodes manually. Strange things like that can create a perception with the user of Analysis Server showing incorrect data. You might be solving problem in short run by changing processing options, but in a longer run, you will be showing your users "inconsistent" data and that is in my opinion is quite dangerous

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.


|||

Thanks Edward,

Just thought that SSAS would make life a little simpler, Just have to get my ref-int scripts updated I guess. Still stupid that SSAS supports some cases but not all, which indeed makes it more or less useless.

/Dirk

Monday, February 20, 2012

Null Measure Data Processing....

Hello,

I created a cube with measures and dimensions using AMO. The measure group comes from a table called "client_coverage", and there is a measure called "count". There are also 2 dimensions, namely "TimeZone" and "Source".

For example,

Coverage

ID TimeZone Source

-- -- --

1 null null

2 null null

I've programmably set the "null processing" for measure "count" to "preserve", and both dimensions' UnknownMembers to "visible" and set their key column's "Null Processing" to "Unknown Members".

However, when I browse the cube, there is no number shows up for the coverage "count" measure. I've checked that the dimensions are setup correctly with proper relationships to the coverage measure group.

Interesting thing is, if I remove the cube dimension manually from the cube using the Business Intelligence studio and then right away add them back in. Then the number shows up.... like :

Source Count

- --

Unknown 2

I wonder if there is something needs to be done in my AMO program when adding the cube dimensions (the things that the BI studio does automatically).

Any help is very appreciated..

Thank you very much,

Sincerely,

Hsiao-I

Ah.. I found out that I have to set the relationship between the measure group and the dimension's "Null Processing" property to the same as the Dimension's Null Processing property... that solved the problem!!