Viewer shows data multiple times

Hello everybody,
after the answer i got from the thread  , i edited my code.
But i got the problem, that i received the data multiple times.
The information are still the same like written in the other thread.
I work on three tables: Adressen, Auftragseingang and Arbeitspläne.
In the detail section of the Report i want to show the data of the table Arbeitspläne and in the header section i want to show data of the tables Adressen and Auftragseingang.
This is the code i wrote:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.Shared;
using System.Data.SqlClient;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Windows.Forms;
namespace CrystalReportsApplication1
    public partial class Form1 : Form
        public Form1()
            InitializeComponent();
        private void button1_Click(object sender, EventArgs e)
            SqlConnection connection = new SqlConnection("Data Source=SRVVMSQL001.de.eurodok.org;Initial Catalog=PROPLANOrg;Integrated Security=True");
            SqlCommand command;
            DataSet ds;
            try
                command = new SqlCommand();
                command.Connection = connection;
                command.CommandType = CommandType.Text;
                command.CommandText = "SELECT * FROM Auftragseingang, Arbeitspläne, Adressen WHERE Auftragseingang.[Auftrag-Nr] = 113 AND Auftragseingang.Kundennummer = Adressen.Kundennummer AND Auftragseingang.[Zeichnung-Nr] = Arbeitspläne.[Zeichnung-Nr]";
                connection.Open();
                SqlDataAdapter dataAdapter = new SqlDataAdapter(command);
                ds = new DataSet("ABC");
                dataAdapter.Fill(ds, "Auftragseingang");
                dataAdapter.Fill(ds, "Adressen");
                dataAdapter.Fill(ds, "Arbeitspläne");
                CrystalReport1 cryRpt = new CrystalReport1();
                cryRpt.SetDataSource(ds);
                crystalReportViewer1.ReportSource = cryRpt;
                crystalReportViewer1.Refresh();
                SqlDataReader dataReader;
                int i = 0;
                dataReader = command.ExecuteReader();
                while (dataReader.Read())
                    i++;//hier werden die ausgelesenen Datensätze gezählt
                MessageBox.Show("Message: Anzahl Datensätze: " + i);//hier kommt der richtige wert raus, was die Anzahl der Datensätze angeht||jedoch wird im Report ein vielfaches angezeigt
            catch (Exception ex)
                MessageBox.Show("Message:
" + ex.Message + "
" +
                                 "Data:
" + ex.Data + "
" +
                                 "InnerException:
" + ex.InnerException + "
" +
                                 "StackTrace:
" + ex.StackTrace + "
" +
                                 "TargetSites:
" + ex.TargetSite,
                                 "[" + ex.Source + "] FEHLER - Programm wird beendet.", MessageBoxButtons.OK, MessageBoxIcon.Error);
            finally
                connection.Close();

