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

Thursday, March 29, 2012

Dynamic Server Path

I have images shown on a report that are stored on a server.
Problem is when developing the server path is different from my live server.
So whenever we deploy the report on the server i have to make a change
manually to the path of the images...i need to make this dynamic.
How can i do this...can i do this in config file. If so how can i set value
in config file(which one specific) and how can i access it in the report.
Any help appreciated...thanks
Sunny.Hi,
I would suggest you include all your images in your "Report project" so that
whenever you deploy all these images will get deployed.
Amarnath
"Sunny" wrote:
> I have images shown on a report that are stored on a server.
> Problem is when developing the server path is different from my live server.
> So whenever we deploy the report on the server i have to make a change
> manually to the path of the images...i need to make this dynamic.
> How can i do this...can i do this in config file. If so how can i set value
> in config file(which one specific) and how can i access it in the report.
> Any help appreciated...thanks
> Sunny.
>|||You can use an expression in the url and the variable
"Globals!ReportServerUrl" to make it dynamically.
Maran
"Sunny" wrote:
> I have images shown on a report that are stored on a server.
> Problem is when developing the server path is different from my live server.
> So whenever we deploy the report on the server i have to make a change
> manually to the path of the images...i need to make this dynamic.
> How can i do this...can i do this in config file. If so how can i set value
> in config file(which one specific) and how can i access it in the report.
> Any help appreciated...thanks
> Sunny.
>

Dynamic Row Level Security

Hi,
Is it possible to configure Reporting Services 2005 so that the same report
will apply different data filters depending on the user running the report ?
i.e A German user will only see German data and an English user will only
see English data even if they enter a parameter for 'All Europe'.
Thanks.RS supports a property User!UserID which returns the identity of the
interactive user (assuming Windows authentication). You can pass the user
identity to the data source as a query parameter to implement data filtering
at the data source.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
"Duncan Allen" <DuncanAllen@.discussions.microsoft.com> wrote in message
news:B76E2612-99F1-490B-AFBF-E11B5280BE43@.microsoft.com...
> Hi,
> Is it possible to configure Reporting Services 2005 so that the same
> report
> will apply different data filters depending on the user running the report
> ?
> i.e A German user will only see German data and an English user will only
> see English data even if they enter a parameter for 'All Europe'.
> Thanks.

Dynamic reports

Yooo... I'm trying to build a dynamic report with Reporting Services. The problem is that I have a stored procedure that returns a different number of columns with different name for the columns almost each time. So... how can I get dynamic the number and the name of the columns at runtime.

He is an example of the SP:

CREATE PROCEDURE [dbo].[Test]
@.nrCol INT
, @.CarCol CHAR(5)
AS
CREATE TABLE #Part(DenPart CHAR(10))
DECLARE @.i INT
SET @.i = 0
WHILE @.i < @.nrCol
BEGIN
EXEC('ALTER TABLE #Part ADD [' + @.CarCol + @.i + '] NUMERIC(18,2) NOT NULL DEFAULT(0)')
SET @.i = @.i + 1
END
INSERT INTO #Part (DenPart) VALUES('A')
INSERT INTO #Part (DenPart) VALUES('B')
SELECT * FROM #Part

Any ideeas?

Thanks

I wont think we can use the above stored procedure. To develop a report we need to have a result set at design time. Report need to know what are the data fields at design time.sql

dynamic reporting

Hi Experts...
I want to create report on the fly, for given mdx query , I mean without
having a pre build report format, and I am using FoodMart 2000 sample
database.
pls give me some ideas.....
Thanks in Advance...If I understand what you mean correctly (and using RS) . . . . . I guess
you'd need to create the RDL file dynamically and have it executed
(I think) 8^)
- peteZ
"Sumudu Prasad" <sumudu@.logicalasia.com> wrote in message
news:uo%23XGEhmEHA.512@.TK2MSFTNGP10.phx.gbl...
> Hi Experts...
> I want to create report on the fly, for given mdx query , I mean without
> having a pre build report format, and I am using FoodMart 2000 sample
> database.
> pls give me some ideas.....
> Thanks in Advance...
>
>

Dynamic report with several datasources

Hello,

I am currently working with SQL 2005 Reporting Services and MS Visual studio 2005.

