Showing posts with label columns. Show all posts
Showing posts with label columns. Show all posts

Friday, March 30, 2012

Report empty?

I have created a basic report that just shows some columns from a query, I'm using a dataadapter and the reportviewer component.

If I execute the query it calles it returns some rows, but the report is empty.

What's wrong with the reportviewer and the report objects?

I'm thinking about just using gridviews because the reports don't work, altough I'd like to use the reportviewer because it can export to excel/pdf.

Thanks.

HI,onishirox:

I can not debug it without any codes from your scenario, but you can have a check with this following walkround to make your codes work:

Binding Data to the ReportViewer Control Dynamically in ASP.NET 2.0 -

http://www.aspfree.com/c/a/ASP.NET/Binding-Data-to-the-ReportViewer-Control-Dynamically-in-ASPNET-20/1/

If i misunderstand you about your question, please feel free to correct me and i will try to help you with more information.

I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be

of assistance

|||

HI,onishirox:
We are marking this issue as "Answered". If you have any new findings or concerns, please feel free to unmark the issue.
Thank you for your understanding!

|||

Thanks. I think the problem was that I was using sqlserver2000, seems to work ok now with sql2005.

Wednesday, March 28, 2012

Report Design Question two horizontal column headers one below other

I have a report requirement, i am new to reports.

I want to have two lines of column headers.( with 7 columns in parent columns header)

and 7 columns in child column header.

The first column header will show a parent record.

And after the parent record i want to show the next child related horizontal column headers and will show all child record related to the above parent record.

its a one to many: 1 parent record and below all child records for that parent record.

can i use subreports controls to show all child records of the parent.

Thank you very much for the information.

I would recommend that you a table report

Assume that you have a structure

Country A

Region A1

Region A2

Country B

Region B1

Region B2

Region B3

In this scenario create a table that groups records by country. In the group header/footer (depending on your need) add a new table that contains regions associated with the country.

HTH.

Friday, March 23, 2012

Report Columns

Hi,
I have a detailed report with 60 columns. How can user hide some columns in
reportviewer?
For example if he is interested in 5 columns, is it possible for him to hide
rest 45 col. automaticly?
ThanksHi,
if you are using a table control on your report you can use the Visibility
property. Using this property you can either specify an expression or specify
another control in the report to toggle the visibility of the column. If you
want the user to decide about visibility I'd go for the control, if you wish
to do it I'd suggest an expression evaluating the current Windows
user(WindowsIdentity)
"Kenan Kilictepe" wrote:
> Hi,
> I have a detailed report with 60 columns. How can user hide some columns in
> reportviewer?
> For example if he is interested in 5 columns, is it possible for him to hide
> rest 45 col. automaticly?
> Thanks
>
>

Report Calculation of Percentage is Inaccurate

I have a report that Sums several columns and uses the sums of two of the
columns to calculate a simple percentage.
=Sum(Fields!Col1.Value)/Sum(Fields!Col2.Value)
= 3781/4756
The resulting calculated percentage in the report is 76%. The actual
percentage is 79.4%.
I've searched MS Reporting Services site but can find nothing that addresses
calculation errors. Has anyone else had this problem? Does anyone know of a
fix for this?Could you put Sum(Fields!Col1.Value) and Sum(Fields!Col2.Value) into
separate textboxes to make sure they are 3781 and 4756?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:4B948010-B27C-45A4-95BA-C89DF5A2B25D@.microsoft.com...
>I have a report that Sums several columns and uses the sums of two of the
> columns to calculate a simple percentage.
> =Sum(Fields!Col1.Value)/Sum(Fields!Col2.Value)
> = 3781/4756
> The resulting calculated percentage in the report is 76%. The actual
> percentage is 79.4%.
> I've searched MS Reporting Services site but can find nothing that
> addresses
> calculation errors. Has anyone else had this problem? Does anyone know
> of a
> fix for this?
>|||Thanks for your response, however, I finally figured it out ... I was asking
for a line item value to compute the summed values percentage. So Rpt Svcs
was grabbing the values from the 'First' record in the group instead of the
summed values for the 2 columns. The fix is something like this ...
=Sum( Fields!Col1Sum.Value )/SUM( Fields!Col2Sum.Value)
"Lev Semenets [MSFT]" wrote:
> Could you put Sum(Fields!Col1.Value) and Sum(Fields!Col2.Value) into
> separate textboxes to make sure they are 3781 and 4756?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:4B948010-B27C-45A4-95BA-C89DF5A2B25D@.microsoft.com...
> >I have a report that Sums several columns and uses the sums of two of the
> > columns to calculate a simple percentage.
> > =Sum(Fields!Col1.Value)/Sum(Fields!Col2.Value)
> > = 3781/4756
> > The resulting calculated percentage in the report is 76%. The actual
> > percentage is 79.4%.
> >
> > I've searched MS Reporting Services site but can find nothing that
> > addresses
> > calculation errors. Has anyone else had this problem? Does anyone know
> > of a
> > fix for this?
> >
>
>

