Wednesday, March 28, 2012
return all rows
Here is my query for my report. Can you make this query fetch all rows if
@.myID parameter is null?
SELECT FName, MName, LName, ID
FROM MyTable
WHERE (ID = @.myID) AND (myDate BETWEEN @.StartDate AND @.EndDate)
Thanks,
Jim.write a stored procedure and use an if condition
"JIM.H." wrote:
> Hello,
> Here is my query for my report. Can you make this query fetch all rows if
> @.myID parameter is null?
> SELECT FName, MName, LName, ID
> FROM MyTable
> WHERE (ID = @.myID) AND (myDate BETWEEN @.StartDate AND @.EndDate)
> Thanks,
> Jim.
>|||is it possible without stored procedure?
"NI" wrote:
> write a stored procedure and use an if condition
> "JIM.H." wrote:
> > Hello,
> > Here is my query for my report. Can you make this query fetch all rows if
> > @.myID parameter is null?
> >
> > SELECT FName, MName, LName, ID
> > FROM MyTable
> > WHERE (ID = @.myID) AND (myDate BETWEEN @.StartDate AND @.EndDate)
> >
> > Thanks,
> > Jim.
> >|||Hello Jim
Try to set your "is null" clause in the report settings itself
Ruud Boots
Holland
> SELECT FName, MName, LName, ID
> FROM MyTable
> WHERE (ID = @.myID) AND (myDate BETWEEN @.StartDate AND @.EndDate)
"JIM.H." wrote:
> Hello,
> Here is my query for my report. Can you make this query fetch all rows if
> @.myID parameter is null?
> SELECT FName, MName, LName, ID
> FROM MyTable
> WHERE (ID = @.myID) AND (myDate BETWEEN @.StartDate AND @.EndDate)
> Thanks,
> Jim.
>|||Here is a technique I like for the WHERE clause so that null means "all":
SELECT FName, MName, LName, ID
FROM MyTable
WHERE (ID = @.myID or @.myID is null)
AND myDate BETWEEN @.StartDate AND @.EndDate
I am currently trying to find how to pass a null parameter to a report. If
you know how to pass a null in RS, I would appreciate the feedback.
Thanks.
Randy Howie
--
"Ruud" wrote:
> Hello Jim
> Try to set your "is null" clause in the report settings itself
> Ruud Boots
> Holland
> > SELECT FName, MName, LName, ID
> > FROM MyTable
> > WHERE (ID = @.myID) AND (myDate BETWEEN @.StartDate AND @.EndDate)
> "JIM.H." wrote:
> > Hello,
> > Here is my query for my report. Can you make this query fetch all rows if
> > @.myID parameter is null?
> >
> > SELECT FName, MName, LName, ID
> > FROM MyTable
> > WHERE (ID = @.myID) AND (myDate BETWEEN @.StartDate AND @.EndDate)
> >
> > Thanks,
> > Jim.
> >sql
Friday, March 23, 2012
Retrieving values from a subreport to Body of Parent Report
Also, is there a way to repeat the main page's body when subreport has a page break? ie you page break on some thing in the subreport and need the body and head of the parent report to repeat on subsequent pages.
Thanks,
Garick
I want to do something similar.
I want the value of the amount of records retrieved in the sub report.
The table row that the sub report is in needs to be hidden if the value is not greater than 1.
Can it be done?
|||Jabuka
I think that there's a simple way to do what you want with creating the same dataset that you have in your subreport in the parent one. Then you can evalute the field in your visibility expression.
Hope it helps you
|||Another way is to create a simple assembly (any language in .Net) and have a static (or shared) variable in it. Set the value of this variable in your subreport and refer to that in your main report.
The only problem with this approach is concurrency as you are using a static variable.
Shyam
Retrieving total number of pages
looked at the expression functions and couldn't see anything to do
that.="Page " & Globals!PageNumber & " of " & Globals!TotalPages
Reeves
"Doogie" wrote:
> How do I - inside my report, display the total number of pages? I
> looked at the expression functions and couldn't see anything to do
> that.
>
Wednesday, March 21, 2012
Retrieving scanned images
I have a scenario where I need to retrieve scanned images for a report. The
plan is to have one page showing items submitted from a table and the
remaining pages producing the linked scanned images. the scanned images will
probably be PDF or data held in XML format. I am thinking the jmp to URL
function or something similar will be used here
thank you
Mickeyyou can use the Image item from the toolbox, drag it onto the report and
follow the wizard.
"Mickey N" <MickeyN@.discussions.microsoft.com> wrote in message
news:46EB0E8F-C0D7-498F-82FB-F3AF9C36270E@.microsoft.com...
> Hi all
> I have a scenario where I need to retrieve scanned images for a report.
> The
> plan is to have one page showing items submitted from a table and the
> remaining pages producing the linked scanned images. the scanned images
> will
> probably be PDF or data held in XML format. I am thinking the jmp to URL
> function or something similar will be used here
> thank you
> Mickey
Retrieving Mutiple rows
I have a table like this.
Depositors Table
Value(int) StartDate(Date) AccountID(int)
I want to create a report from this table. the report should look like this.
Value No of Accounts Average Value
For Yesterday
For Last 7days
For Last 30 days
Please Can anyone write a simple query for this?
Thanks
declare @.temptable table (amount decimal(10,2) , duration nvarchar(50),date datetime)
insert into @.temptable(amount,duration,date)
select top 100 sum(grandtotal),
case when saledate = dateadd("d",-1,dateadd("month",0,'07/20/2007')) then 'yesterday' --cast (saledate as nvarchar(30))
when saledate < dateadd("d",-1,dateadd("month",0,'07/20/2007')) and saledate >= dateadd("d",-7,dateadd("month",-1,'07/20/2007')) then 'Last 7 days'
when saledate < dateadd("day",-1,dateadd("month",-1,'07/20/2007')) and saledate >= dateadd("day",-2,dateadd("month",-3,'07/20/2007')) then 'Last month'
when saledate < dateadd("day",-2,dateadd("month",-3,'07/20/2007')) and saledate >= dateadd("d",-1,dateadd("year",-2,'07/20/2007')) then 'Last 1 year'
else '...'
end , saledate
from sale group by saledate order by saledate desc
select sum(amount), duration from @.temptable group by duration order by max(date) desc
Bad formatting but query works..
I checked it..
in my database i have old date so i need to use old date.. but you can use today's date..
|||Thanks..
I tried with this one..But I did not get what I want.
I changed it lil bit.
declare @.temptable table (amount decimal(10,2) , duration nvarchar(50),date datetime)
insert into @.temptable(amount,duration,date)
select sum(Amount),
case when startdate >= GETDATE()-1 then 'yesterday'
when Startdate >= GETDATE()-7 then 'Last 7 days'
when startdate >=GETDATE()-30 then 'Last month'
end , startdate
from CD group by startdate order by startdate desc
select sum(Amount), duration from @.temptable group by duration order by max(date) desc
Query works. But it does not show values for duration. As example, it does not show whether its yesterday , Last7days or etc.
But I want to get the report as shown above.....
|||
shamen wrote:
Thanks..
I tried with this one..But I did not get what I want.
I changed it lil bit.
declare @.temptable table (amount decimal(10,2) , duration nvarchar(50),date datetime)
insert into @.temptable(amount,duration,date)
select sum(Amount),
case when startdate >= GETDATE()-1 then 'yesterday'
when Startdate >= GETDATE()-7 then 'Last 7 days'
when startdate >=GETDATE()-30 then 'Last month'
end , startdatefrom CD group by startdate order by startdate desc
select sum(Amount), duration from @.temptable group by duration order by max(date) descQuery works. But it does not show values for duration. As example, it does not show whether its yesterday , Last7days or etc.
But I want to get the report as shown above.....
declare @.temptable table (amount decimal(10,2) , duration nvarchar(50),date datetime)
insert into @.temptable(amount,duration,date)
select sum(Amount),
case when startdate = dateadd("d",-1,GETDATE()) then 'yesterday'
when Startdate between dateadd("d",-1,GETDATE()) and dateadd("d",-7,GETDATE()) then 'Last 7 days'
when startdate between dateadd("d",-7,GETDATE()) and dateadd("d",-30,GETDATE()) then 'Last month'
Else 'ABC'
end as duration, startdate
from CD group by startdate order by startdate desc
select sum(Amount), duration from @.temptable group by duration order by max(date) desc
May it works now. For testing purpose always keep default value so atlease you can know that condition is going where
Retrieving Mutiple rows
I have a table like this.
Depositors Table
Value(int) StartDate(Date) AccountID(int)
I want to create a report from this table. the report should look like this.
Value No of Accounts Average Value
For Yesterday
For Last 7days
For Last 30 days
Please Can anyone write a simple query for this?
Thanks
declare @.temptable table (amount decimal(10,2) , duration nvarchar(50),date datetime)
insert into @.temptable(amount,duration,date)
select top 100 sum(grandtotal),
case when saledate = dateadd("d",-1,dateadd("month",0,'07/20/2007')) then 'yesterday' --cast (saledate as nvarchar(30))
when saledate < dateadd("d",-1,dateadd("month",0,'07/20/2007')) and saledate >= dateadd("d",-7,dateadd("month",-1,'07/20/2007')) then 'Last 7 days'
when saledate < dateadd("day",-1,dateadd("month",-1,'07/20/2007')) and saledate >= dateadd("day",-2,dateadd("month",-3,'07/20/2007')) then 'Last month'
when saledate < dateadd("day",-2,dateadd("month",-3,'07/20/2007')) and saledate >= dateadd("d",-1,dateadd("year",-2,'07/20/2007')) then 'Last 1 year'
else '...'
end , saledate
from sale group by saledate order by saledate desc
select sum(amount), duration from @.temptable group by duration order by max(date) desc
Bad formatting but query works..
I checked it..
in my database i have old date so i need to use old date.. but you can use today's date..
|||Thanks..
I tried with this one..But I did not get what I want.
I changed it lil bit.
declare @.temptable table (amount decimal(10,2) , duration nvarchar(50),date datetime)
insert into @.temptable(amount,duration,date)
select sum(Amount),
case when startdate >= GETDATE()-1 then 'yesterday'
when Startdate >= GETDATE()-7 then 'Last 7 days'
when startdate >=GETDATE()-30 then 'Last month'
end , startdate
from CD group by startdate order by startdate desc
select sum(Amount), duration from @.temptable group by duration order by max(date) desc
Query works. But it does not show values for duration. As example, it does not show whether its yesterday , Last7days or etc.
But I want to get the report as shown above.....
|||
shamen wrote:
Thanks..
I tried with this one..But I did not get what I want.
I changed it lil bit.
declare @.temptable table (amount decimal(10,2) , duration nvarchar(50),date datetime)
insert into @.temptable(amount,duration,date)
select sum(Amount),
case when startdate >= GETDATE()-1 then 'yesterday'
when Startdate >= GETDATE()-7 then 'Last 7 days'
when startdate >=GETDATE()-30 then 'Last month'
end , startdatefrom CD group by startdate order by startdate desc
select sum(Amount), duration from @.temptable group by duration order by max(date) descQuery works. But it does not show values for duration. As example, it does not show whether its yesterday , Last7days or etc.
But I want to get the report as shown above.....
declare @.temptable table (amount decimal(10,2) , duration nvarchar(50),date datetime)
insert into @.temptable(amount,duration,date)
select sum(Amount),
case when startdate = dateadd("d",-1,GETDATE()) then 'yesterday'
when Startdate between dateadd("d",-1,GETDATE()) and dateadd("d",-7,GETDATE()) then 'Last 7 days'
when startdate between dateadd("d",-7,GETDATE()) and dateadd("d",-30,GETDATE()) then 'Last month'
Else 'ABC'
end as duration, startdate
from CD group by startdate order by startdate desc
select sum(Amount), duration from @.temptable group by duration order by max(date) desc
May it works now. For testing purpose always keep default value so atlease you can know that condition is going where
Retrieving multiple values from one field in SQL Server for use in multiple columsn in Reports
I am trying to create a report using Reporting Services.
My problem right now is that the way the table is constructed, I am trying to pull 3 seperate values i.e. One is the number of Hours, One is the type of work, and the 3rd is the Grade, out of one column and place them in 3 seperate columns in the report.
I can currently get one value but how to get the information I need to be able to use in my reports.
So far what I've been working with SQL Reporting Services 2005 I love it and have made several reports, but this one has got me stumped.
Any help would be appreciated.
Thanks.
I might not have made my problem quite clear enough. My table has one column labeled value. The value in that table is linked through an ID field to another table where the ID's are broken down to one ID =Number of Hours, One ID = Grade and One ID= type of work.
What I'm trying to do is when using these ID's and seperate the value related to those ID's into 3 seperate columns in a query for using in Reporting Services to create the report
As you can see, I'm attempting to change the name of the same column 3 times to reflect the correct information and then link them all to the person, where one person might have several entries in the other fields.
As you can see I can change the names individually in queries and pull the information seperately, it's when roll them altogether is where I'm running into my problem
Thanks for the suggestions that were made, I apoligize for not making the problem clearer.
Here is a copy of what I'm attempting to accomplish. I didn't have it with me last night when posting.
--Pulls the Service Opportunity
SELECT cs.value AS "Service Opportunity"
FROM Cstudent cs
INNER JOIN cattribute ca ON ca.attributeid = cs.attributeid
WHERE ca.name = 'Service Opportunity'
--Pulls the Number of Hours
SELECT cs.value AS 'Number of Hours'
FROM Cstudent cs
INNER JOIN cattribute ca ON ca.attributeid =cs.attributeid
WHERE ca.name ='Num of Hours'
--Pulls the Person Grade Level
SELECT cs.value AS 'Grade'
FROM Cstudent cs
INNER JOIN cattribute ca ON ca.attributeid =cs.attributeid
WHERE ca.name ='Grade'
--Pulls the Person Number, First and Last Name and Grade Level
SELECT s.personnumber, s.lastname, s.firstname, cs.value as "Grade"
FROM student s
INNER JOIN cperson cs ON cs.personid = s.personid
INNER JOIN cattribute ca ON ca.attributeid = cs.attributeid
WHERE cs.value =(SELECT cs.value AS 'Grade'
WHERE ca.attributeid = cs.attributeid AND ca.name='Grade')
There are a number of ways to solve this. Here are a few options:
If each value is in its own row, like this:
Name Value
Hours 100
Type AAA
Grade C
the SQL Pivot statement can be used in your query to pivot the rows to columns, so the result looks like:
Hours Type Grade
100 AAA C
If the values are concatenated in a single column, like:
Column
100;AAA;C
then you can use the Split VB function in the report to split the string into its component parts, and put them into fields. To get the values, you can use the following:
=Split(Fields!Column.Value, ";")(0)
=Split(Fields!Column.Value, ";")(1)
=Split(Fields!Column.Value, ";")(2)
|||It is quite clear from your post that you have all the data in one column in a database table. If you have access to the query or the stored procedure, try to accomplish this in the SQL query level itself because calculating it in reporting service is costlier than doing it in the query level (better if there is a stored procedure becasue it is compiled and faster). Try using this sql query (assuming that your field separator is "," and the order is hours, type and then grade):
CASE WHEN CHARINDEX(',', Column1) > 0
SUBSTRING(Column1, 1, CHARINDEX(',', Column1)-1) AS 'Hours'
END,
CASE WHEN CHARINDEX(',', Column1) > 0
CASE WHEN CHARINDEX(',', SUBSTRING(Column1, CHARINDEX(',', Column1)+1, LEN(Column1)-CHARINDEX(',', Column1))) > 0
SUBSTRING(Column1, CHARINDEX(',', Column1)+1, CHARINDEX(',', SUBSTRING(Column1, CHARINDEX(',', Column1)+1, LEN(Column1)-CHARINDEX(',', Column1)))-1) AS 'Type'
END
END,
CASE WHEN CHARINDEX(',', SUBSTRING(Column1, CHARINDEX(',', Column1)+1, LEN(Column1)-CHARINDEX(',', Column1))) > 0
RIGHT(Column1, CHARINDEX(',', SUBSTRING(Column1, CHARINDEX(',', Column1)+1, LEN(Column1)-CHARINDEX(',', Column1)))+1) AS 'Grade'
END
If your still want to use reporting services, create 3 calculated dataset fields as follows:
Hours: IIf(Split(Fields!Column1.Value, ",").UpperBound>=0, Split(Fields!Column1.Value, ",")(0), "")
Type: IIf(Split(Fields!Column1.Value, ",").UpperBound>=1, Split(Fields!Column1.Value, ",")(1), "")
Grade: IIf(Split(Fields!Column1.Value, ",").UpperBound>=2, Split(Fields!Column1.Value, ",")(2), "")
Shyam
|||John,
Thanks for the suggestion. I guess I didn't make myself very clear on to what I was attempting. I modified my thread and enclosed a sample of what I am attempting to do.
Thanks again for the help
|||Shyam,
Thanks for the advice. I guess I didn't make myself clear enough on what I was attempting to do. I have modifed my thread and enclosed a sample of the code I am trying to make work.
Thanks again
|||Use the following query to get all values at one shot:
SELECT cs1.value AS 'Service Opportunity', cs2.value AS 'Number of Hours', cs3.value AS 'Grade'
FROM Cstudent cs1
INNER JOIN cattribute ca ON ca.attributeid = cs1.attributeid
AND ca.name = 'Service Opportunity'
INNER JOIN Cstudent cs2 ON ca.attributeid = cs2.attributeid
AND ca.name = 'Num of Hours'
INNER JOIN Cstudent cs3 ON ca.attributeid = cs3.attributeid
AND ca.name = 'Grade'
Thanks,
Shyam
|||Shyam,
I've been working with what you suggested but so far with no luck. It pulls the column headings but there is no information in the columns. I'm looking to see if I'm missing something somewhere.
Thanks for the advice though, I'll keep working at it and see what I can come up with.
Thanks
Wayne
|||Maybe not all records are available in Cstudent, so use this query:
SELECT cs1.value AS 'Service Opportunity', cs2.value AS 'Number of Hours', cs3.value AS 'Grade'
FROM cattribute ca
LEFT OUTER JOIN Cstudent cs1
ca ON ca.attributeid = cs1.attributeid
AND ca.name = 'Service Opportunity'
LEFT OUTER JOIN Cstudent cs2 ON ca.attributeid = cs2.attributeid
AND ca.name = 'Num of Hours'
LEFT OUTER JOIN Cstudent cs3 ON ca.attributeid = cs3.attributeid
AND ca.name = 'Grade'
Shyam
|||Shyam
Thanks for the help, Just have to do some more tweaking on my end but looks like it might give me what I'm looking for.
Thanks Again for the Help
Wayne
|||So, can you mark the post as answer?
Shyam
|||Shyam
Thanks for all the help. This was the first post I had done one here so I apoligize for that. It's taken care of and I posted it answered.
Tuesday, March 20, 2012
Retrieving Linked Reports Programatically?
to do this by the linked report name? I only see 4 methods for linked
servers:
CreateLinkedReport
GetReportLink
ListLinkedReports
SetReportLink
None of which I see do any property retreiving. Am I missing
something here?
Any help is appreciated,
FrankGetProperties(), GetReportParameters() as well as some other methods should
work with linked reports.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Stoma_Kalos" <fzuma@.yahoo.com> wrote in message
news:e876e3c8.0409030923.60765863@.posting.google.com...
> How do you get the properties for a linked report? Is it not possible
> to do this by the linked report name? I only see 4 methods for linked
> servers:
> CreateLinkedReport
> GetReportLink
> ListLinkedReports
> SetReportLink
> None of which I see do any property retreiving. Am I missing
> something here?
> Any help is appreciated,
> Frank|||I guess my question is more on the side of Creating Linked Reports
programatically. Using CreateLinkedReport works fine, but for reports
with parameters there does not seem to be a way to connect them to the
Linked Report with its own defaults. Currently, I am playing with
SetReportParameters, but it is awkward and I'm not sure this is the
way to do it.
Basically, for creating a new linked report I am pulling up the report
parameters using GetReportParameters using the Linked Report path.
Then when I call SetReportParameters using the future path of the
Linked Report I am creating.
Does this sound correct or am I on the wrong path? It doesn't seem
that many people are playing around with Linked Reports through code.
Frank
"Lev Semenets [MSFT]" <levs@.microsoft.com> wrote in message news:<#nhcjBfkEHA.536@.TK2MSFTNGP11.phx.gbl>...
> GetProperties(), GetReportParameters() as well as some other methods should
> work with linked reports.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
Friday, March 9, 2012
retrieving >1000 records from AD into Crystal
I am having a couple of problems selecting records from Active Directory. What I want to do is create a report that is grouped on a user object field in AD. Our users are not just contained with the 'Users' container, but also in other areas of the directory.
I've come across the problem that AD will only return the first 1000 records when you query it (mentioned here: http://support.businessobjects.com/library/kbase/articles/c2013533.asp). I believe you can get around this by somehow specifying the 'range' property, however I'm not 100% sure how to do this. This is my query as it stands:
Select displayName, ExtensionAttribute3, ExtensionAttribute2,
sAMAccountName, objectClass FROM 'LDAP://dc=blah,dc=blah2,dc=blah3,dc=blah4;;;Range=0-1000;subtree' WHERE objectClass='user'
Whenever I click OK to this I get the error "An invalid directory pathname was passed".
I guess I actually have 2 questions:
1. How do you get the range property to work (i.e. how can I return more than 1000 rows)
2. How can I get the query to search the subtrees of the directory (I think you need to specify the 'subtree' keyword, but again, this isn't working in my query.
Any help would be appreciated!
Cheers,
DanielIf you dont solve the problem search at http://support.businessobjects.com/
Wednesday, March 7, 2012
Retrieve the .rdl file from the reporting services server
server...
I made a stupid mistake and renamed a report from let say a.rdl to b.rdl
and started to revise the report. Then later on I needed to do some changes
to the published report a.rdl... Though, this file (a.rdl) doesn't exist on
my computer anymore...
Thanks in advance for any tipsHi Andreas:
I'd write an .RSS script file to pull the rdl with the web service.
Look in the books online at the GetReportDefinition method, it even
includes a sample to save the file to disk.
--
Scott
http://www.OdeToCode.com/blogs/scott
On 14 Oct 2004 09:24:17 -0700, akardell@.home.se (Andreas Kardell)
wrote:
>Is it possible to retrieve the ".rdl" file published on the Reporting Services
>server...
>I made a stupid mistake and renamed a report from let say a.rdl to b.rdl
>and started to revise the report. Then later on I needed to do some changes
>to the published report a.rdl... Though, this file (a.rdl) doesn't exist on
>my computer anymore...
>Thanks in advance for any tips|||Wherever the report is deployed, click on the report properties and then
click on the report, the properties tab, the edit link. You will be asked
where you want to save the rdl. Once you have saved the rdl then just add it
back to your project.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Andreas Kardell" <akardell@.home.se> wrote in message
news:67424f9d.0410140824.27a8add8@.posting.google.com...
> Is it possible to retrieve the ".rdl" file published on the Reporting
Services
> server...
> I made a stupid mistake and renamed a report from let say a.rdl to b.rdl
> and started to revise the report. Then later on I needed to do some
changes
> to the published report a.rdl... Though, this file (a.rdl) doesn't exist
on
> my computer anymore...
> Thanks in advance for any tips|||Haha! Yep, I've been doing so much WS stuff lately it seems like it is
always the first solution that springs to mind. Thanks for pointing
that one out, Bruce.
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Thu, 14 Oct 2004 14:19:19 -0500, "Bruce L-C [MVP]"
<bruce_lcNOSPAM@.hotmail.com> wrote:
>Wherever the report is deployed, click on the report properties and then
>click on the report, the properties tab, the edit link. You will be asked
>where you want to save the rdl. Once you have saved the rdl then just add it
>back to your project.|||Thank you Bruce and Scott!
That saved me a lot of trouble! And really simple solution too... those are
the best ones!
//Andreas
Scott Allen <bitmask@.[nospam].fred.net> wrote in message news:<8ueum0lit3nhpv83bs1jkajg4p1pmfj38s@.4ax.com>...
> Haha! Yep, I've been doing so much WS stuff lately it seems like it is
> always the first solution that springs to mind. Thanks for pointing
> that one out, Bruce.
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
> On Thu, 14 Oct 2004 14:19:19 -0500, "Bruce L-C [MVP]"
> <bruce_lcNOSPAM@.hotmail.com> wrote:
> >Wherever the report is deployed, click on the report properties and then
> >click on the report, the properties tab, the edit link. You will be asked
> >where you want to save the rdl. Once you have saved the rdl then just add it
> >back to your project.
Retrieve report parameters names and type programmatically
I need to retrieve a report parameters names and their type ( being
string, list, date etc ) programmatically so i can dynamically assign them.
Can anyone help?
Thanks,use the web service that comes with reporting services ...
the method GetReportParameters is exactly what u need ...
"Loui Mercieca" wrote:
> Hi,
> I need to retrieve a report parameters names and their type ( being
> string, list, date etc ) programmatically so i can dynamically assign them.
> Can anyone help?
> Thanks,
>
>
Saturday, February 25, 2012
Retrieve ONLY the Report Items that a user has permissions for
user has access to, however if the user does not have access to view the home
folder, the call fails.
How do I retrieve ALL the folders/reports that a user has permission for
from an application running with the users default credentials?You would have to write or run the program with an admin account & then once
you get a list of all the children,
you'll have to loop through all of them to determine which one belong to the
X-User.
Edgar,
"DaveH" wrote:
> Using ListChildren(@."\",true) returns all items in the report server that a
> user has access to, however if the user does not have access to view the home
> folder, the call fails.
> How do I retrieve ALL the folders/reports that a user has permission for
> from an application running with the users default credentials?
retrieve information from before a transaction
I have a report and it retrieves information from an etl logging table which contains this info: etl_process_name, active_since_date, last_run_date.
When the packages are executing, the table cant be queried because it is in a transaction. Therefore the report keeps generating :s
The thing I want is that: If I query that table (with the report to show the logging table information) and the packages are executing, I want to see the values of the table before the transaction.
What I tried:
From sql management studio:
ALTER DATABASE MyDataBase
SET ALLOW_SNAPSHOT_ISOLATION ON
set transaction isolation level snapshot
go
SELECT etl_process, last_run, active_since FROM config.etl_settings
I did this while the packages were executing and it works but it won't work when I execute the same SELECT statement from the Dataset in the report. How is that possible? Does it have something to do with setting the database options for all users?
Additional info:
I'm database owner
The report solution has a shared datasource which refers to the same database
Hmmm, I still don't know why it didn't work yesterday but today the report gets generated and shows the data from before a the transaction that is busy at the moment.
All I did was alter my database to edit the transaction isolation level:
ALTER DATABASE MyDataBase
SET ALLOW_SNAPSHOT_ISOLATION ON
set transaction isolation level snapshot
go