Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Thursday, March 29, 2012

Directly printing Report from RS without previewing

Hi All,
Is there a way to send a report from Reporting service directly to the printer without previewing in VS 2005 web application? I tried out an example which exports the report into a pdf and then sends it over to the printer but apparently it did not print. It stopped working after saving the reoprt on the client machine. The article is located at

http://www.codeproject.com/vb/net/RSPrintLandscape.asp

Thanks for the help in advance.

Sanat

what version ? 2000 or 05 ?

printer on the server or on the client ?
if you look at the samples there is a printer delivery sample.

in rs 2000 I hacked that up some to output to a printer w/o the subscription stuff.
basicly when Render() is called it makes a windows EMF file that can then be sent to a printer as a page of output.

do that in a loop and you get printed copy.

just set the page up at the start with the right settings...

|||

and, you know how send the emf correctly to a printer?...

mm.. or how to construct a Printer Settigs or PrinterDocument?...

what should i do?

this is a part of code, and


PrinterSettings printerSettings = new PrinterSettings();
printerSettings.MaximumPage = m_numberOfPages;
printerSettings.MinimumPage = 1;
printerSettings.PrintRange = PrintRange.SomePages;
printerSettings.FromPage = 1;
printerSettings.ToPage = m_numberOfPages;
printerSettings.PrinterName = "Hp Dj 550"; //here goes printer's name.
PrintDocument pd = new PrintDocument();

pd.PrinterSettings = printerSettings;

pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);

pd.Print();

Inside of pd_PrintPage method, i don't have anything about the printer, just code to conver a byte[] into a graphics file... what ever, nothing goes to the printer... thanks in advance for your attention.

|||Have you taken a look at http://www.gotreportviewer.com/? There is a sample called "Print a report from a console app" that uses the ReportViewer control to do this.|||

Thanks for the link Brian - this is almost exactly what I need to do (automatically print local reports).

My ADO.NET skills are not quite up to par - how would I modify the Run method of this example to execute an existing server based report that I have? I have managed to convert the report from an RDL to an RDLC, and added it to my Console Project with VB.NET. In addition, I created a new Data Set within this project that returns the data from the original stored procedure that was used for the RDL file. I now need to associate this new Data Set with the RDLC report, as well as pass some parameters to it, but I am not sure how to proceed.

Any suggestions/direction would be greatly appreciated.

Thanks!

Directly printing Report from RS without previewing

Hi All,
Is there a way to send a report from Reporting service directly to the printer without previewing in VS 2005 web application? I tried out an example which exports the report into a pdf and then sends it over to the printer but apparently it did not print. It stopped working after saving the reoprt on the client machine. The article is located at

http://www.codeproject.com/vb/net/RSPrintLandscape.asp

Thanks for the help in advance.

Sanat

what version ? 2000 or 05 ?

printer on the server or on the client ?
if you look at the samples there is a printer delivery sample.

in rs 2000 I hacked that up some to output to a printer w/o the subscription stuff.
basicly when Render() is called it makes a windows EMF file that can then be sent to a printer as a page of output.

do that in a loop and you get printed copy.

just set the page up at the start with the right settings...

|||

and, you know how send the emf correctly to a printer?...

mm.. or how to construct a Printer Settigs or PrinterDocument?...

what should i do?

this is a part of code, and


PrinterSettings printerSettings = new PrinterSettings();
printerSettings.MaximumPage = m_numberOfPages;
printerSettings.MinimumPage = 1;
printerSettings.PrintRange = PrintRange.SomePages;
printerSettings.FromPage = 1;
printerSettings.ToPage = m_numberOfPages;
printerSettings.PrinterName = "Hp Dj 550"; //here goes printer's name.
PrintDocument pd = new PrintDocument();

pd.PrinterSettings = printerSettings;

pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);

pd.Print();

Inside of pd_PrintPage method, i don't have anything about the printer, just code to conver a byte[] into a graphics file... what ever, nothing goes to the printer... thanks in advance for your attention.

|||Have you taken a look at http://www.gotreportviewer.com/? There is a sample called "Print a report from a console app" that uses the ReportViewer control to do this.|||

Thanks for the link Brian - this is almost exactly what I need to do (automatically print local reports).

My ADO.NET skills are not quite up to par - how would I modify the Run method of this example to execute an existing server based report that I have? I have managed to convert the report from an RDL to an RDLC, and added it to my Console Project with VB.NET. In addition, I created a new Data Set within this project that returns the data from the original stored procedure that was used for the RDL file. I now need to associate this new Data Set with the RDLC report, as well as pass some parameters to it, but I am not sure how to proceed.

