Saturday, February 25, 2012

MDX query data displays in data tab but not on the report when using a VB udf

Can someone please confirm if the following is an RS bug? If so, is there a
work around?
The following MDX query returns one record when executed in the Report
Designer(MS Visual Studio .net 2003) data tab:
WITH MEMBER member [Facility].[region_variable] as
'ondemand_udf!calc_weighted_ave(SetToArray({[RIC].[Cmggrpcd].Members}))'
SELECT {[Facility].[region_variable]} ON COLUMNS,
{Measures.[1000 Eating]} ON ROWS
FROM [CMG Demographics]
RETURNS:
Label Facility_region_variable
1000 Eating 6.1233453
When I preview the report(a simple table showing both fields) in report
designer, the 'Facility_region_variable' field displays null in the table.
The label does display correctly.
The 'ondemand_udf!calc_weighted_ave' function is a Visual Basic user defined
library function belonging to ondemand_udf.dll developed using MS Visual
Studio Basic 6.0. I am using RS 2000 enterprise SP2 on MS windows 2003
server. I am calling MS Analysis Services 2000 olap datasrce.
I believe this is a bug, because if I change the query to be the following,
it displays fine:
WITH MEMBER member [Facility].[region_variable] as '999'
SELECT {[Facility].[region_variable]} ON COLUMNS,
{Measures.[1000 Eating]} ON ROWS
FROM [CMG Demographics]
RETURNS:
Label Facility_region_variable
1000 Eating 999
Thank You,
_________________________
Daniel J. Zaccarine
Hanford Bay Associates, Ltd.
___________________________Hi Dan,
Welcome to use MSDN Managed Newsgroup!
From your descriptions, I understood you are calling function
ondemand_udf!calc_weighted_ave from your own custom assembly. It looks fine
in Report Desinger Data page but shows NULL in Preview page. If I have
misunderstood your concern, please feel free to point it out.
Based on my knowledge, since it works fine in Data page, it should be OK to
preview the page. Please refer the article below to confirm your deployment
Writing Custom Code in SQL Server Reporting Services
http://blogs.sqlxml.org/bryantlikes/articles/824.aspx
Sincerely yours,
Michael Cheng
Microsoft Online Partner 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.|||Hi Michael,
You seem to have understood my problem. To be clear, the
ondemand_udf!calc_weighted_ave function is used and registered for use in MS
Analysis Services. I am not sure if this is the same as an RS custom
assembly. This udf(user defined function) functions correctly. My MDX
query returns the correct data in the data tab, but will not display in the
preview tab. My report contains one table displaying the label and the
value. I have nothing else on the report(no parameters, no filters, etc.) .
Only the label displays on the report.
This seems like a RS bug to me.
The link you sent in the previous reply does not work.
Thanks for your help,
Dan
___________________________
Daniel J. Zaccarine
Hanford Bay Associates, Ltd.
___________________________
"Michael Cheng [MSFT]" <v-mingqc@.online.microsoft.com> wrote in message
news:aTXvApshFHA.940@.TK2MSFTNGXA01.phx.gbl...
> Hi Dan,
> Welcome to use MSDN Managed Newsgroup!
> From your descriptions, I understood you are calling function
> ondemand_udf!calc_weighted_ave from your own custom assembly. It looks
fine
> in Report Desinger Data page but shows NULL in Preview page. If I have
> misunderstood your concern, please feel free to point it out.
> Based on my knowledge, since it works fine in Data page, it should be OK
to
> preview the page. Please refer the article below to confirm your
deployment
> Writing Custom Code in SQL Server Reporting Services
> http://blogs.sqlxml.org/bryantlikes/articles/824.aspx
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner 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.
>|||Hi Dan,
Thanks for your email.
Would you please send me a reproduce scenario? Just some sample will be OK.
- the dll file that contains ondemand_udf!calc_weighted_ave function (it's
source code is also welcome)
- MDX that based on AdventureWorks
- steps to reproduce this behavior
I understand the information may be sensitive to you, my direct email
address is v-mingqc@.online.microsoft.com (please remove "online" before you
click SEND as "online" is only for SPAM), you may send the file to me
directly and I will keep secure.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469
Others: https://partner.microsoft.com/US/technicalsupport/supportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||I rebooted the machine and re-registered the ondemand_udf.dll for the 2nd
time and now the report works fine.
Thanks for your help,
Dan
--
___________________________
Daniel J. Zaccarine
Hanford Bay Associates, Ltd.
___________________________
"Michael Cheng [MSFT]" <v-mingqc@.online.microsoft.com> wrote in message
news:ey2wkJ5hFHA.2140@.TK2MSFTNGXA01.phx.gbl...
> Hi Dan,
> Thanks for your email.
> Would you please send me a reproduce scenario? Just some sample will be
OK.
> - the dll file that contains ondemand_udf!calc_weighted_ave function
(it's
> source code is also welcome)
> - MDX that based on AdventureWorks
> - steps to reproduce this behavior
> I understand the information may be sensitive to you, my direct email
> address is v-mingqc@.online.microsoft.com (please remove "online" before
you
> click SEND as "online" is only for SPAM), you may send the file to me
> directly and I will keep secure.
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are always here to be of
> assistance!
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================> Business-Critical Phone Support (BCPS) provides you with technical phone
> support at no charge during critical LAN outages or "business down"
> situations. This benefit is available 24 hours a day, 7 days a week to all
> Microsoft technology partners in the United States and Canada.
> This and other support options are available here:
> BCPS:
> https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469
> Others: https://partner.microsoft.com/US/technicalsupport/supportoverview/
> If you are outside the United States, please visit our International
> Support page: http://support.microsoft.com/common/international.aspx
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no
rights.
>|||Hi Dan,
Thanks so much for letting me know about this and it's great to hear it
works now :)
If you have any questions or concerns next time, don't hesitate to let me
know. We are always here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner 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.

No comments:

Post a Comment