Friday, March 30, 2012
report with sub report
with, I have the report layed out and populating fields in
the master report with data, my report uses data from the
master report and passes it to the subreport, that is all
working well, the problem is I only get data for the last
record in the master dataset... It's not displaying a new
page for each records in the master dataset... None of my
fields use the First function... My grouping in my query
is setup correctly, is there any other place to setup
grouping in the report designer...? What am I doing
wrong...?You either need to add a table or a rectangle and then tie them to the
dataset. If you just put textboxes on the report it will only display the
last record. See the thread just after this one from Alien_251
"Dan@.Monaco" wrote:
> I have a master detail report that I'm having trouble
> with, I have the report layed out and populating fields in
> the master report with data, my report uses data from the
> master report and passes it to the subreport, that is all
> working well, the problem is I only get data for the last
> record in the master dataset... It's not displaying a new
> page for each records in the master dataset... None of my
> fields use the First function... My grouping in my query
> is setup correctly, is there any other place to setup
> grouping in the report designer...? What am I doing
> wrong...?
>
Wednesday, March 28, 2012
Report with 3 parameters used together or individually
Well with all due respect - I never Use NULL parameters!
Are you using Reporting Services 2000 or the NEW Reporting Services within SQL 2005 CTP?
There are different answers for both!
|||I am using Reporting Services 2000. I eventually figured it out by using NULL parameters for all of my parameters but also taking care of the value in my stored procedure with IF statements depending on which value was NULL and such. A pain but it does work.|||
Forget the answer to allowing NULL values!
NULLS are neither"here" or "there" and I just cannot belive that <NULLS> are acceptable inany database or any life environment!
<NULLS> are not the answer to your problem!
Please be a little more specific and I will certainly do the best I can do to help!
|||
Sorry to be reprtitive !!!
If you allow parameters within your selections of parameters (In RS Parameter Selection) why is there ever an option for <NULLS> versus <ALL> or the <Selected Values that exist> ?
Ok - if by chance there are some <nulls> within the fields within your table -- which beyond the life of me there would be any there ......
I really think that you need to ensure the UI (User Interface) that presents (data) to the data layer there are edits to prevent this from happening - or -
I just = cannot understand = why you would allow a parameter selection from RS allow a NULL to be accepted into a text SQL script or a stored procedure ---
I am mising nothing in this post - <nulls> are void within the programming and everyday life world!
Friday, March 23, 2012
Report Viewer and Forms Authentication
I'm using forms authentication on Reporting Services with no worries but I'm having trouble getting Report Viewer authenticating from a web page.
I've found a example in C# (I think) but being a VB user it's proving a little difficult.
http://blogs.msdn.com/bimusings/archive/2005/11/04/489100.aspx
Has anyone an example of this in VB or could provide a way of converting the out statement/argument into something VB might accept?
public bool GetFormsCredentials(out Cookie authCookie,
out string user, out string password, out string authority)
{
authCookie = m_authCookie;
user = password = authority = null;
return true; // Use forms credentials to authenticate.
}
Cheers
Public Function GetFormsCredentials(ByRef authCookie As System.Net.Cookie, ByRef user As String, ByRef password As String, ByRef authority As String) As Boolean
authCookie = m_authCookie
user = password = authority = Nothing
Return True
End Function
|||Yeah, that's what I ended up with too, but thanksIs there any funky trick with implementing Microsoft.Reporting.WebForms.IReportServerCredentials? I'm getting an error "Implenting property must have matching 'ReadOnly' or 'WriteOnly' specifiers". Following the code from the blog, there are ReadOnly properties for both ImpersonationUser and NetworkCredentials, but adding the matching WriteOnly properties doesn't make it all happy.
I must be missing something somewhere but I've been looking at it too long.
Tuesday, March 20, 2012
Report Subscriptions <-> Scheduled Reports
This question is in regards to using the ReportingServices2005 WebService classes with C# .net 2.0. What I am having trouble with is how to relate a schedule to a subscription.
The piece of functionality that I am trying to duplicate is adding a report's subscription to a schedule (on the Subscription:{report_name} page's subscription processing options under the asp.net "Reports" app).
How can I programmatically set a report's subscription's "subscription processing options" to use one of my existing Schedules?
Some things I have tried:
- use ListSchedules to get a list of reports, use ListScheduledReport(scheduleId) to get a list of reports related to a schedule (this is great, it gets me the reports, but I can only add them via the asp.net Report app)
- use ListSubscriptions(Report.Path, null) to get a list of Subscriptions for a given report (this is great, too, but I do not see how to relate a subscription to a schedule).
The Reports app's database has a Schedule_Subscription_Report table, but I do not see any of the Web Services that can access it.
Please help!
Regards,
-Ben Waidhofer
Use CreateSubscription SOAP API and existing shared schedule.
If the schedule definition for a TimedSubscription is a shared schedule, you must pass the schedule ID of the shared schedule as the MatchData parameter. The schedule ID is passed as a String, for example, "4608ac1b-fc75-4149-9e15-5a8b5781b843". The schedule ID can be obtained by calling the ListSchedules method.
See http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsmanagementservice2005.reportingservice2005.createsubscription.aspx
-Igor
|||Igor,
Much thanks, that does answer my question.
I read that if the schedule is ad-hoc, that is it is not a shared schedule that the MatchData parameter an xml-string representing a serialized ScheduleDefinition. Is that correct? If so, how does one serialize a ScheduleDefinition object to an xml-string?
Regards,
-Ben
|||Link from my previous reply contains a short version of XML for ScheduleDefinition. But generally you need to use XmlSerializer to convert ScheduleDefinition object into xml. This one looks like a good sample: http://www.odetocode.com/Articles/114.aspx
-Igor
report structure/pivot query
I'm having trouble with the structure of my report. Consultations with various SQL forums have informed me that I should not try to manipulate my data in the query but do it in Crystal.
The format I want is:
BookID, Author1, Author2, Author3, Author4, BookTitle, PublisherName, YearOfPublication, ISBN
The dataset I have from my query is:
BookID, Author1, BookTitle, PublisherName, YearOfPublication, ISBN
BookID, Author2, BookTitle, PublisherName, YearOfPublication, ISBN
BookID, Author3, BookTitle, PublisherName, YearOfPublication, ISBN
BookID, Author4, BookTitle, PublisherName, YearOfPublication, ISBN
I need to group the data on the BookID so that the book details only show once for each instance but I can't find a way to concatenate all the author details and group it properly within the book. At the moment, the group is based on the BookID and the group header section contains BookID and BookTitle. The details section contains a formula field that concatenates the surname, forename and initials of an individual author. The Group Footer section contains all the other book details fields. This means that the output looks like this:
BookID, BookTitle
Author1
Author2
Author3
Author4
PublisherName, YearOfPublication, ISBN
Please can anyone help?Put a formula in the BookID group header to reset an author variable.
Suppress the group header.
Create a formula in the detail to concatenate the authors in a variable.
Suppress the detail.
Put everything in a text object in the group footer.
e.g.
@.reset (in group header)
whileprintingrecords;
stringvar authors := '';
@.add_author (in detail)
whileprintingrecords;
stringvar authors;
if authors <> '' then authors := authors + ', ';
authors := authors + {table.author};
@.get_authors (in group footer)
whileprintingrecords;
stringvar authors|||Thanks that really helped! It's looking better already!
Maybe you can help me a little further.... I'm also having trouble with my record selection formula. The user passes in one or more parameters to search on. The parameters relate to the author's surname, forenames and initials. The user can pass in exact details or wildcarded partial details. I want the report to show the books with one or more author that matches the criteria entered but also to show all other authors of the same book who do not match the criteria. Currently, only the authors that match are shown.
This application is being adapted from an Access database. The SQL for the Access report contains the following 'Where' clause (with 'W%' being passed in as an example parameter):
WHERE (((BookAuthor.BookID) In (SELECT [BookAuthor].BookID FROM Person
RIGHT JOIN [BookAuthor] ON Person.[PersonID] = [BookAuthor].PersonID
WHERE (((Person.Forenames) Like ('%') Or (Person.Forenames) Is Null)
AND ((Person.Initials) Like ('%') Or (Person.Initials) Is Null)
AND ((Person.Surname) Like ('W%'))))))
Currently in my record selection formula, I have:
{Person.PersonID} = {BookAuthor.PersonID}
and
{BookAuthor.BookID} = {reportview_BookAndPubl.BookID}
and
If {?SNameParam} <> "" Then {Person.Surname} like {?SNameParam}
or
if {?FNameParam} <> "" Then {Person.Forenames} like {?FNameParam}
or
if {?InitialsParam} <> "" Then {Person.Initials} like {?InitialsParam}
Can you suggest anything to make this formula work like the original sql?
Thanks.