Report Builder: Is there a way to filter a filter?

Dear Anyone,

We have a report model that connects to a single table. Some of the columns of the table contains blank values which is regarded as a valid value in our reports.

We have a requirement that the filter selection should not contain any blank values. They do not want to include a blank value for the users to choose but if the users decide not to use a filter, those blank values should still be included in the report.

Does anyone have any suggestions on how to do this in RB? We already made this work in RS2k5 but we can't seem to find any way to do this in RB.

Thanks,
Joseph

No, there is no way to control the list of values presented to the user. It is always a list of all existing values in the underlying database.

Report Builder: Display Hyperlink

Using the Report Builder, the users need to generate a report in which one of the columns should have a hyperlink that navigates to a particular aspx page.

Now, I am able to provide for a hyperlink enabled column from the static reports designed using the Report Server Project. I have used the Navigation --> Jump To URL property of TextBox for this.

But the users dont want to depend on static reports and need this to be available via Report Builder.

I tried to provide for the <a href="somepage.aspx">xxx</a> from the named query in the datasource view, but when I run the report, the Reporting Service HTMLEncodes the tags and displays everything as text.

Is there a way to generate a hyperlink using Report Builder.

I'd linke to know the answer to the same question: How can you display a hyperlink in a report built using the Report Builder (NOT the report designer). Even a simple textbox that embeds a single url would be nice.... how can this be done?

Report Builder: Display Hyperlink

Using the Report Builder, the users need to generate a report in which one of the columns should have a hyperlink that navigates to a particular aspx page.

Now, I am able to provide for a hyperlink enabled column from the static reports designed using the Report Server Project. I have used the Navigation --> Jump To URL property of TextBox for this.

But the users dont want to depend on static reports and need this to be available via Report Builder.

I tried to provide for the <a href="somepage.aspx">xxx</a> from the named query in the datasource view, but when I run the report, the Reporting Service HTMLEncodes the tags and displays everything as text.

Is there a way to generate a hyperlink using Report Builder.

I'd linke to know the answer to the same question: How can you display a hyperlink in a report built using the Report Builder (NOT the report designer). Even a simple textbox that embeds a single url would be nice.... how can this be done?sql

Wednesday, March 7, 2012

Report Builder - A filter is required

Using Report Builder, I am querying a table that has:

85,000 rows
5 columns

The report will run with only 4 of the columns, but when I add the 5th (data type is nvarchar(1024)), I get an error message that says:

Cannot run this report.
A filter must be specified.

When I add a filter on that 5th column, it will run.

Does anyone know if there is a record limit in Report Builder? Is there some sort of governor that I can modify?

Thanks in advance!I think I figured this out. The entity in my model had a property called "InstanceSelection" with the value of "MandatoryFilter." I cannot completely explain what this property does, but I changed the value to "List" and fixed the problem.