Any suggestions/direction would be greatly appreciated.

Thanks!

Directly printing Report from RS without previewing

Hi All,
Is there a way to send a report from Reporting service directly to the printer without previewing in VS 2005 web application? I tried out an example which exports the report into a pdf and then sends it over to the printer but apparently it did not print. It stopped working after saving the reoprt on the client machine. The article is located at

http://www.codeproject.com/vb/net/RSPrintLandscape.asp

Thanks for the help in advance.

Sanat

what version ? 2000 or 05 ?

printer on the server or on the client ?
if you look at the samples there is a printer delivery sample.

in rs 2000 I hacked that up some to output to a printer w/o the subscription stuff.
basicly when Render() is called it makes a windows EMF file that can then be sent to a printer as a page of output.

do that in a loop and you get printed copy.

just set the page up at the start with the right settings...

|||

and, you know how send the emf correctly to a printer?...

mm.. or how to construct a Printer Settigs or PrinterDocument?...

what should i do?

this is a part of code, and


PrinterSettings printerSettings = new PrinterSettings();
printerSettings.MaximumPage = m_numberOfPages;
printerSettings.MinimumPage = 1;
printerSettings.PrintRange = PrintRange.SomePages;
printerSettings.FromPage = 1;
printerSettings.ToPage = m_numberOfPages;
printerSettings.PrinterName = "Hp Dj 550"; //here goes printer's name.
PrintDocument pd = new PrintDocument();

pd.PrinterSettings = printerSettings;

pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);

pd.Print();

Inside of pd_PrintPage method, i don't have anything about the printer, just code to conver a byte[] into a graphics file... what ever, nothing goes to the printer... thanks in advance for your attention.

|||Have you taken a look at http://www.gotreportviewer.com/? There is a sample called "Print a report from a console app" that uses the ReportViewer control to do this.|||

Thanks for the link Brian - this is almost exactly what I need to do (automatically print local reports).

My ADO.NET skills are not quite up to par - how would I modify the Run method of this example to execute an existing server based report that I have? I have managed to convert the report from an RDL to an RDLC, and added it to my Console Project with VB.NET. In addition, I created a new Data Set within this project that returns the data from the original stored procedure that was used for the RDL file. I now need to associate this new Data Set with the RDLC report, as well as pass some parameters to it, but I am not sure how to proceed.

Any suggestions/direction would be greatly appreciated.

Thanks!

sql

Directly printing Report from RS without previewing

Hi All,
Is there a way to send a report from Reporting service directly to the printer without previewing in VS 2005 web application? I tried out an example which exports the report into a pdf and then sends it over to the printer but apparently it did not print. It stopped working after saving the reoprt on the client machine. The article is located at

http://www.codeproject.com/vb/net/RSPrintLandscape.asp

Thanks for the help in advance.

Sanat

what version ? 2000 or 05 ?

printer on the server or on the client ?
if you look at the samples there is a printer delivery sample.

in rs 2000 I hacked that up some to output to a printer w/o the subscription stuff.
basicly when Render() is called it makes a windows EMF file that can then be sent to a printer as a page of output.

do that in a loop and you get printed copy.

just set the page up at the start with the right settings...

|||

and, you know how send the emf correctly to a printer?...

mm.. or how to construct a Printer Settigs or PrinterDocument?...

what should i do?

this is a part of code, and


PrinterSettings printerSettings = new PrinterSettings();
printerSettings.MaximumPage = m_numberOfPages;
printerSettings.MinimumPage = 1;
printerSettings.PrintRange = PrintRange.SomePages;
printerSettings.FromPage = 1;
printerSettings.ToPage = m_numberOfPages;
printerSettings.PrinterName = "Hp Dj 550"; //here goes printer's name.
PrintDocument pd = new PrintDocument();

pd.PrinterSettings = printerSettings;

pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);

pd.Print();

Inside of pd_PrintPage method, i don't have anything about the printer, just code to conver a byte[] into a graphics file... what ever, nothing goes to the printer... thanks in advance for your attention.

|||Have you taken a look at http://www.gotreportviewer.com/? There is a sample called "Print a report from a console app" that uses the ReportViewer control to do this.|||

Thanks for the link Brian - this is almost exactly what I need to do (automatically print local reports).

