Print Page | Close Window

Database value not shown

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21820
Printed Date: 18 Apr 2024 at 12:03pm


Topic: Database value not shown
Posted By: Maggi
Subject: Database value not shown
Date Posted: 18 Dec 2015 at 3:50am
Hello,

I hope this is the correct section for my problem. We have a customer which is using Crystal Reports 8. It'c connected to an informix database.

The report itself is working fine. Now the customer had a wish to change the report. Two more values should be shown. One is shown properly, the other value is not shown.

I don't know which informations do you need to analyze the problem, so I will provide as much as I can.

First picure: the actual report. The date is the first value which was added, and it's working:

http://www.bilder-upload.eu/show.php?file=a2439a-1450451938.png">

Second picutre: the draft view of the report:

http://www.bilder-upload.eu/show.php?file=9dc512-1450451954.png">

Third picture: Here you see the missing value:

http://www.bilder-upload.eu/show.php?file=12dd39-1450451968.png">

At least the SQL Query:

SELECT
    ti_bestand.mandant,
    ti_bestand.adr_id_auf,
    ti_bestand.trakt_nr,
    ti_arten.bezeichnung,
    ti_stamm.lfd_jahr,
    ti_stamm.lfd_nr,
    ti_stamm.ein_datum,
    ti_stamm.geschlecht,
    ti_stamm.kastriert,
    ti_stamm.geb_datum,
    ti_stamm.mischling,
    ti_stamm.tiername,
    ti_trakt.bezeichnung,
    ti_unt_art.bezeichnung
FROM
    imdis:informix.ti_bestand ti_bestand,
    imdis:informix.ti_arten ti_arten,
    imdis:informix.ti_stamm ti_stamm,
    imdis:informix.ti_unt_art ti_unt_art,
    imdis:thb.ti_trakt ti_trakt,
    imdis:informix.ti_rassen ti_rassen
WHERE
    ti_bestand.mandant=ti_arten.mandant AND
    ti_bestand.satz_status="A" AND
    ti_bestand.tier_id=ti_stamm.tier_id AND
    ti_bestand.trakt_nr=ti_trakt.trakt_nr AND
    ti_arten.satz_status="A" AND
    ti_stamm.satz_status="A" AND
    ti_stamm.ti_art_nr=ti_arten.ti_art_nr AND
    ti_stamm.ti_art_nr=ti_unt_art.ti_art_nr AND
    ti_stamm.ti_art_nr = ti_rassen.ti_art_nr AND
    ti_stamm.ti_uart_nr=ti_unt_art.ti_uart_nr AND
    ti_stamm.ti_uart_nr = ti_rassen.ti_uart_nr AND
    ti_stamm.ti_rass_nr = ti_rassen.ti_rass_nr AND
    ti_bestand.mandant = '01' AND (ti_trakt.trakt_nr IN ("01", "02", "03", "04", "05", "07", "08", "09", "10", "11", "12", "13", "14", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "29", "32", "33", "35", "36", "38", "39", "40", "48", "50", "51", "53", "54", "56", "64", "76"))
ORDER BY
    ti_trakt.bezeichnung ASC,
    ti_bestand.trakt_nr ASC,
    ti_arten.bezeichnung ASC,
    ti_stamm.lfd_jahr ASC, ti_stamm.lfd_nr ASC
   

The missing column is ti_rassen.bezeichnung. I know that this column is not listet unter the SELECT part, but if I add it manually Crystal Reports will delete it itself when saving.

I also did a little formula to see what's going on. It said, if the value of ti_rassen.bezeichnung is "" then write "n/a". And on every entry was "n/a" written.

Another information: If we execute a SQL query on the database itself via putty to determine the value of ti_rassen.bezeichnung it's working!

So if one of you guys (and girls?) got an idea why there is no value shown, I would appreciate any help.

If you need more information tell me, i'm sure I can give you what you need.


(Sorry for my bad english).


Best regards
Markus



Replies:
Posted By: kevlray
Date Posted: 18 Dec 2015 at 4:59am
How do you add a field 'manually'?  It either needs to be a fixed value (text box, formula, image, etc.) or a field added from a data source.


Posted By: Maggi
Date Posted: 18 Dec 2015 at 5:07am
I added the field from the menu. Insert --> Database field and then selected ti_rassen.bezeichnung. I dragged it into the report.

With "manually" I meant that I added ti_rassen.bezeichnung in the SQL statement under the SELECT part.



Print Page | Close Window