In my SQL server I have data about organizations, so that each organization's data is stored in an individual database.
In addition, the number of organizations/databases is variable. I know the number of organizations and the name of each one (that it agrees with the name of its database)
because there is a database (organizationsDB) with a table (organizationsTB) containing the list of the organizations.

So, It would be possible to create a report containing a summary of each organization? .... for example a table in which each row contains data of each organization.

Could you give me any ideas?

Thanks in advance!

You could probably do something with a stored procedure, temp tables and some dynamic sql... eg.

DECLARE @.sql as varchar(8000)

DECLARE @.mydbname

DECLARE @.tempTable TABLE

{
-- insert table schema for org summary here
}

-- insert cursor to populate each database name from the table

Set @.Sql = 'Insert into @.tempTable Select * from ' + @.mydbname + '.dbo.Mytable'

EXEC(@.Sql)

-- loop cursor

-- display on report.

Select * from @.tempTable

I'm not a fan of cursors but that should work.

cheers,

Andrew

|||

Hello,

I am trying the solution that Andrew proposed but I got this Error: Must declare the scalar variable @.tempTable

The stored procedure code is the following:

ALTER PROCEDURE [dbo].[usp_GetListOrganizations]

AS

BEGIN

SET NOCOUNT ON;

DECLARE @.sql as varchar(8000);

DECLARE @.mydbname as varchar(50);

DECLARE @.tempTable as TABLE(SumMaxSize bigint NOT NULL,SumActualSize bigint NOT NULL, NumberOfUsers int NOT NULL);

-- insert cursor to populate each database name from the table

Declare myCursor Cursor For SELECT DomainName FROM domainsDB.dbo.domainsTB

Open myCursor

Fetch Next From myCursor

Into @.mydbname

While @.@.FETCH_STATUS = 0

Begin

Set @.Sql = 'Insert into @.tempTable Select COUNT(MaxSize) AS SumMaxSize, COUNT(ActualSize) AS SumActualSize, COUNT(SamName) AS NumberOfUsers from [' + @.mydbname + '].[dbo].[Users]'

EXEC(@.Sql)

-- loop cursor

Fetch Next From myCursor

Into @.mydbname

End

Close myCursor

SELECT * FROM @.tempTable

END

what is wrong? Could you help me?

Thanks in advance!

|||

...I have proved to use sp_executesql too:

Set @.Sql = 'Insert into ' + @.tempTable + ' Select COUNT(MaxSize) AS SumMaxSize, COUNT(ActualSize) AS SumActualSize, COUNT(SamName) AS NumberOfUsers from [' + @.mydbname + '].[dbo].[Users]'

EXEC sp_executesql @.Sql, N'@.tempTable TABLE, @.mydbname varchar(50)', @.tempTable, @.mydbname

But result is 'Must declare the scalar variable @.tempTable' twice

Thanks!

|||

Unfortunately that won't work very well since it's running in a different memory space.

What about

INSERT INTO @.tempTable

EXEC(@.Sql)

where @.Sql is the dynamic select SQL you are working with?

Alternatively, you could use a physical table and some sort of common identifier like user id + datetime.

Hope this works. Also check syntax on @.tempTable declaration. Not sure if it is correct.

cheers,

Andrew

Dynamic Report Title and keeping it centered

I have a text box in a header for my report title, its reads something like this:

=RTRIM( Parameters!state.Value) + " Summary of Total Trust Assets - Sorted by Industry"

Although I have the textbox centered in the page, since the state.value is dynamic the lenght of the state name could be different than throwing off how centered the title appears? I am pulling my hair out trying to figure out a solution and would greatly appreciate any help or knowledge people might pass on.

Thanks

Duane

Center the textbox horizontally on the page, and also center the text inside the textbox (center justified). It should work.

Dynamic Report Subscriptions