My ADO.NET skills are not quite up to par - how would I modify the Run method of this example to execute an existing server based report that I have? I have managed to convert the report from an RDL to an RDLC, and added it to my Console Project with VB.NET. In addition, I created a new Data Set within this project that returns the data from the original stored procedure that was used for the RDL file. I now need to associate this new Data Set with the RDLC report, as well as pass some parameters to it, but I am not sure how to proceed.

Any suggestions/direction would be greatly appreciated.

Thanks!

Directly print to Printer

Hi,
I have a VB Application with Crystal Report 8. If I click the print button in VB, I dont want to show the Crystal Report. I want to print the contents of the report directly to the Printer without showing the report. Is there a way to do this?
Thanks in advance
MadhivananFrom memory, so.........please forgive any errors from failed memory......:-))

assumes using CR active x control:

Dim objPrintApp As CRAXDRT.Application
Dim objReport As CRAXDRT.Report

Set objPrintApp = New CRAXDRT.Application
Set objReport = objPrintApp.OpenReport(strReportSourcePath & strSourceFile)
objPrintApp.LogOnServerEx "pdsodbc.dll", "database", "database", "user", "pwd"

' set PromptUser to False, NumberOfCopies to value >=1
' all parameters in brackets are optional.
objReport.Printout [PromptUser], [NumberOfCopies], [Collated], [StartPageNumber], [StopPageNumber]

dave|||Thanks springsoft. I think this is for CR9 but what is the code for CR8?.

Madhivanan

direct report to a folder located at network drive?

Hi,
Can I redirect report to \\server\folder\reports? Thanks for the help.
HenryHi,
It means you want to deploy at this location then it is "NO"
Amarnath
"Henry Chen" wrote:
> Hi,
> Can I redirect report to \\server\folder\reports? Thanks for the help.
> Henry|||Hi, Amarnath,
You know what? I find the answer, and yes it can be done.
Check this link:
http://msdn2.microsoft.com/en-us/library/ms159264.aspx
Note: (share my experience to everyone during my testing of this problem)
1. use standard subscription
2. add an acccount to the file share folder, and that account will be used
in your subscription
3. path in standard subscription is \\server_name\folder_name
4. when you enter your account name, I need to enter abcsit\hchen instead of
just hchen. where abcsit is our company's domain name, hchen is my login
account.
Henry
"Amarnath" wrote:
> Hi,
> It means you want to deploy at this location then it is "NO"
> Amarnath
> "Henry Chen" wrote:
> > Hi,
> > Can I redirect report to \\server\folder\reports? Thanks for the help.
> > Henrysql

Direct Printout of PDF still not possible?

Hi everybody,
I've been doing some research on the problem, that it is not possible to
print out a report in a PDF directly. The "open" or "save" dialogue comes up
first. I did read in some postings that there should be a possibility after
SP2 of the reporting services. By the way, I am using the 2000-Version of
the RS. Still, I can't find a proper solution to send a PDF directly to the
acrobat reader.
Does anyone has a solution to this?
Thx in advance.
Regards
MichaelWhy would you want to do this' View the reports through report manager,
.pdf files surely just makes them unedittable, how can that be helpful
unless you want to present them in an email or something and in that case
you would want to save the reports so you had a back up?
Sorry if i've missed the point but i can't see why you'd want to do this?
bob
"Michael Bender" <technik@.salescom.de> wrote in message
news:dl2776$f5o$02$1@.news.t-online.com...
> Hi everybody,
> I've been doing some research on the problem, that it is not possible to
> print out a report in a PDF directly. The "open" or "save" dialogue comes
> up first. I did read in some postings that there should be a possibility
> after SP2 of the reporting services. By the way, I am using the
> 2000-Version of the RS. Still, I can't find a proper solution to send a
> PDF directly to the acrobat reader.
> Does anyone has a solution to this?
> Thx in advance.
> Regards
> Michael
>

Direct print possible?

Is it possible to print a report directly without having to first preview it
using the ReportViewer control?On Apr 10, 2:28 am, georges <geor...@.discussions.microsoft.com> wrote:
> Is it possible to print a report directly without having to first preview it
> using the ReportViewer control?
What .NET language and environment are you using?
In C#, ASP.NET, this should help:
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/e82168c08b00ce18/33d2f61564ce1a2a?lnk=st&q=print+reporting+services+in+asp.net&rnum=2#33d2f61564ce1a2a
Regards,
Enrique Martinez
Sr. Software Consultant

Direct Link to reports

Hi There,

I have recently upgraded to report Server 2005. I used to have a webpage that loaded a number of reports into different frames to give real time statistics for an IT Service Desk.

