I've been given the task of updating some rdlc reports which I've never used before. Some of the more complex reports can have multiple datasets where each SQL query is over 10kb of text if copied to a text editor. I'm finding it difficult to wrap my head around some of the more complex SQL.
I've found that I can add custom VB code to the report and I was thinking it would be nice if I could use a simpler query for the dataset and then do some processing with custom code that could populate an empty table in the report. I haven't been able to find any examples of anything like this so I'm wondering if it's possible? If so, can anyone please give me a basic example of reading data from a dataset and adding rows to a table using custom code?
Thanks!
Related
I'm not sure if this has been asked already but I'll take a shot and see what happens.
For my work we have been using Excel to generate all of our reports from instrument data. We recently implemented a Laboratory Information Management System that uses an SQL database and Crystal Reports to generate reports. I've had the fun (sarcasm) of recreating every report we run in Excel in Crystal Reports. There's one that I'm having the worst time to create. The report compares information for two samples. It compares information for one sample and then information from a replicate of that sample. I've tried every which way to bring in the data but it just repeats it for every record that's in the query. Here's a general idea of what I'm trying to accomplish:
I have two queries that bring in the same data. One query lists the original sample that I need and the second query lists the replicate that I need to use data from to calculate as well as every other sample. Essentially they're the exact same query. You can see below in the link.
Here is the query. http://tinypic.com/r/wiu591/8
For the report, I need to pull the data for two separate samples and compare it using crystal reports and perform calculations. Below is a picture of the report, the RER field is a calculated formula. I've brought in this query twice and before anyone asks "did you make links"....yes, I have and it just repeats the data because these are essentially two different records in two separate queries that are the same. I'm at a loss for ways to configure this.
Here is the gist on what the report needs to look like. I'm open if anyone can see a better way to redesign it. http://tinypic.com/r/123ayh1/8
NOTE: In the columns that say Sample and Replicate these ones are C10575 and C10575R and the data for each is below.
Any help would be awesome.
So the answer was to bring in two queries into the same view. I used the management studio to accomplish this. I brought in the two queries and didn't link them on the primary key which was the sample code. I linked on what these samples had in common. From there I did some fancy SQL'ing to sort out the samples I didn't need and presto. Got exactly what I need to throw into the crystal report and perform the calculations.
I have an SSRS report that I'm using multiple datasets (each in the form of stored procedures) to extract information for. The application that this report will reside in is used to enter audit information along with files. What I'm hoping to accomplish is a report layout similar to this:.
Since I'm dealing with a lot of 1-to-many relationships and tables, I thought it would be best to use multiple datasets rather than write a stored procedure that joins these tables, but maybe I'm wrong?
Can anyone recommend how to accomplish this layout? I've tried using Subreports embedded into a data matrix that displays the Issue description, issue images, action description, and action file fields but the output isn't very nice (see below) and I've been told that data matrices are better suited for numeric data rather than text data.
You should have a look here
It seems like it has been published for you.
Situation
I have a report which is to be export by customers to excel format when they please that must meet certain formatting criteria.
Problem
This report is a statutory return that must be returned in a specific format. I have decided this can be achieved with the use of pivots. Instead of a list view they require a grid of totals, like this
o...
This can be done manually by writing out lots and lots of pivots in a big complex statement, but would need to be updated as soon as the column I am pivoting on has a new entry, which will be frequent.
Perfect Solution
The perfect solution for this would be for somebody to find something magical that automatically pivots on all data in one column and does so programmatically, so if entry's are added to that column, they will also be pivoted on.
I am not looking for exact code here because that's lazy and I won't learn anything. A shove in the right direction would be nice though, if this is at all possible.
You can do this with dynamic SQL (Example in this answer). Although this is frequently best achieved through an application/reporting layer rather than directly in SQL.
In your case you can embed reports in Windows Forms Applications, which gives the option of just viewing the report, or exporting in a number of formats. If the pivot needs to be done in SQL then dynamic sql is the only way to do it.
I'm looking someone who can help me with this issue, that seems very easy to achieve but there is no much information around the internet.
I'm working with MS Access and Visual Basic, and I would like to create a simple bar graph, giving params that I've already gathered from many querys.
In this case: A chart about Litres per Week. I have a query to gather the amount of litres of 4 different weeks. I also provide the information for the X Axis (Last week, Last two weeks, and so on.. ). It would look like this:
So I'm wondering if this can be done, as well a pie charts and line charts.
I'm aware that this can be easilly done with Excel, but I don't want open another program to read information.
Thank you very much.
How to make Charts in MS Access would be my first key word search :)
Then I will check on MSDN for proper tools/properties availability/updates on software and so on.
Here is a simple basic tutorial to follow
This is the entire google search that would provide you anything you want to check on the topic.
Please note the version of MS Access you are using against the tutorials described. In certain versions there are certain changes have been done to the software itself. You are much lucky if it's not 2007...
EDIT Based on the comments with OP:
Since OP has exhaustive/heavy queries, it's recommended to create a temp table based on the final query.
Then temp table can act as a view and become the data source for the Chart
dynamic binding of chart from database in VS2010 in C#
Bind query as a datasource to MS Access chart. There is a method called databindtable which is a chart property. You may use it:
e.g. chart1.DataBindTable(yoursource,columname)
This article provies a good sample code.
i have a report which looks like this. it will be in PDF format:
alt text http://img52.imageshack.us/img52/3324/fullscreencapture121420.png
the user will input all the different foods, thus every section like NONE, MODERATE, SEVERE will be a different size and thus i need to be able to expand the sections during run time. in order to do that i should probably slice up the image and add different sections during run time. i dont know the proper way to do it.
please help me with a suggestion on how to go about fitting the text in the appropriate sections (but also keep in mind i have no control over how many foods are in each section, the user will decide this during run time)
I would create an iTextSharp table for each of your results (None, Moderate, Severe) and write out the table sequentially, in the order you want them to appear on your PDF. Each row in your tables would have four columns.
I found these articles useful for creating tables in iTextSharp:
iTextSharp - Introducing Tables
SourceForge Table Tutorial
Edit
Sorry, I didn't see the vb.net tag on your question. The pages I linked are in C# - I hope you can translate. I found that most of the iTextSharp samples you'll find are in C#.
It might be worth using a reporting tool rather than iTextSharp for formatted/tabular data?
We use Active Reports from http://www.datadynamics.com/ but I am sure there are others.
EDIT:
It looks like iTextSharp supports html-to-pdf conversion? Maybe thats easier to render?
Just did a search and found this: http://somewebguy.wordpress.com/2009/05/08/itextsharp-simplify-your-html-to-pdf-creation/