I'm using Reporting Services 2003 and I'm trying to set up a Subscription
whereby the report is kicked off and sent on email when and only when data is
updated on the server. Any suggestions?Chad,
I believe you may be able to do this using data driven subscriptions.
See:
http://msdn2.microsoft.com/en-us/library/ms169673.aspx
o
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_92ex.asp?frame=true
p.s. I am assuming you meant Reporting Services 2005!
regards
Wozza
"Chad Webber" wrote:
> I'm using Reporting Services 2003 and I'm trying to set up a Subscription
> whereby the report is kicked off and sent on email when and only when data is
> updated on the server. Any suggestions?|||I did mean 2005 and thanks, the information did help. I was able to get my
subscription set up and working the way I wanted.
"Wozza" wrote:
> Chad,
> I believe you may be able to do this using data driven subscriptions.
> See:
> http://msdn2.microsoft.com/en-us/library/ms169673.aspx
> or
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_92ex.asp?frame=true
> p.s. I am assuming you meant Reporting Services 2005!
> regards
> Wozza
> "Chad Webber" wrote:
> > I'm using Reporting Services 2003 and I'm trying to set up a Subscription
> > whereby the report is kicked off and sent on email when and only when data is
> > updated on the server. Any suggestions?

Dynamic report parameters

hells
Does anyone know a way to set up a report with two parameters that the
user can select, where one parameter's populated with data depending on
what's selected in the other parameter?
I'm doing a report of some questionnaire data. I want to let the user
select a question, then select one of the possible responses to that
question. The report will then display answers to *all* questions from
people that gave the selected response to the selected question.
I thought maybe I could use subreports to do this but can't seem to get
that working.
Help much appreciated!
NickTake a look at cascading parameters described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rscreate/htm/rcr_creating_interactive_v1_50fn.asp
nthompson@.gmail.com wrote:
> hells
> Does anyone know a way to set up a report with two parameters that the
> user can select, where one parameter's populated with data depending on
> what's selected in the other parameter?
> I'm doing a report of some questionnaire data. I want to let the user
> select a question, then select one of the possible responses to that
> question. The report will then display answers to *all* questions from
> people that gave the selected response to the selected question.
> I thought maybe I could use subreports to do this but can't seem to get
> that working.
> Help much appreciated!
> Nick|||Excellent. I'll have a read. Many thankssql

Dynamic report on screen vs. export

I was wondering if it's possible to display a report, but export an expanded version of that report? For instance if I have a report with, say, 6 columns, when the user exports to Excel I want to export 12 columns (6 that were displayed plus 6 additional columns). I tried hiding the additional columns, but they're also hidden in the export. I ended-up creating a separate report all together for exporting, but this is confusing to the user. Is something like this even possible?

Unfortunately renderer-specific formatting adjustments are not supported. You will probably need to construct two versions of the same report (one with the extra columns) and instruct your users to use the appropriate one for the output format.

Dynamic Report Name at run time?

Hi Friends,

Is it possible to give a name at run time to a report when we try to download it in any format.

Do we have any control over the report name for e.g. the report name can be passed at parameter value.

Thanks,
Novin

Provide an example of the first five report names.

|||Hi,

I have created on single dynamic report name as "Generic Report" which will serve the need of 5 diff reports,

Where we go one by one report from the drill down from report no1 to 2 to 3 and....5 and all these 5 reports are generated using the single dynamic general report.

Problem is when ever at any report level i try to download the report its name remain the same as "Generic Report".

but I want the name to be parameteries based on the report level.

Hope you understood my probelm now.

Thanks

Novin

Dynamic Report Name at run time?

Hi Friends,

Is it possible to give a name at run time to a report when we try to download it in any format.

Do we have any control over the report name for e.g. the report name can be passed at parameter value.

Thanks,
Novin

Provide an example of the first five report names.

|||Hi,

I have created on single dynamic report name as "Generic Report" which will serve the need of 5 diff reports,

Where we go one by one report from the drill down from report no1 to 2 to 3 and....5 and all these 5 reports are generated using the single dynamic general report.

Problem is when ever at any report level i try to download the report its name remain the same as "Generic Report".

but I want the name to be parameteries based on the report level.

Hope you understood my probelm now.

Thanks

Novin

dynamic report header and detail

I am building a report which has 7 columns. Mon thru Sun. The header and data columns are dynamic

For ex the report looks like

Mon Tue Wed Thu Fri Sat Sun

-- - -- - --

2 2 4 2 4 5 6

0 7 6 7 9 4 2

The report header and data are dynamic. The seq of columns,data is not always the same. It could be Tue thru Mon., or Fri thru Thru...etc...

