Showing posts with label number. Show all posts
Showing posts with label number. Show all posts

Monday, March 26, 2012

Report Definition

Is it possible to control the number of table rows that can be displayed by modifying the report definition?Not sure if this is what you mean, but you can control the # of rows displayed by limiting the # of rows fetched from the data source. There's no way AFAIK to fetch N rows but only display N-M rows.|||

>> There's no way AFAIK to fetch N rows but only display N-M rows.

Yes, actually there is <s>.

You do need to give yourself appropriate information from the data source, but this doesn't necessarily mean limiting the rows! (because you might have another data region that shows a different count, in the same report, from the same data).

Here's a reporting query from my favorite ASP.NET add-on table (ELMAH error handler):

Code Snippet

SELECT ErrorId, Application, Host, Type, Source, Message,
[User], StatusCode, TimeUtc,

Sequence, AllXml

FROM ELMAH_Error ORDER BY ErrorId

... now suppose we add a column, as follows:

Code Snippet

SELECT ErrorId, Application, Host, Type, Source, Message,

[User], StatusCode, TimeUtc,

Sequence, AllXml, Row_Number() OVER (ORDER BY ErrorID) AS ItemID
FROM ELMAH_Error ORDER BY ErrorId

(you can add a counter like this different ways in other data sources)

... Now we can add the following filter to a table (or whatever):

Code Snippet

=Fields!ItemID.Value <= 8 ' or whatever maximum you have in mind,

' for example you can say:

=Fields!ItemID.Value <= =Parameters!MyMax.Value

... and readers please note, if you have trouble when you follow these instructions:

When I built this example I had to CInt() (cast) on both sides of the filter expression (including the literal 8!) to get it to work the first couple of times. It may be because I was building the query interactively for the dataset, and the designer doesn't support this clause so, while it processes the SQL, it is not sure about the data type of the result. IAC it does work.

>L<


|||Thanks for your help.

Friday, March 23, 2012

report by multiple parameter with OR relationship

I am trying to create a report with three parameters (date, license number and application number). I want report by License Number or Application number in the date that I put in. I trying following in Record Selection:
1.
{Command.LICENSE_NO} = {?License Number} or
{Command.LICENSE_ID} = {?Application Number}

2.
if isnull({?License Number}) = false then
{Command.LICENSE_NO} = {?License Number};
if isnull({?Application Number})=false then
{Command.LICENSE_ID}={?Application Number};

** license_id is the application number(number). license number(string)

but both of them do not work. somehow I can not leave Application number empty.

Please Help!!!As Application Number is a number, Crystal wants you to specify one.
If you default it to 0 you could have a selection formula like

({?Application Number} = 0 and {Command.LICENSE_NO} = {?License Number})
or
({?Application Number} <> 0 and {Command.LICENSE_ID} = {?Application Number})

which means that if you supply a non-zero application number it will be used in preference to any licence id you provide.|||As Application Number is a number, Crystal wants you to specify one.
If you default it to 0 you could have a selection formula like

({?Application Number} = 0 and {Command.LICENSE_NO} = {?License Number})
or
({?Application Number} <> 0 and {Command.LICENSE_ID} = {?Application Number})

which means that if you supply a non-zero application number it will be used in preference to any licence id you provide.

I have tried using 0 as default, but for some reason. I still can not leave application number empty. I used exactly same as your code

({?Application Number} = 0 and {Command.LICENSE_NO} = {?License Number})
or
({?Application Number} <> 0 and {Command.LICENSE_ID} = {?Application Number})

but search will not start if I leave application parameter empty.

any thought?

Thanks for your help|||As Application Number is a number, Crystal wants you to specify one.
If you default it to 0 you could have a selection formula like

({?Application Number} = 0 and {Command.LICENSE_NO} = {?License Number})
or
({?Application Number} <> 0 and {Command.LICENSE_ID} = {?Application Number})

which means that if you supply a non-zero application number it will be used in preference to any licence id you provide.

