Does CrystalReports have diagnostic logging? Certain fields won't show up when printed - debugging

I am using the Crystal Reports that comes with Visual Studio 2008
Here is my problem. I have a simple little command line utility that generates a single crystal report. It
Connects to a database
Gets a dataset out of a stored procedure. The dataset is always one table with one row.
Sets the dataset as the report's DataSource
Depending on command-line flags either prints to the default printer, emails, or saves the report as a pdf
The app is used something like this:
c:\> GenerateReport 1000 1345 1 email=me#somewhere.com pdf=c:\temp\ print
Where the first 3 arguments specify parameters for the stored procedure and the other arguments are optional but tell the utility what to do with the report. Very simple stuff. Works great, and has been for some time.
Except that since upgrading crystal reports (from whichever version was with vs2003) its been a little wonky. ONLY on the production site and ONLY when the report is printed, several (but not all) of the fields on the report are left blank!
This is especially confounding because the report is instantiated only once and all the data on report is coming from the DataSet - I have no report parameter fields. And the dataset is fetched and set as the datasource only once at the application start. After that I am simply calling report.PrintToPrinter, report.Export, or report.ExportToStream on the same instance depending on whether I want to print, export or email respectively.
What this means is that if I run the utility with the print and email=me#mycompany options the email that I get and the report that is printed are from the EXACT SAME ReportClass instance. Yet the same values that are consistently missing when printed are visible when the report is emailed or saved to disk.
Even worse, I can take the exact same executable. Move it to my development computer, point the config file at the production database and it prints to my local printer with all the values filled in!
I'm really quite stumped as to how to investigate this further - it seems like something is going on inside of CrystalReports. Is there some sort of diagnostic mode or logging mode that I can turn on that might give me a clue how to fix this?

To first of all answer your question, NO, there is no diagnostics logging, other than what you see from the report and any exceptions that arise.
As for what might be wrong, if the problem ONLY occurs when it's printed, it HAS to be related to printer drivers and/or fonts. It can not be anything else. For a for-sure way to fix the report to print on the production printer... install Crystal Reports on the computer that has the production printer installed and open/format/test/save the report against that SPECIFIC printer. That will fix the issue. And of course, remove Crystal Reports when you are done fixing the report.
If the report is running fine and the output is incorrect in terms of what gets printed, and no other errors happen, it HAS to be a compatibility issue with the printer. Nothing else.

Related

Build Data Table Error (DataTable could not be read)

As seen above, there’s some error with the building of data table… Any help here?
Error message is as follows:
Creating dtData2: Type ‘UiPath.Core.GenericValue, UiPath.System.Activities, Version=20.4.0.0, Culture=neutral, PublicKeyToken=null’ is not allowed here. See https://go.microsoft.com/fwlink/?linkid=2132227 for more information.
2nd upload as per requested:
You might be using a .xaml file from a newer version of Studio. The BuildDataTable seems to be picky about that.
I encountered that mysterious crash on our production system after some third party developers made some code changes. I noticed the version of UIPath generic object in my crash screen was 19.10.x.x, and I know our Production and Test/Dev systems are on v18.x.
I suspected they sent us code developed in a newer version of Studio, or copied and pasted remotely from their Studio to ours and it happened to work (at least the pasting). I got a complaint from the users that the robot didn't work so they'd just do it manually until it could be fixed.
To "fix", edit the .xaml in Studio. Find the Build Data Table in the Activities and created a new code block. Since the Build command is so simple, needing only the output dt field, that might be the easiest option. I reran it in debugging with the new "BuildDataTable" acitivity and it didn't throw the exception. [I probably could've downgraded the genericvalue version number in the .xaml file, but I was already in Studio.]
You can also use "findstr" to search for the BuildDataTable commands from the .xaml file. The findstr or egrep command can show you the version of the genericvalue UIPath is trying to stuff into the empty datatable on creation:
<ui:BuildDataTable DataTable="[DetailDT]" DisplayName="Details Data Table"
xs:element name="Change_x0020_Type_x0020_Index"
...
msdata:DataType="UiPath.Core.GenericValue, UiPath.System.Activities, Version=19.10.1.0,
One of the nicer "features" of UIPath is their use of a sort of open format .xaml file for all the code storage. Using findstr or egrep has really helped find hidden problems spread across our large collection of folders. Their xaml is not as easy as merging code written in autoIt3 or AutoHotKey, as they have graphic screen size elements and block number tags embedded in it, but at least all the graphical code blocks aren't completely locked away in some compressed or OLE format as would be tempting for software that works (only?) on Windows.
Check your UiPath.System.Activities version. I had the same error with a DataTable containing another DataTable as a column. Basic datatypeas as string and int were no problem, but a DataTable threw the error.
I updated UiPath.System.Activities to 20.10.4 (from 19 something) and it worked after that. Also tried with 21.10.4 and that works as well.