I don't know why the filter was mandatory only when the 5th column was there.

Saturday, February 25, 2012

ReporItems referring to a cell containing a subreport?

Hi guys,

i have a column in a report that must calculate a percentage based on two columns that follow them. I am aware that i can use the ReportItems! collection for this, but one of the columns i need to reference is actually a subreport because its data comes from a different source. It is just a single cell subreport, which makes it appear totally part of the table it is in. Is this possible? Just to be clear, what i want is an expression like this in my cell:

= FormatPercent( ReportItems!CurrentEarnings / ReportItems!BudgetedEarnings )

the BudgetedEarnings cell is actually a subreport, but all i want is the text it is showing.

Thanks for any help or suggestions!

sluggy

No, referring to a report item in a subreport is not allowed.

|||Dang! Thanks |||Hi, how did you get around this issue? I am trying to do the same thing.

ReporItems referring to a cell containing a subreport?

Hi guys,

i have a column in a report that must calculate a percentage based on two columns that follow them. I am aware that i can use the ReportItems! collection for this, but one of the columns i need to reference is actually a subreport because its data comes from a different source. It is just a single cell subreport, which makes it appear totally part of the table it is in. Is this possible? Just to be clear, what i want is an expression like this in my cell:

= FormatPercent( ReportItems!CurrentEarnings / ReportItems!BudgetedEarnings )

the BudgetedEarnings cell is actually a subreport, but all i want is the text it is showing.

Thanks for any help or suggestions!

sluggy

No, referring to a report item in a subreport is not allowed.

|||Dang! Thanks |||Hi, how did you get around this issue? I am trying to do the same thing.

Tuesday, February 21, 2012

Reply to Importing Error

Hi all,

I am facing problem on importing csv data file into table,


For Ex:


csv file which has 2 columns & 4 records are as follows

EmpNo EmpName

1 a
2 b
3 c
1 a

I created new table called T4, structure of T4 is

EmpNo Varchar(50) with Primary Key
EmpName Varchar(50) disabled Allow Nulls

Now I started importing csv data to T4 table, during importing it couldn't finish entire process. Throwing error, when I remove primary key with disable Allow Nulls for both constraints of a table T4. Importing data successfull.
My question is if I have above said structure for the table T4 (with primary Key), during importing instead of throwing error let it be import first 3 rows then throw error as primary key enabled could not able to import. Is this can be possibe, if so please suggest me to solve the problem.Can I use Bulk Insert or SQL Scripts to solve this problem.

Thanks in advance
Karna

I believe that I understand your current situation, but I do not think I understand what it is you are trying to do.

If you're trying to insert the three "good rows" and "fail" the one "bad" row without failing the package as a whole, you may be able to accomplish this by adding an error output to the destination to which you're writing these records. Then the "bad" records will be redirected to that portion of the data flow, where you can count them, log them, or ignore them if you want.

Is this what you're trying to accomplish? If so, please let us know if this technique gives you the solution you need. If not, please see if you can rephrase your goal, and I can try again.

|||Hi Mathew,

Thanks for your reply. I am executing wizard in SQL Server 2005. Actual problem is "I am preparing a job which can import CSV data file to the table. Table already has primary key & disabled allow null option. Here in CSV file it has duplicate records & empty rows. During importing of job is not successfully done, it is throwing error." My question is if the duplicate data lies in 1000th record, let job be success for until 999 record. Then let it can show error for 1000 record & logged .
Please suggest me to how to succeed the job.

Thanks in advance
Karna|||

I'm honestly not certain how I would go about doing that. For most situations where I'm using SSIS, the behavior you're trying to achieve would be inappropriate for my needs (I would either need the entire load to fail with no rows written to the destination, or else have error rows redirected to a log file or table) so I've never tried to set things up this way. I'm also pretty unfamiliar with the Input/Output Wizard, so that's two strikes against me.