More than likely that is a table linking or report design issue. In either case, the best thing to do will be to post the query to the [SAP Crystal Reports Design|SAP Crystal Reports, version for Visual Studio; forum. When you post to that forum, a link to a screenshot will also be helpful.
Umm, also you mention that the answer on the other tread (Report shows no data in the Viewer )  was correct and helped you to resolve the issue of displaying the report in the viewer. Yet all you appear to have done is closed the thread without awarding any points(?).
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Similar Messages

  • How to show Date and Time with TimeZone

    Dear All,
    I have to show Date and Time with TimeZone abbreviation,
    for example:
    1) 31 March 2011 2:30 in india standard time - it should show in screen 31 March 2011 2:30 IST.
    2) 31 March 2011 2:30 in Australia/New Zealand - Eastern time zone it should show in screen 31 March 2011 2:30 AEST.
    how can i show *Australia/New Zealand - Eastern time zone to AEST*,
    I tried with format DD MMM YYYY HH:MM zzz, and i looked time zone API too.
    Appreciate your help
    Thanks
    Daya

    Dayananda wrote:
    ok, than i have to use zzzz format, as z won't help in my case, so i have to use zzzz which display descriptive value like, Indian Standard Time i.e. ISTPer the javadocs there is a very specific reason why that is a problem especially if you intend to support many timezones in one application.
    "+For compatibility with JDK 1.1.x, some other three-letter time zone IDs (such as "PST", "CTT", "AST") are also supported. However, their use is deprecated because the same abbreviation is often used for multiple time zones (for example, "CST" could be U.S. "Central Standard Time" and "China Standard Time"), and the Java platform can then only recognize one of them+."
    Thus you have one single case where there can be many and moreover it can change (twice a year I believe.)
    There is a standard source for this information although when I tried it it appears to not work.
    If the app only needs to display one zone then provide a configuration value that allows a user to overload the display value.
    If the app needs to display many values then you MUST inform business users of the problem because there are duplicates and they, not you, need to decide specifically what happens in those cases.

  • How to view current  date and time on SAP screen

    Hi Everybody,
    How to view current  date and time on SAP screen .I have set time zone in T-code STZAC.now iam getting correct date n time in my tranctions but i want to check without any tractions
    Plz repay,Regards,
    Sadik.

    Hi,
    You can check the time by running a report .
    It will show the database and central instance time : Report name :rsdbtime
    Thanks and Regards
    Vijay kumar G
    Edited by: vijay kumar gopal on Mar 4, 2008 1:09 PM

  • IPhone 4 on ios 5 - recurring events show up multiple times

    I updated my iPhone 4 to ios 5, and ever since, recurring events are showing up multiple times on the same day.  When I sync, it seems that another copy is added to my iPhone's calendar (only one event is in iCal).  I originally had a custom event that repeated every Tuesday and Wednesday.  I tried to change this into two events - one for each day - and it still has the issue of multiple events on the same day.
    Notes I add to these events do not sync back to my computer, either.
    I have tried wiping the calendars from the phone and syncing with what is on my computer, but I continue to have the same problems.
    Any help/advice out there?  It's more of an annoyance than anything!

    At least one of them is only using the cellular data or wi-fi at the moment.  His computer is on the fritz and he has not been able to sync with itunes for a while because of it.  I am not sure about the other colleague as she is out fo the office at the moment.

  • Show date and time in menu bar won't stay selected

    Using 10.6.7 with all updates as of the time I am writing this.
    Show date and time in menu bar is unselected and unselectable. When I select it (click it) it will unselect itself. I will see the checkmark for 1/2 a second, but won't stay selected.
    I've reparied permissions in the Disk Utility as described by a similar post (on an older version of the OS) with no luck.
    At a little bit of a loss. Spending the mandatory 30 minutes with various forms of Google searches with no luck.
    Looking for new ideas other than an OS restore.
    David

    Looking for new ideas other than an OS restore.
    Restart?

  • MacBook shows up multiple times under 'Shared' in finder

    My MacBook keeps showing up multiple times under 'Shared' in the Finder sidebar. All sharing services are turned of in System Preferences. The number in the computer name is automatically added. When I change the computer name to another name, all existing 'ghost computers' stay there in the sidebar.  How do I get rid of these?

    Known bug. Send Apple feedback. They won't answer, but at least will know there is a problem. If enough people send feedback, it may get the problem solved sooner.
    Feedback
    Or you can use your Apple ID to register with this site and go the Apple BugReporter. Supposedly you will get an answer if you submit feedback.
    Feedback via Apple Developer
    Some people have managed to stop this behavior by going to System Preferences/Sharing and stopping all sharing except screen sharing.

  • How do I Show date and time when I hover over clip like in iMovie

    How do I get FCPX 10.6 to show date and time when I hover over a clip? I can so it in I movie and as I move over my clips the date/time is shown. I need it for that specific point in the clip not just the record start time.

    I realize that my needs are outside of the normal editing workflow. I am a private investigator and last week I shot over 6 hours of surveillance video on a Sony video camera. Within this 6 hours of video there is at most 2 minutes of actual footage of my subject. So what I wanted to do was just import the parts of the clip I want, so I can avoid importing the whole 6 hours, and then add a text title of some sort that shows the date/time. My problem is that once I get this clip I have easy way of establising the TOD short of taking the clip capture time and then counting up using the SMTPE Timecode. In this regard iMovie makes it easier because I can just hover over the clip and see the TOD of that specific frame. iMovie on the other hand would force me to import the whole 6 hour video so i'm left moving between both programs which is less than ideal.

  • How do i show date and time info of videos in Iphone as they appeare before import in iPhoto?

    How do i show date and time info of videos in Iphone as they appeare before import in iPhoto? or even as they appear on the iPhone itself? The selection on tool bar for show info is greyed out.

    Welcome T G Brown to the  iMovie boards..
    the socalled timestamp is within the imports.. if you select a clip in iM and hit the key combo Apple-I, you can see recording time and date.
    unfortunately, this info isn't delivered to any software. Bruce Gee (geethree.com, excellent plug-in maker) told us, there's no 'API' he could use for such a feature...
    same on the pro side, read this discussion at the FinalCutExpress boards:
    http://discussions.apple.com/message.jspa?messageID=7982935
    Forum member Ian offers a solution with a 3rd party app ....
    so: pen&pencil and typing timestamp manually into any 'Title' seems to be your only option...

  • Servers showing up multiple times in Sites and Services

    I happened to catch something odd this morning while looking into another issue.  When i open our domains Sites and Services and click on one of our 4 corporate DC's (3vm's one physical one of them being tested in production with server 2012 R2). 
    I'm seeing that a few of our servers in remote locations are showing up multiple times.  However when I go to this server and click on who it's replicating with it's only showing one server and sometimes not even the same one as the corporate server. 
    Here is a screen shot I took.
    The red's are all the same server (sorry boss has mandated we aren't allowed to put out the names for some reason).  I'm a little confused as to what could be causing this.  Anyone have any ideas?

    Without better/more screenshots, it a bit hard to tell what you are seeing. However, in your statement
    "...I'm seeing that a few of our servers in remote locations are showing up multiple
    times.  However when I go to this server and click on who it's replicating with it's only showing one server and sometimes not even the same one as the corporate server."
    Replication is one-way connections and are always a PULL scenario. So for instance if
    COR-DC-03 is replicating from COR-DC-01, the replication link will only be on COR-DC-03. COR-DC-01 may or may not replicate from 03. It may actually be replicating from another DC. Also, the AD ISTG (intersite topology generator) will always try to find the
    most efficient replication and ensure that each DC has at least 2 replication partners, and there is no more than 4 hops to another DC. You have a number of sites and I assume there are DCs in there as well. All of those DCs need to replicate with one another.
    Perhaps if you can draw or otherwise illustrate the issue you are seeing that would help.
    Mark B. Cooper, President and Founder of PKI Solutions Inc., former Microsoft Senior Engineer and subject matter expert for Microsoft Active Directory Certificate Services (ADCS). Known as “The PKI Guy” at Microsoft for 10 years.

  • The same podcast shows up multiple times

    In iTunes, the same podcast shows up multiple times. There is only one copy of the file on my computer, and the file it located in the right location, but in iTunes, the same podcast is repeated two or more times. When I delete a single podcast and try to play its copies, iTunes notifies me that it can't find the file. I believe this happens when I use the import folder utility and add music in the iTunes music default location (which includes the podcasts as well as the music I want to import). Does anyone know how to keep this from happening?
    Thanks

    Well, the easiest way would be to stop using the import folder utility. Sounds like you're adding the podcast multiple times. You're probably doing it to other files as well...

  • Artists show up multiple times in Artist listing

    When I get a listing of songs by artist on my iPhone, some artists show up multiple times in the list. It's not that way on my computer. For instance, Death Cab for Cutie shows up twice, with different albums listed with each. However, some albums show up in both listings, but each with only partial selections of the songs on that album. So the first instance of DCC has album 1 with tracks 1-4 of the album and the second instance of DCC has album 1 with tracks 5-11.
    I went so far as to highlight all my DCC songs on iTunes on my computer and pasted DCC into the Artist line of each song and then re-syncing. No change.
    Any clues?

    Just wanted to add to this problem. I'm having the problem with Death Cab for Cutie and Kings of Leon. They show up twice on the artist list on my iPhone, but only once on my computer.
    My biggest concern is that it's taking up twice the space on my phone.
    If anyone has a solution to this it would be great!
    Thanks.

  • All of a sudden my home sharing computer is showing up multiple times on my apple TV.

    All of a sudden my home sharing computer is showing up multiple times on my apple TV.  When I go into the home sharing selection my computer shows up 2-3 times.  It is now happening on both my 2nd and 3rd gen Apple TV.  Does anyone else have this?  How do I fix this?  Thanks!

    Weird.  Restart everything including your router.

  • Why do some events show date and time in ical?

    Some events show the date and time, others show only the time. I cannot find a setting in preferences to have it be one way or another. I do enter events both on the computer and also my iphone 4s, but that doesn't seem to be the difference.

    oz81dog wrote:
    Does anyone have any clues for me?
    Look in Window menu > Previous Recipients

  • Albums in music showing up multiple times

    I just upgraded to 3.1 and now albums in my music show multiple times, but when I click on any one of them, the whole album lists to play. How do I eliminate all the duplicate listings in the album section of my music?

    To fix this I had to go into iTunes and check a few things. First go to the album that is giving you trouble. Start with the first song and "Get Info" (right click on PC not sure on Mac). Select the "Info" tab at the top and go through each song on the album. Make sure each song has the EXACT same album title. Other things to check are album year and album artist. Different capitalized letters may also cause your problem (The is not the same as THE). If all else fails try also selecting the "Part of a compilation" radio button for all songs part of the same album.
    Message was edited by: Freakwithissues

  • I keep getting a server error and my emails are not deleting and showing up multiple times

    I am getting emails multiple times and they aren't deleting.  They keep coming back.  I then get a server errer that mail.me may be a false server pretending to be mail.me.  Don't know how to fix this.

    Update and restore alert messages on iPhone, iPad, and iPod touch
    http://www.buybuyla.com/tech/view/012953a0d412000e.shtml
    iOS: Resolving update and restore alert messages
    http://support.apple.com/kb/TS1275
    iPad: Unable to update or restore
    http://support.apple.com/kb/ht4097
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/TS3694
     Cheers, Tom