SSRS report returning no data on report server but is working in visual studio

Something really strange is happening with SSRS. I have a report which is powered by a stored proc which uses a lot of TSQL and CTE's to set variables ect... I know that there's no problem with the procedure as it runs in SQL and also runs within Visual Studio and returns a full data set. The issue I'm having is on deployment, I can't seem to get the report to return data when running it from the reporting server. The headers of the table and parameter are displayed but just no data.
I've tried the following:
- Deleting the .DATA file
- Clearing cache
- Checking for data source errors
- Checked the report server error log
- Rebuilt RDL and created a different report with the code
I'm clueless on this one, it's something I've never seen before.
Please help.
Much appreciated,
Thank you
Ri

MS Access 2010 subreports run fine, but main report freezes, only for user, not for dev. Why, and how to fix?

I am using MS Access 2010 on Windows 7, in a moderately locked down corporate environment. I have developed a report that calls several subreports, and one subform, which in turn has several embedded graphs. The various subentities pull data from multiple queries that build on other queries, some of which are parameterized. The two parameters (Year and Month values) are taken from a single form that includes buttons to preview and print the report. All data tables are local to the .accdb file; there is no server back end.
I developed the file locally, then copied it to a shared network folder and tested. Everything works as expected for me -- the report takes a few seconds to run, as the data work is admittedly a bit clunky, but it still displays in a timely fashion. I am in California, the shared folder is somewhere in the Midwest or South, and my coworker is in Texas. I asked coworker to open the file, enter values in the form, and run the report. He got a warning saying the file was read-only, but the form still ran, but the report locked up. Specifically, the report starts to run, the progress bar moves to about 1/3rd or 2/5ths across, then just stops. There is no error message given.
I had coworker force-close Access, deleted the lock file, gave coworker full permissions on the file, and had him try again. Same results, minus the read-only error. Entering values in the form and running the report directly, rather than using the buttons, gives the same result. I had him go through the other database objects, and all of the tables, base queries, subreports, and subform open "instantly", with the expected data and record counts. For some reason, though, bringing it all together just crashes Access every time.
Coworker was doing a screen share for the initial tests, so I know he was following directions correctly. We tried it without, in case the bandwidth was an issue, with no improvement.
I've tried searching variations on "ms access report locks/freezes/hangs" via Google and SO, and got a bunch of stuff about record-locking, which I think is not the issue here. If anyone can suggest better search terms, I'm game to try them.
The data used is confidential, so I'm reluctant to post code, but can work on sanitized versions if that's necessary for a solution.
Since the file is locked in Read-Only, any calculations that are done which in any way write data to a table are not going to work. I suggest you double check the security permissions the user has to the network folder. That includes both the NTFS security and the shared folder security.
He needs write permission to the entire network folder (not just the database file) because Access will try to create the laccdb file and write to it within the network folder. If he does not have write permissions on that folder access will not be able to edit the laccd file.

SSIS value does not fall within the expected range with OLE DB Datasource