Got it working with your code!!!

Thanks your so much!!

Wednesday, March 21, 2012

Report Builder top x% clause

How to set up report (chart or table) with:
- top X
or
- top x%
clause to limit number of records displayed?
Is it possible?
Any ideas?
TIA,
KamelThis can be done by using the 'Top N' or 'Top %' in the filter tab for
the chart or table, where you set the expression, then select 'Top N'
ot 'Top %'as the Operator, followed by the actual number or pct.
Matt A|||I have following operators in filter definition:
- Is Empty
- Equals
- In a list
- Greater Than
...etc
But there are no Top N and Top % operators.
Whats wrong?
Kamel|||Can someone help with this?|||Put your "top 10 percent" clause into your query\stored procedure that feeds
the report...
"kamel" wrote:
> Can someone help with this?
>|||I am usinging report builder with report model.
Is it possible and how to use TOP N with report builder and report
model?
Kamel|||Ah right, sorry I havnt worked with the report model and report builder yet
so cant answer your question.
"kamel" wrote:
> I am usinging report builder with report model.
> Is it possible and how to use TOP N with report builder and report
> model?
> Kamel
>|||Matt,
are you sure this is possible?
I can not find TOP N operator in a filter :(
Kamel|||Has someone managed to do that with report builder?sql

Monday, March 12, 2012

Report Builder Error

I have created a view with one table (CASEMASTER). When I look at the Visual
Studioâ's property of the Case Number field within table CASEMASTER, it is set
to AllowNull = False, which correctly corresponds with the property of this
field on the SQL Server.
However, I need this table to be replaced with a new named query because I
need to limit the data to only one county, plus I need to link other tables.
When I set it as a query, it changes the property of the Case Number field to
AllowNull = True. Consequently, when I try to deploy it, I get a "Nullable
Property Error".
Is there any way to change the AllowNull property OR prevent this from
happening so that I can deploy the view/model without errors?
Any suggestions are appreciated.
--
K. ThomasI removed the minOccurs="0" property in the code to get this to work properly.
--
K. Thomas
"K. Thomas" wrote:
> I have created a view with one table (CASEMASTER). When I look at the Visual
> Studioâ's property of the Case Number field within table CASEMASTER, it is set
> to AllowNull = False, which correctly corresponds with the property of this
> field on the SQL Server.
> However, I need this table to be replaced with a new named query because I
> need to limit the data to only one county, plus I need to link other tables.
> When I set it as a query, it changes the property of the Case Number field to
> AllowNull = True. Consequently, when I try to deploy it, I get a "Nullable
> Property Error".
> Is there any way to change the AllowNull property OR prevent this from
> happening so that I can deploy the view/model without errors?
> Any suggestions are appreciated.
> --
> K. Thomas

Report Builder and Custom Value in TextBox

How can I add a custom value in a textbox. For example, I would like to add
a footer with a page number, date and the name of the user who's running the
report.Right click on the textbox and choose Expression. Everything you need is
under Globals. Well basic VB script knowledge is needed to put all together
though.
"SYoung" wrote:
> How can I add a custom value in a textbox. For example, I would like to add
> a footer with a page number, date and the name of the user who's running the
> report.|||When I right click on the textbox all I get is Format... option.
"Bing Bing Yu" wrote:
> Right click on the textbox and choose Expression. Everything you need is
> under Globals. Well basic VB script knowledge is needed to put all together
> though.
>
> "SYoung" wrote:
> > How can I add a custom value in a textbox. For example, I would like to add
> > a footer with a page number, date and the name of the user who's running the
> > report.|||Are you actually building your report in SQL Server BI Dev Studio?
"SYoung" wrote:
> When I right click on the textbox all I get is Format... option.
> "Bing Bing Yu" wrote:
> > Right click on the textbox and choose Expression. Everything you need is
> > under Globals. Well basic VB script knowledge is needed to put all together
> > though.
> >
> >
> > "SYoung" wrote:
> >
> > > How can I add a custom value in a textbox. For example, I would like to add
> > > a footer with a page number, date and the name of the user who's running the
> > > report.|||I'm actually using Report Builder. If you go to
"http://YourReportServer/Reports/", you'll be able to see "New Folder", "New
Data Source", "Upload File", And "Report Builder" below the two tabs
"Contents" & "Properties".
You may want to go to the links below to get more info about Report Builder.
http://www.microsoft.com/sql/technologies/reporting/default.mspx
http://www.developer.com/db/article.php/3520116
"Bing Bing Yu" wrote:
> Are you actually building your report in SQL Server BI Dev Studio?
> "SYoung" wrote:
> > When I right click on the textbox all I get is Format... option.
> >
> > "Bing Bing Yu" wrote:
> >
> > > Right click on the textbox and choose Expression. Everything you need is
> > > under Globals. Well basic VB script knowledge is needed to put all together
> > > though.
> > >
> > >
> > > "SYoung" wrote:
> > >
> > > > How can I add a custom value in a textbox. For example, I would like to add
> > > > a footer with a page number, date and the name of the user who's running the
> > > > report.|||You can actually enter RDL expressions in a Report Builder textbox -- just
start the text with "=". However, you are basically working blind, because
there is no direct visibility into report field names, textbox names, etc.
Also, page headers/footers are not supported in this release. Best bet is to
put the page count, report date, username, etc. at the top and bottom of the
report, so it will be on the first and last pages.
"SYoung" wrote:
> How can I add a custom value in a textbox. For example, I would like to add
> a footer with a page number, date and the name of the user who's running the
> report.

Saturday, February 25, 2012

Report Authoring Using Report Builder

We have deployed multiple report builder models and the number 1 user complaint is that every report builder report created can only have 1 table or 1 matrix or 1 chart in per .rdl (or report created). Anyone found any way around this? Is there a fix planned?This was an intentional design constraint for this release. There are no workarounds. We are definitely looking to include this functionality in a future release.

Report always displays 2 pages

Hi, I have a SQL Reporting service on which I have a footer with the number of page, something like "page 1 of 1". THe thing is, if I preview the report, it displays the nr of pages correctly, however, when I export to PDF; it alwas displays 2 pages, on the 2nd page only displays the footer "page 1 of 2" even if the first page is small and fits that page only. I've tried to reorganize the controls on the report and fit the footer to display only one page, however, no result.. any guess?Thanks a lot!Check the page margins settings in the report's properties.|||Problem solved. I've resized the report width to a less value than the value that I was using and is working!Thanks for the tip!

Report - Limit rows in table per page

I have a report that is a master-detail style report. The detail is displayed in a table. I would like to be able to limit the number of rows that can be in that table, and if there are more rows, it goes to the next page.

The report is essentially invoices. The master part has the name address, etc... and the detail is the line item detail. But with the format i am using, i can only fit x amount of line items per page (Depends on the size font i have). So, lets say i can only fit 10 items on a page. If there is an invoice with 12 items, i would like it to print 10 on the first page, and the last 2 on the second page. Everything else can be identical (doesn't really matter though). Is this possible?

Thanks

Hi bortiquai

you didn't mentioned which control you are using?

if you are using gridview than you can simple set the property

pagesize="10" or whatever you want

hope it helps

|||

I'm using the Table object in the Report Designer (RDLC), and the ReportViewer Control to view the report on the page. The pagesize=10 property on the GridView control is pretty much what I'm looking for, but the Table object in the report viewer does not have this property.

|||

This article will help you.

http://msdn2.microsoft.com/en-us/library/ms251668(VS.80).aspx

Look for "Page Breaks" section. This "=Int((RowNumber(Nothing)-1)/25)" expression will limit the number of rows displayed to 25 per page but you have to set it in the report. If you want your users to decide the number of pages, you just need to pass a parameter to the report that will contain the value. If you need help with that, let me know.

good luck...