In the new version if try and link directly to the report (By right clicking a report and taking the link) the report loads with out any of the toolbars etc at the top as i need it, however it does not refresh and seem to be cached data.

Has anyone got any ideas how to resolve this problem, in short all I need is a way to directly view the report losing all the toolbars etc on the top and just displaying the data.

This has been driving me mad so if anyone could help i would be really grateful!

Many thanks

Gerard

YOu can definitely do this but not "by rightclicking on a report and taking the link". That's going to get you the origin of the report invocation in report *manager* (by default, http://<yourserver>/reports) when what you want is the link to the report in the report *server* (by default, that would be http://<yourserver>/reportserver).

See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1795172&SiteID=1 .

There is plenty of information on this in the helpfile -- just look for topics that mention "URL Access".

Tuesday, March 27, 2012

Dinamic subreports

Hi there,
I want to create a "big report" including a lot of subreports.. but I want
the user can select the reports to show in the "big report" from a list of
existing reports (generally graphs reports). Each user of the application
will have his "big report" configurated as he want, and the settings will be
stored on a table.
Any suggestions?
I have to assign to each subreport the reportname property, the parameters
(I previously have all Parameters in "big report" assigned from an aspx),
and the visibility property,right? but when and where do I write this code?
thank's a lot for any suggestion
Emanuele AndrettaAny suggestion' please...
"Emanuele" <emanuele75@.telefonica.net> ha scritto nel messaggio
news:OD5FI5MeFHA.1448@.TK2MSFTNGP09.phx.gbl...
> Hi there,
> I want to create a "big report" including a lot of subreports.. but I want
> the user can select the reports to show in the "big report" from a list of
> existing reports (generally graphs reports). Each user of the application
> will have his "big report" configurated as he want, and the settings will
be
> stored on a table.
> Any suggestions?
> I have to assign to each subreport the reportname property, the parameters
> (I previously have all Parameters in "big report" assigned from an aspx),
> and the visibility property,right? but when and where do I write this
code?
> thank's a lot for any suggestion
> Emanuele Andretta
>

Dimension, CurrentMember and a hierarchy

Greetings -

I am writing some MDX for a RS report, and seem to have hit a bit of a wall. The business folks keep changing their minds on what hierarchy they want to report from, so I would like to have it as a parameter to the report. Problem is that I don't know if there is a way to get the CurrentMember.Properties('Caption') without explicitly declaring the hierarchy. My MDX:

With Set [MySet] as

StrToSet(@.HierarchyAndMember)

Set [DateSet] as

StrToSet(@.Date, Constrained)

Member [Measures].[Display] as

[Dimension].[Hierarchy Name].CurrentMember.Properties('Caption')

I would like to do StrToSet(@.HierarchyMember).CurrentMember.Properties('caption') here

Select { [measures].[created invoices], [measures].[display] } on 0,

{ [MySet] * [DateSet] } on 1

from [cube]

I have tried several different things, and this is the closest I have found. Placing the StrToSet in either it's own set or directly in the MDX doesn't affect the results. Is there any way to get the current member of the dimension without hardcoding the hierarchy? Does anyone have any creative solutions, or at least any directions to go?

Thanks in advance,

John Hennesey

It turns out that the RS designer is a pain in the sense it wants you to explicitly select a hierarchy & member so it knows what fields are returned from MDX. It doesn't check the validity of the items during runtime, it passes the values into MDX and lets AS take over. I have the ability to get done exactly what I am looking to do.

Thanks though,

John

sql

Sunday, March 25, 2012

Dimension Filter in MDX

Hi guys,

I need to create a report using data from our OLAP. I'm using a MDX query to do it, but I founded some limitations that I want to know if its real or just my mistakes. I have a the following dimensions

- "Projects", that have Project Name and Company name

- "Company", that have my company name too

- "Months", that have the months and years about projects

If I'm developing a sql query, its seems like this:

select * from Projects p, Months m

where p.company in ('A', 'B', 'C')

and m.Year = 2007

But when I'm using MDX queries, I need the same flexibility to filter more than one data (like the IN at the sql query above) from the dimension that I'm looking for (like filter p.company from my PRojects tables)

Here is the sample of my code. If you look inside it, I'm filtering the best I can in the mdx query and after, I'm filtering better using T-sql. Its works fine, but its expensive and I need to get better performance. I want to filter my company using the project dimension and not company dimension. I'm also want to filter the Month dimension at my mdx query, but its says that I cant because I'm using it as a row member.

SELECT

"[Measures].[codProject]" as codProj,

"[Measures].[Month]" asMonth,