I'm using Visual studio 2013 with update 3 and a collegue of mine with update 4 installed each. We are using the data dools for sql server 2014.
I've created a few DTS packages which my collegue updated so far it worked without problems.
But all of a sudden I get "value does not fall within the expected range" warning from the datasource and can't edit columns there,.. . I needed to recreate the datasource for the message to disappear again.
My question here is can it be that the appearance of additional columns in the table which the datasource accesses was the cause of this problem? (I've seen out of sync warnings for datadestinations whenever a destination table got new columns or lost columns, but this is the first time something changed for a source table).
Or can that problem have a completely different cause?
It has been a long while since I've worked on an SSIS project, but I do recall seeing this error as well.
My experience was that it was caused to the metadata of the input being out of date in a certain way, and what you describe as your suspicion fits with this.
The solution I found to avoid this was to be very specific on all my input components, selecting the exact columns I wanted rather than selecting all. I think in the end I actually changed them all to use hand written SQL queries rather than the GUI column selector.
Also I don't remember if this was the same error but a similar one: sometimes after a schema changing when trying to open a component the GUI would throw an error and not open but when I tried again it would have resolved the error.
Sorry I couldn't be more definitive in my answer but hopefully this information helps point you in the right direction.
I used a simple method and it is working fine. In the OLE DB Source Editor while I retained the same connection manager, changed Data access mode (from Table/View) to SQL command and used SQL command to select the required columns. Error message no longer appeared and I could see the column values....

Crystal Reports 2008 doesn't show database tables / views that I know exist

I have a schema in an Oracle 11g R2 database that I'm trying to connect Crystal Reports.
I have two users; an admin user (where I create the views, etc.) and a reporting user that has the ability to query certain tables/views.
In any other database tool (SQL Developer, TOAD, DB Visualizer), I can see the schema along its tables and views, and can query against them and create new views, etc. as I should be able to.
However, in Crystal Reports 2008, when attempting to access the data, the proper schemas/views aren't displayed. Examples:
Creating an ODBC datasource in Crystal (which I believe connects to one I've pre-created in windows that works just fine), only a small subset of schemas are shown in Crystal (but not the one I should be able to see).
Creating an Oracle datasource in Crystal shows me the schema, and all of the tables I believe, but only one of the views (not the one I need).
NOTE: Normally I would think that it's a permissions issue on the database, except that I can access these schemas/tables/views properly from every other client I've tried.
Any ideas? Is it the drivers that Crystal 2008 uses? Is it still somehow possibly a permissions issue? I'd appreciate any insight you fine folks have.
Looks like this was indeed an error on our DBA's part. A certain level of "select" permissions in their permission model was preventing access. It appears to have been resolved.
But if anyone would like to help me gather all copies of Crystal 2008 in a warehouse and light them on fire, be my guest. :)
I've got a better one...
I was working with this for a long time today, trying to help one of our new developers. He had developed a report from a different workstation against a different data source, and we needed to swap the data source when we transferred it to the new network. Fired up CR, Showed him how to "Set Datasource Location", we get the account information, check the connection string, etc. Get ready to show him how to replace one db w/ another... find the connection, open the server, pop out the databases, open the database to show the tables and... Nothing. Hm...
Try a different account that I know works. Strange, THAT one doesn't see any tables either. Try a different database. OK, now I'm a little off-balance... Remote into the web server to see if I can run one from there. Fire up CR, Open an existing report, hit refresh, put the PW in, and voila! Data. Lots. Copy his report up, remote in, open it, get ready to Set Datasource Location, and ... nothing.
Spoke w/ the DBA, watched/walked him through the check, still nothing.
Funny thing was, if I had a report that had connected before, it would run. Wonderful! Check the available tables... nothing. Quick jump to look at the db... I can see the privileges, I can see everything set fine. Cool. Tried again, nothing.
OK, spoke to another DBA. I walk him through CR to show him the issue, he and I are going to explicitly set permissions. I open the data source in CR, right click to look at Properties, and... noticed that I hadn't check Options. Sinking feeling in the pit of my stomach. Open Options, and notice in the Data Explorer section, TABLES is not checked.
I remember WHY I set it... a long time ago. The DB has thousands of tables, and I knew which ones I needed. I paste a command and go, I never CHOOSE tables.
So... Check TABLES, and thousands of tables show up again. Sigh.
OPEN CRYSTAL REPORT THEN CLICK FILE -> OPTIONS -> SELECT TAB DATABASE -> IN THE EXPLORER OPTIONS PUT TICK MARK ON TABLES AND Onwer Like < add schema name> click ok
this will list only that schema. Crystal Report has some limit is loading all table names so select the scheme so that it will load only that schema.
thanks,
praveen.

Resources