Maybe you are looking for

  • CC bug ?

    // BUS ERROR (NON-ALIGNED ADDRESS // compile using following //           CC -xtarget=native -xarch=v9 -g alligned.c //           CC Version = Sun WorkShop 6 update 2 C++ 5.3 2001/05/15 // The following program dumps core when build with above comman

  • Comment effacer un startup.exe dans un field point

    Je désire effacer le programme startup.exe d'un field point, je posséde labview 6.1 et field point explorer 3.0.2. Il est possible e le faire en démontant le FP , enlever la carte mémoire flash et la formater. Ensuite il faut tout réinstaller ce qui

  • Iphone 5 touch screen works then becomes unresponsive.

    The touch screen on my iphone 5 stops working sporadically every time I use it. I will turn it on and start using it, but after about 15 - 30 seconds it will always become unresponsive. What I do to get around this is to touch the power button -> tur

  • AP541N WiFi-Connection speed

    I tried to get higher speeds than 54MBits, displayed in Windows, which works without any problems for example on the D-Link DAP-2553, 130MBits are shown  doubleclicking the WiFi-Adapter after successful connection on my client. My client is an Fujits

  • C3 is connected to my wlan but doesnt work

    The phone says its connected to my wireless internet but when I try to use the internet it doesnt work at all. Opera etc....just bought it...dunno whats wrong...help