isnull("[Measures].[Valor Total]",0)as vlrTotal

FROM

OPENQUERY( DW2007,''

with

member [Measures].[codProject] as'[Project].Properties("key")'

member [Measures].[Month] as'[Month].Properties("key")'

SELECT

NON EMPTY { [Measures].[Valor Total], [Measures].[codProject], [Measures].[Month] }ON COLUMNS,

non empty {[Project].[Project].Members * [Month].[Month].MEMBERS }ON ROWS

FROM [Budget]

where( [Company].['+ rtrim(@.nmCompany) +'], [Year].['+ cast(@.Year as char(4)) +'] )

'')

wherecast("[Project].[Company].[member_caption]" as varchar(10))='''+ rtrim(@.nmCompany) +'''

andcast("[Month].[Year].[MEMBER_CAPTION]" aschar(4))=' + cast(@.Year as char(4)) + ''

Can anyone help me ?

Best Regards,

Tritech - Consultoria e Desenvolvimento de Solu??es em TI

I think the problem is that the "non empty" clauses are not really doing much as the two calculated measures that get the key properties will return a non empty value for every month and project. Something like the following, where I have used the iif() function to only return a value. Possibly even excluding these measures from the MDX query and then joining back to the dimension table in T-SQL might be faster.

SELECT

"[Measures].[codProject]" as codProj,

"[Measures].[Month]" asMonth,

isnull("[Measures].[Valor Total]",0)as vlrTotal

FROM

OPENQUERY( DW2007,''

with

member [Measures].[codProject] as'iif(IsEmpty(Measures.[Valor Total]),NULL,[Project].Properties("key"))'

member [Measures].[Month] as'iif(IsEmpty(Measures.[Valor Total]),NULL,[Month].Properties("key"))'

SELECT

NON EMPTY { [Measures].[Valor Total], [Measures].[codProject], [Measures].[Month] }ON COLUMNS,

non empty {[Project].[Project].Members * [Month].[Month].MEMBERS }ON ROWS

FROM [Budget]

where( [Company].['+ rtrim(@.nmCompany) +'], [Year].['+ cast(@.Year as char(4)) +'] )

'')

wherecast("[Project].[Company].[member_caption]" as varchar(10))='''+ rtrim(@.nmCompany) +'''

andcast("[Month].[Year].[MEMBER_CAPTION]" aschar(4))=' + cast(@.Year as char(4)) + ''

|||

Hi Darren,

Tks for your reply, but I want to know if can I put my sql where clause into the mdx query ? If I can, will be faster and solve many problems for me. I look in some place, that you can select a "cube", using a select like one. as its show in the folowing query that I get from Microsoft Team Foundation Server reports. Here its use a select with another, but using parameter, anyone know if can I do this with queries and dimensions ?