Please advice how to program this dynamic nature of the report

This is a matrix report with a group on day of the week.

Tuesday, March 27, 2012

dynamic report header and detail

I am building a report which has 7 columns. Mon thru Sun. The header and data columns are dynamic

For ex the report looks like

Mon Tue Wed Thu Fri Sat Sun

-- - -- - --

2 2 4 2 4 5 6

0 7 6 7 9 4 2

The report header and data are dynamic. The seq of columns,data is not always the same. It could be Tue thru Mon., or Fri thru Thru...etc...

Please advice how to program this dynamic nature of the report

This is a matrix report with a group on day of the week.sql

Dynamic Report Columns..?

I have a stored procedure that outputs a dynamic resultset with an unknown number of columns...

So, the resultset might look like:

RowId 03/16/2006 03/17/2006 03/18/2006 03/19/2006
Run of House 02 10 20 35
Suites 05 30 05 15

Or it could look like:

RowId 03/16/2006 03/17/2006
Run of House 02 10
Suites 05 30

Or perhaps:

RowId 03/16/2006 03/17/2006 03/18/2006 03/19/2006 03/20/2006 03/21/2006 03/22/2006
Run of House 02 10 20 35 10 15 45
Suites 05 30 05 15 05 10 80

I need a way that I can run a report that displays these results the from the stored procedure without having to know the number of columns. Is this possible..? If so, can you explain how this can be done in SSRS...

Thanks

the matrix component should fulfill your needs

its like a table but expanding horizontally
but its also a bit more tricky, as you will see

greets
gerhard

Dynamic report

Hello,
How can I got dynamic report? My question is: the report did not
automatically show a refreshed version of report unless you manully clicke
refresh button
Thanks in advance!
SandraReport has AutoRefresh property that you can set in report designer.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"tony" <itdong@.hotmail.com> wrote in message
news:#kMTyqIYFHA.3032@.TK2MSFTNGP10.phx.gbl...
> Hello,
> How can I got dynamic report? My question is: the report did not
> automatically show a refreshed version of report unless you manully
clicke
> refresh button
> Thanks in advance!
> Sandra
>

Dynamic report

Hi all,
I want to create a dynamic report by using code, for ex a report with dynamic column , but dont know where to start and which method is best.
Could you show me some examples about this ?
ThanksThere's a dll that I use called p2smon.dll. This dll has 2 functions:

From scr8_ttxado.pdf which can be found by searching http://support.businessobjects.com/search/advsearch.asp

Using Active Data driver functions

The Active Data driver P2smon.dll (Pdsmon.dll for 16-bit) has two functions that create a TTX file based on a recordset that exists in the VB project. This is the preferred method to create a Data Definition file, as the TTX file will always match the recordset (or vice versa). The two functions available in the DLL are:

CreateFieldDefFile() - Creates a TTX file at runtime based on a recordset.

CreateReportOnRuntimeDS() - Creates a TTX file at runtime based on a recordset. A report (RPT) file is also created off the new TTX file, and there is an option to open the RPT file in the Crystal Reports designer.

These functions are purely for development purposes (they are not required at runtime).

NOTE CreateReportOnRuntimeDS( ) does not place any fields on the report. A blank report is created instead.

The function declarations for CreateFieldDefFile() and CreateReportOnRuntimeDS() are as follows:

CreateFieldDefFile()

Declare Function CreateFieldDefFile Lib "p2smon.dll"(lpUnk As Object, ByVal fileName As String, ByVal bOverWriteExistingFile As Long) As Long

Parameter Description

- LpUnk The active data source used to create the field definition file. In C or C++, this is a pointer to an IUnknown derived COM interface relating to a DAO or ADO Recordset. In Visual Basic, this is a Recordset or Rowset object.

- Filename The path and file name of the field definition file to be created.

- bOverWriteExistingFile If a field definition file already exists with the specified path and file name, this flag indicates whether or not to overwrite that file.

CreateReportOnRuntimeDS()

Declare Function CreateReportOnRuntimeDS Lib "p2smon.dll" ( lpUnk As Object, ByVal reportFile As String, ByVal fieldDefFile As String, ByVal bOverWriteFile As Long, ByVal bLaunchDesigner As Long) As Long

Parameter Description