With that said, the first thing I would try would be to update the destination component in the package (i do not know if this is exposed through the wizard - i assume it is not) to turn off fast load. This will slow things down quite a bit as each row will be inserted into the destination database one by one, but it might give you what you need.

Perhaps someone else has more experience with this problem than I...

|||Hi Mathew,

Actually I have to run a job for which it has to import csv data file to table. CSV has duplicate records. My job should not import duplicate records, it should append only actual records. If I set primary key & disabled allow null option. After this when I run the job, job is not even appending actual records (which is not duplicated), job is throwing error which is not importing any data from csv file.
Please suggest me to solve this issue.

Thanks in advance
Karna|||Hi Mathew,

Actually I have to run a job for which it has to import csv data file to table. CSV has duplicate records. My job should not import duplicate records, it should append only actual records. If I set primary key & disabled allow null option. After this when I run the job, job is not even appending actual records (which is not duplicated), job is throwing error which is not importing any data from csv file.
Please suggest me to solve this issue.

Thanks in advance
Karna|||

Karna,

I think you best option use the error output in the destination component to redirect the errors. If you don't change the default value of the error configuration; then the package will fail as soon as the 1st duplicate hit the destination table. This is nothing diffrent from what Matthew has already suggested.

|||Hi,

Thanks for reply. My problem is I need to import CSV data file to one of the table in the database. During importing it shouldn't import null rows & same rows to the table. The method which should checks the data in the table before importing, if data exists it shouldn't import any data else it should. Please suggest me to solve this problem.

Thanks in advance
Karna|||

See this link for a number of different ways to see if a row exists:

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

Replication, Primary Keys and Identity Columns

Hello,
Firstly I would like to apologise if I am bringing up a common subject
again, but I cannot find a definative answer to my problem.
I am using daily transactional replication to keep a copy of our SQL
server database offsite, as a disaster recovery measure. I.E. if our
servers go down here, we can flick the DNS to swap over to the offsite
servers.
My problem is that the replication appears to be copying the Indexes
with each table (which I can see by going into EM, Design mode of a
table -> properties -> Indexes/Keys). The Index is there, and even
lists the column associated. However, in the design mode, the column
does not have the Primary Key Icon. How can I ensure that this
happens?
My plan, once I get the primary keys replicated correctly, is to then
use a SQL script to set all primary key columns as Identity (this is
the case on the live server). Is this possible?
Many thanks,
Andrew
You can ensure the PKs are set up correctly by selecting the option on the
snapshot tab of the article properties to include DRI.
Manually altering the PKs on the subscriber to be Identity columns will
cause the stored procedure calls which are used by transactional replication
updates to fail.
If you want a DR server in this way I would recommend using log shipping or
queued updating subscribers.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks Paul.
I take it that Queued updating simply gives you protection against
network problems?
Does log shipping involve a more manual process?
In addtion to this, is there any way to be replicating Permissions on
objects and perhaps even DB logins/users/roles etc?
Cheers.
Andrew
|||Also, I was just wondering:
What if I set the PKs to "Indentity (Not for Replication)". Would this
solve my problem?
|||No - this is for merge and queued updatable subscribers so you'd still lose
the identity property this way.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||It is for those cases where there isn't a need for distributed transactions
ie longer latency. The side effect is that the identity property is retained
and the stored procedure code is altered accordingly.
As for permissions, they'll be handled automatically with log-shipping. In
replication, there is no way to automatically replicate them, so
sp_addscriptexec is usually used (manually).
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I have limited bandwidth to play with. Does log shipping require a lot
of data to be transferred?
Can I schedule this to only occur overnight?
|||The size of the log backup really depends on your particular situation -
you'll have to look at your log backups to determine if this solution will
be feasible. If your database is not large, you might want to zip up the
database backup once it's completed in the evening, then ship it over, unzip
and restore. This is a very simple solution, although you'll have to script
it yourself.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)