SELECT
NON EMPTY {
[Measures].[Current Work Item Microsoft_VSTS_Scheduling_BaselineWork], [Measures].[Current Work Item Microsoft_VSTS_Scheduling_CompletedWork], [Measures].[Current Work Item Microsoft_VSTS_Scheduling_RemainingWork] } ON COLUMNS,
NON EMPTY {
([Assigned To].[Person].[Person].ALLMEMBERS * [Work Item].[System_Title].[System_Title].ALLMEMBERS * [Work Item].[System_State].[System_State].ALLMEMBERS )
}
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM (
SELECT
( STRTOSET(@.MicrosoftVSTSSchedulingFinishDateYearMonthDate, CONSTRAINED) ) ON COLUMNS
FROM (
SELECT ( STRTOSET(@.MicrosoftVSTSSchedulingStartDateYearMonthDate, CONSTRAINED) ) ON COLUMNS
FROM (
SELECT ( STRTOSET(@.AssignedToPerson, CONSTRAINED) ) ON COLUMNS
FROM (
SELECT ( STRTOSET(@.TeamProjectTeamProject, CONSTRAINED) ) ON COLUMNS
FROM [Team System]
)
)
)
)
WHERE ( IIF( STRTOSET(@.TeamProjectTeamProject, CONSTRAINED).Count = 1,
STRTOSET(@.TeamProjectTeamProject, CONSTRAINED),
[Team Project].[Team Project].currentmember ),
IIF( STRTOSET(@.MicrosoftVSTSSchedulingStartDateYearMonthDate, CONSTRAINED).Count = 1,
STRTOSET(@.MicrosoftVSTSSchedulingStartDateYearMonthDate, CONSTRAINED), [Microsoft_VSTS_Scheduling_StartDate].[Year Month Date].currentmember ), IIF( STRTOSET(@.MicrosoftVSTSSchedulingFinishDateYearMonthDate, CONSTRAINED).Count = 1, STRTOSET(@.MicrosoftVSTSSchedulingFinishDateYearMonthDate, CONSTRAINED), [Microsoft_VSTS_Scheduling_FinishDate].[Year Month Date].currentmember ) ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

|||

hi Darrel,

I copy the query that you changed but doesnt work, but after I make some changes, its works. This make sense ? tks Wink

BEFORE CHANGES

with

member [Measures].[codProject] as'iif(IsEmpty(Measures.[Valor Total]),NULL,[Project].Properties("key"))'

AFTER

with

member [Measures].[ProjectCode] as '[Project].Properties("key")'

member [Measures].[codProject] as'iif(IsEmpty(Measures.[Valor Total]),NULL, Measures.[ProjectCode] )'

Tritech Informática
Brasilia
Brasilsql

Monday, March 19, 2012

Differentiate between fields of TWO Datasets in a single report

Dear ppl,

I have got 2 datasets D1 & D2 in a Report. How can i differentiate between the fields of these two.

e.g. I got Name field in both the datasets. So when i do =Fields!Name.Value in a textbox the report gives me error

How can i tell the report from which dataset to pick up the field ?

Regards

Nabeel

Is your textbox inside a Data Region (List, or Table), Or is it placed independently on the form?If is placed independently on the form you would have to reference it using an aggregate expression, using the following format.

=First(Fields!Name.Value, “Scope”)

Scope being then name of the Dataset.

Hope this helps!!!

Roberto Hernández-Pou
http://community.rhphconsulting.net

|||

Normally the text box will be nested in a list control which has a dataset property (when dataset has multiple rows).

Alterantively if you just put the textbox directly into the body of the report, you can use an aggregation function which takes the dataset name as the second parameter e.g.

=First(Fields!Name.Value, "DataSetName")

|||

Hello Nabeel,

Try the following syntax: =(Fields!Name.Value, "Put the name of your dataset here including the quotes")

Regards,
Worf
|||

cheers guys..thanx for the help

||| why the aggregate function is required for the differentiation. cant it just differentiate with the name?|||

It's all to do with context.

Usually, you have an expression such as =Fields!x.Value or =Sum(Fields!x.Value) in a textbox of a matrix, table, or list. Each of these controls needs a dataset property to be specified. This sets the context and hence the dataset from which the field is sourced. This can be overridden within an aggregate function by explicitly specifying the scope of the aggregate. This can either be the name of a group (within the current table or matrix) or an entirely separate dataset.

So in answer to your queation, an aggregate function is not in fact required just to specify the dataset. The dataset is normally inherited from a parent control. If no aggregate function is specified for a cell that is aggregated (groupped) then the First function is applied by default.

Differentiate between fields of TWO Datasets in a single report

Dear ppl,

I have got 2 datasets D1 & D2 in a Report. How can i differentiate between the fields of these two.

e.g. I got Name field in both the datasets. So when i do =Fields!Name.Value in a textbox the report gives me error

How can i tell the report from which dataset to pick up the field ?

Regards

Nabeel

Is your textbox inside a Data Region (List, or Table), Or is it placed independently on the form?If is placed independently on the form you would have to reference it using an aggregate expression, using the following format.

=First(Fields!Name.Value, “Scope”)

Scope being then name of the Dataset.

Hope this helps!!!

Roberto Hernández-Pou
http://community.rhphconsulting.net

|||

Normally the text box will be nested in a list control which has a dataset property (when dataset has multiple rows).

Alterantively if you just put the textbox directly into the body of the report, you can use an aggregation function which takes the dataset name as the second parameter e.g.

=First(Fields!Name.Value, "DataSetName")

|||

Hello Nabeel,

Try the following syntax: =(Fields!Name.Value, "Put the name of your dataset here including the quotes")

Regards,
Worf|||

cheers guys..thanx for the help

||| why the aggregate function is required for the differentiation. cant it just differentiate with the name?|||

It's all to do with context.

Usually, you have an expression such as =Fields!x.Value or =Sum(Fields!x.Value) in a textbox of a matrix, table, or list. Each of these controls needs a dataset property to be specified. This sets the context and hence the dataset from which the field is sourced. This can be overridden within an aggregate function by explicitly specifying the scope of the aggregate. This can either be the name of a group (within the current table or matrix) or an entirely separate dataset.

So in answer to your queation, an aggregate function is not in fact required just to specify the dataset. The dataset is normally inherited from a parent control. If no aggregate function is specified for a cell that is aggregated (groupped) then the First function is applied by default.

Wednesday, March 7, 2012

Different target links for link in the same report

I spent quite a bit of time trying work around this problem. Can
anypne help me with this?
I have several reports that I want to sort on the Column. When I sort
on the Column I call the same report and pass the parameters back to
and just change the Order by clause to the Column name. In the case
when I call the report I want it to appear in the same window. So I
use Target=_top.
On another field on the report I want the report to open in a new
window. Even if I set the URL to RC:Target=_blank it still opens in
the Parent window. If I user Target=_blank when calling the main
report, then all links open in new windows including when I sort on a
column.
Thanks
TomIn the current version of reporting services, all link targets for drill
through hyperlinks must have the same target value. It can only be set on
the parent report using rc:LinkTarget.
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"tmcgrath" <tmcgrath@.vhb.com> wrote in message
news:9e370943.0408161035.3d7471cc@.posting.google.com...
> I spent quite a bit of time trying work around this problem. Can
> anypne help me with this?
> I have several reports that I want to sort on the Column. When I sort
> on the Column I call the same report and pass the parameters back to
> and just change the Order by clause to the Column name. In the case
> when I call the report I want it to appear in the same window. So I
> use Target=_top.
> On another field on the report I want the report to open in a new
> window. Even if I set the URL to RC:Target=_blank it still opens in
> the Parent window. If I user Target=_blank when calling the main
> report, then all links open in new windows including when I sort on a
> column.
> Thanks
> Tom|||I've tried adding javascript into the Jump to URL field but whenever I click
the links nothing happens... nothing at all. My Java is on at least on my
local machine... i don't know about the actual report server, otherwise
certain parts of the web site I'm working on wouldn't work at all. Would it
be the settings on the report server or just something I seem to have missed
here?
"Nikola Tepper" wrote:
> Look at my post from 8/26:
> I think I have a solution. If you want a particular link to be opened in a
> new window, enter this into the "Jump to URL" field:
> javascript:if(window.open(yourPage.aspx','RsWindow','width=400,height=500,location=0,menubar=0,status=0,toolbar=0,scrollbars=1',true)){}
> Just play with the javascript, and you can direct the link into any frame
> you like, although you have to keep in mind security measures for iframes and
> frames
>
> "Bryan Keller [MSFT]" wrote:
> > In the current version of reporting services, all link targets for drill
> > through hyperlinks must have the same target value. It can only be set on
> > the parent report using rc:LinkTarget.
> >
> > --
> > Bryan Keller
> > Developer Documentation
> > SQL Server Reporting Services
> >
> > A friendly reminder that this posting is provided "AS IS" with no
> > warranties, and confers no rights.
> >
> >
> > "tmcgrath" <tmcgrath@.vhb.com> wrote in message
> > news:9e370943.0408161035.3d7471cc@.posting.google.com...
> > > I spent quite a bit of time trying work around this problem. Can
> > > anypne help me with this?
> > > I have several reports that I want to sort on the Column. When I sort
> > > on the Column I call the same report and pass the parameters back to
> > > and just change the Order by clause to the Column name. In the case
> > > when I call the report I want it to appear in the same window. So I
> > > use Target=_top.
> > > On another field on the report I want the report to open in a new
> > > window. Even if I set the URL to RC:Target=_blank it still opens in
> > > the Parent window. If I user Target=_blank when calling the main
> > > report, then all links open in new windows including when I sort on a
> > > column.
> > >
> > > Thanks
> > > Tom
> >
> >
> >

Different sort orders

I have a report in which I sort out the top x customers withs best revenue.
Here I have sort on total revenue field.
But when i toggle the customer I need to get the data sorted by period
instead of revenue so that they can see how the different periods went.
Is it possible to have another sort order for the details than for the group
view ?
JackIn you table properties, you can sort the table using the sort tab, then also
use the group tab, edit the group you want to sort and set the sort on the
sort tab within the group.
--
U. Tokklas
"Jack Nielsen" wrote:
> I have a report in which I sort out the top x customers withs best revenue.
> Here I have sort on total revenue field.
> But when i toggle the customer I need to get the data sorted by period
> instead of revenue so that they can see how the different periods went.
> Is it possible to have another sort order for the details than for the group
> view ?
> Jack
>
>

Different Size Columns in Different Table Rows?

I'm trying to recreate something that I could do in Crystal Reports and have
hit a wall with Report Designer.
I want to create two (or more) header rows and two (or more) detail rows
with each column width different from the column width from the row above
(or below). I found how to add more header and detail rows but the column
widths remain the same for each row and cannot be adjusted separately. What
I'd like to to is to "merge" table columns for one report row into just one
column with the other row remaining as two columns.
For example, I want a report where the first row of detail contains multiple
columns that contains information about a database column, but then the next
detail row should only contain ONE column.
Type of Note Date of Note Author of Note
Note Text
---
Addendum 10/17/07 Shakespeare
This is the text of the note of an addendum written by Shakespeare
Is there a way to do this with RS, or is there some workaround?
Thanks for any help.Never mind (again) ;) I found the Merge Cells right-click command.
"Don Miller" <nospam@.nospam.com> wrote in message
news:%23HQrXMNEIHA.4752@.TK2MSFTNGP04.phx.gbl...
> I'm trying to recreate something that I could do in Crystal Reports and
> have hit a wall with Report Designer.
> I want to create two (or more) header rows and two (or more) detail rows
> with each column width different from the column width from the row above
> (or below). I found how to add more header and detail rows but the column
> widths remain the same for each row and cannot be adjusted separately.
> What I'd like to to is to "merge" table columns for one report row into
> just one column with the other row remaining as two columns.
> For example, I want a report where the first row of detail contains
> multiple columns that contains information about a database column, but
> then the next detail row should only contain ONE column.
> Type of Note Date of Note Author of Note
> Note Text
> ---
> Addendum 10/17/07 Shakespeare
> This is the text of the note of an addendum written by Shakespeare
> Is there a way to do this with RS, or is there some workaround?
> Thanks for any help.
>

Different results when updating a cube

I've updated an OLAP cube and I can see the new cell value in my report.

But I was surprised when I tried to execute a MDX against the changes I made and compared it with the data of my cube in the reportin-Services.

I updated a cube cell with the value of 1

The report showed - in fact - 1; but the MDX-query got 0.99999 back.

Why is their a different?

Any idea?

Florian

If the cell you updated was not right down at the leaf level, then AS would have split up the value you were allocating across all the leaf level cells under the one that you updated. My guess is that this has most likely resulted in a small rounding error. The report is probably just set to format to a given number of decimal places an is rounding up.

Different results same query between original and copied db

Hi all,

I restored a backup of a database running SQL Server in W2K to my own laptop (Windows XP) for report testing pourposes. The restore worked perfectly, but when I ran the store procedure that returns my "report" set I noticed that several of the fields within the result set are different, the number of rows and customers are a perfect match to the production report. The fields that are different are calculated fields that invoque a user defined function, which again are exactly the same on both databases. I tried dropping the stored procedure and the 4 functions and recreating them again but I get the same results, the number of rows, the customers and all "non" function calculated fields are perfect, only the fields calculated with the functions are wrong.

Has anybody seen this behavior?

Thanks for your help

Luis Torresdo u have Nondeterministic Functions like rand() ..??|||nope, but I solved the problem, I didnt have the service pack 3 installed on my laptop and after installing it everything worked perfect.

Thanks for your help :)

Luis Torres|||would like to know wat SP3 did !!!|||Yeah, I would love to, I like the solution better when I understand the problem

Saturday, February 25, 2012

Different reportparameters for same dimension in different cube

Hi,

I have 1 report with 2 charts, both charts have their own dataset. The two datasets are mdx queries on 2 different cubes, but some dimensions have the same name.

Now I want to have 2 differenent selectable parameters for the [dim time] dimension. One for the first query in the first cube and the second for the other query in the other cube .

So I check in the mdx query builder, both dimensions as parameter, but because both dimensions have the same name, i have only one selectable [dim time] -parameter in my report.

How can i solve this?

Thanks,

Dennis

Dear Dennis

Please help me to pass a parameter thru reportbulder to get drill down from report1 to jump into report2 . I created report1 and report 2. I want to jump into report 2 using parameter . I am getting one error when I run the report1 after giving drill throu in property page of the report in reportBulder

"Query Parameter missing " . Please help me

regards

Polachan

|||

Hi Dennis,

You can solve this by mapping a second parameter to the dataset.

Under Report > Report Parameters, Add a new parameter.

Create a new name and copy over the rest of the information from the parameter created by the MDX designer.

Within the properties of the second dataset (click the ellipses next to the DataSet name), modify the Parameters Value to point at the new parameter you just created.

That should give you two parameters, each mapped to the appropriate dataset.

HTH,

Jessica