- LpUnk The active data source used to create the field definition file. In C or C++, this is a pointer to an Iunknown derived COM interface relating to a DAO or ADO Recordset. In Visual Basic, this is a Recordset or Rowset object.

- ReportFile The path and file name of the report file to be created.

- FieldDefFile The path and file name of the field definition file to be created.

- BoverWriteFile If a field definition file already exists with the specified path and file name, this flag indicates whether or not to overwrite that file.

- BlaunchDesigner If True (1), Crystal Reports is launched with the newly created report file opened. Crystal Reports must be installed on the system.

NOTE Since a TTX file is a tab-separated text file, it can be manually created or edited using Microsoft Notepad or any other text editor. This method is not recommended for creating TTX files due to possible typing errors.sql

Dynamic report

Dear all,
I want to create a dynamic report so that I can change some field quickly.
For example: in future, if Field {Report ID} on report header is replaced by {Running User ID}. How can I do once for all reports.
Many thanksWill this work? The idea is to only maintain data in the table.

1. setup a database table that contains user-id and names etc.
2. create a string variable in the report for display.
3. write a routine to detect for the requires condition and pull data off the table.
4. for each report, plug in the same codes created in step-2.

Hope it works for you.

Dynamic refresh of report model in the report builder

Is it possible to dynamically refresh the report model of the report builder?

could it even be using code with any of the interfaces?

When we add a table or add a column to the table in database , will the report model get refreshed automatically or do we need to do it externally. If so, can we use any of the objects and write a custom code in VB.

Please review the following threads:

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

Dynamic RDL group title

I'm new to these forums. If this is not the right place to post this question, please let me know where I should ask. :)

Anyway, I have a report that is grouped something like this:

Team

Location

Score

TEAM 1

#Loc#

#Total#

Home

10

Away

14

Away

8

NULL

0

NULL

0

Home

14

TEAM 2

#Loc#

#Total#

Home

10

Away

14

Home

19

NULL

0

Home

14

TEAM 3

#Loc#

#Total#

Away

7

Away

12

For each team grouping, the header columns needs to perform an action on the grouped records to determine the text.

The #Total# header is easy -- here I want a total of the points ( =Sum(Fields!Points.Value) ). No problem.

The #Loc# header is the problem. What I want to do is to count the number of "Home" values in the group (so Team 1 location reads "Home (2 of 6)", and Team 2 location reads "Home (3 of 5)"). If there are no "Home" values, I want to use the "Away" value (so Team 3 location reads "Away (2 of 2)").

Can someone tell me how I can create a custom code function that will allow me to iterate through the values of the grouped records from the group header textbox? I assume I need to be able to create a custom aggregate function of some kind, but I don't quite know where to begin.

Thanks for your help.

Joe

To simplify the question:

How can I make a group header change to reflect the presence of a specific value from a child row? If I have a group that contains the value "X", how can I change the group header to read "X present"?

Dynamic RDL group title

I'm new to these forums. If this is not the right place to post this question, please let me know where I should ask. :)

Anyway, I have a report that is grouped something like this:

Team

Location

Score

TEAM 1

#Loc#

#Total#

Home

10

Away

14

Away

8

NULL

0

NULL

0

Home

14

TEAM 2

#Loc#

#Total#

Home

10

Away

14

Home

19

NULL

0

Home

14

TEAM 3

#Loc#

#Total#

Away

7

Away

12

For each team grouping, the header columns needs to perform an action on the grouped records to determine the text.

The #Total# header is easy -- here I want a total of the points ( =Sum(Fields!Points.Value) ). No problem.

The #Loc# header is the problem. What I want to do is to count the number of "Home" values in the group (so Team 1 location reads "Home (2 of 6)", and Team 2 location reads "Home (3 of 5)"). If there are no "Home" values, I want to use the "Away" value (so Team 3 location reads "Away (2 of 2)").

Can someone tell me how I can create a custom code function that will allow me to iterate through the values of the grouped records from the group header textbox? I assume I need to be able to create a custom aggregate function of some kind, but I don't quite know where to begin.

Thanks for your help.

Joe

To simplify the question:

How can I make a group header change to reflect the presence of a specific value from a child row? If I have a group that contains the value "X", how can I change the group header to read "X present"?